mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 20:22:30 +01:00
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:
parent
25144caf12
commit
72cdf0b04c
@ -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
|
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "Utilities/GSL.h"
|
#define TCB_SPAN_NAMESPACE_NAME gsl
|
||||||
|
#include <tcb/span.hpp>
|
||||||
|
|
||||||
#include "../gcm_enums.h"
|
#include "../gcm_enums.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
#include "Emu/RSX/RSXFragmentProgram.h"
|
#include "Emu/RSX/RSXFragmentProgram.h"
|
||||||
#include "Emu/RSX/RSXVertexProgram.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/hash.h"
|
||||||
#include "Utilities/mutex.h"
|
#include "Utilities/mutex.h"
|
||||||
#include "Utilities/Log.h"
|
#include "Utilities/Log.h"
|
||||||
@ -520,7 +522,7 @@ public:
|
|||||||
return 0;
|
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);
|
const auto I = m_fragment_shader_cache.find(fragment_program);
|
||||||
if (I == m_fragment_shader_cache.end())
|
if (I == m_fragment_shader_cache.end())
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
#include "../RSXTexture.h"
|
#include "../RSXTexture.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "Utilities/GSL.h"
|
|
||||||
|
#define TCB_SPAN_NAMESPACE_NAME gsl
|
||||||
|
#include <tcb/span.hpp>
|
||||||
|
|
||||||
namespace rsx
|
namespace rsx
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Utilities/GSL.h"
|
#define TCB_SPAN_NAMESPACE_NAME gsl
|
||||||
|
#include <tcb/span.hpp>
|
||||||
|
|
||||||
#include "Emu/Memory/vm.h"
|
#include "Emu/Memory/vm.h"
|
||||||
#include "surface_utils.h"
|
#include "surface_utils.h"
|
||||||
#include "../GCM.h"
|
#include "../GCM.h"
|
||||||
|
@ -15,7 +15,9 @@
|
|||||||
#include "Emu/Cell/lv2/sys_event.h"
|
#include "Emu/Cell/lv2/sys_event.h"
|
||||||
#include "Emu/Cell/Modules/cellGcmSys.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 "Utilities/StrUtil.h"
|
||||||
|
|
||||||
#include <cereal/archives/binary.hpp>
|
#include <cereal/archives/binary.hpp>
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
#include "Emu/RSX/GSRender.h"
|
#include "Emu/RSX/GSRender.h"
|
||||||
#include "Emu/RSX/GCM.h"
|
#include "Emu/RSX/GCM.h"
|
||||||
|
|
||||||
#include "Utilities/GSL.h"
|
|
||||||
|
|
||||||
#include "memory_viewer_panel.h"
|
#include "memory_viewer_panel.h"
|
||||||
#include "table_item_delegate.h"
|
#include "table_item_delegate.h"
|
||||||
#include "gui_settings.h"
|
#include "gui_settings.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user