Replace gsl::span’s implementation with tcbrindle’s

This implementation optimises correctly on all relevant compilers,
unlike GSL’s which gave extremely slow code on any compiler other than
MSVC.

Supersedes #6948.
This commit is contained in:
Emmanuel Gil Peyrot 2019-11-09 15:45:32 +01:00
parent 25144caf12
commit 72cdf0b04c
7 changed files with 16 additions and 18 deletions

View File

@ -1,10 +0,0 @@
#pragma once
#define GSL_THROW_ON_CONTRACT_VIOLATION
#pragma push_macro("new")
#undef new
#include <gsl/gsl>
#pragma pop_macro("new")
#undef Expects
#undef Ensures

View File

@ -2,7 +2,9 @@
#include <vector>
#include "Utilities/GSL.h"
#define TCB_SPAN_NAMESPACE_NAME gsl
#include <tcb/span.hpp>
#include "../gcm_enums.h"
/**

View File

@ -3,7 +3,9 @@
#include "Emu/RSX/RSXFragmentProgram.h"
#include "Emu/RSX/RSXVertexProgram.h"
#include "Utilities/GSL.h"
#define TCB_SPAN_NAMESPACE_NAME gsl
#include <tcb/span.hpp>
#include "Utilities/hash.h"
#include "Utilities/mutex.h"
#include "Utilities/Log.h"
@ -520,7 +522,7 @@ public:
return 0;
}
void fill_fragment_constants_buffer(gsl::span<f32, gsl::dynamic_range> dst_buffer, const RSXFragmentProgram &fragment_program, bool sanitize = false) const
void fill_fragment_constants_buffer(gsl::span<f32> dst_buffer, const RSXFragmentProgram &fragment_program, bool sanitize = false) const
{
const auto I = m_fragment_shader_cache.find(fragment_program);
if (I == m_fragment_shader_cache.end())

View File

@ -3,7 +3,9 @@
#include "../RSXTexture.h"
#include <vector>
#include "Utilities/GSL.h"
#define TCB_SPAN_NAMESPACE_NAME gsl
#include <tcb/span.hpp>
namespace rsx
{

View File

@ -1,6 +1,8 @@
#pragma once
#include "Utilities/GSL.h"
#define TCB_SPAN_NAMESPACE_NAME gsl
#include <tcb/span.hpp>
#include "Emu/Memory/vm.h"
#include "surface_utils.h"
#include "../GCM.h"

View File

@ -15,7 +15,9 @@
#include "Emu/Cell/lv2/sys_event.h"
#include "Emu/Cell/Modules/cellGcmSys.h"
#include "Utilities/GSL.h"
#define TCB_SPAN_NAMESPACE_NAME gsl
#include <tcb/span.hpp>
#include "Utilities/StrUtil.h"
#include <cereal/archives/binary.hpp>

View File

@ -8,8 +8,6 @@
#include "Emu/RSX/GSRender.h"
#include "Emu/RSX/GCM.h"
#include "Utilities/GSL.h"
#include "memory_viewer_panel.h"
#include "table_item_delegate.h"
#include "gui_settings.h"