mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-13 07:14:49 +00:00
rsx_methods.cpp fix
This commit is contained in:
parent
190fc4301e
commit
6a9f3040e1
@ -476,10 +476,9 @@ namespace rsx
|
|||||||
frame_debug.command_queue.push_back(std::make_pair(reg, value));
|
frame_debug.command_queue.push_back(std::make_pair(reg, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& It = methods.find(reg);
|
if (auto method = methods[reg])
|
||||||
if (It != methods.end())
|
|
||||||
{
|
{
|
||||||
It->second(this, value);
|
method(this, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
#include <cereal/archives/binary.hpp>
|
#include <cereal/archives/binary.hpp>
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <cassert>
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
cfg::map_entry<double> g_cfg_rsx_frame_limit(cfg::root.video, "Frame limit",
|
cfg::map_entry<double> g_cfg_rsx_frame_limit(cfg::root.video, "Frame limit",
|
||||||
{
|
{
|
||||||
@ -29,7 +27,7 @@ namespace rsx
|
|||||||
{
|
{
|
||||||
rsx_state method_registers;
|
rsx_state method_registers;
|
||||||
using rsx_method_t = void(*)(class thread*, u32);
|
using rsx_method_t = void(*)(class thread*, u32);
|
||||||
std::unordered_map<u32, rsx_method_t> methods{};
|
std::array<rsx_method_t, 0x10000 / 4> methods{};
|
||||||
|
|
||||||
template<typename Type> struct vertex_data_type_from_element_type;
|
template<typename Type> struct vertex_data_type_from_element_type;
|
||||||
template<> struct vertex_data_type_from_element_type<float> { static const vertex_base_type type = vertex_base_type::f; };
|
template<> struct vertex_data_type_from_element_type<float> { static const vertex_base_type type = vertex_base_type::f; };
|
||||||
@ -802,17 +800,17 @@ namespace rsx
|
|||||||
registers[NV4097_SET_STENCIL_FUNC] = CELL_GCM_ALWAYS;
|
registers[NV4097_SET_STENCIL_FUNC] = CELL_GCM_ALWAYS;
|
||||||
registers[NV4097_SET_STENCIL_FUNC_REF] = 0x00;
|
registers[NV4097_SET_STENCIL_FUNC_REF] = 0x00;
|
||||||
registers[NV4097_SET_STENCIL_FUNC_MASK] = 0xff;
|
registers[NV4097_SET_STENCIL_FUNC_MASK] = 0xff;
|
||||||
/* registers[NV4097_SET_STENCIL_OP_FAIL] = CELL_GCM_KEEP;
|
//registers[NV4097_SET_STENCIL_OP_FAIL] = CELL_GCM_KEEP;
|
||||||
registers[NV4097_SET_STENCIL_OP_ZFAIL] = CELL_GCM_KEEP;
|
//registers[NV4097_SET_STENCIL_OP_ZFAIL] = CELL_GCM_KEEP;
|
||||||
registers[NV4097_SET_STENCIL_OP_ZPASS] = CELL_GCM_KEEP;*/
|
//registers[NV4097_SET_STENCIL_OP_ZPASS] = CELL_GCM_KEEP;
|
||||||
|
|
||||||
registers[NV4097_SET_BACK_STENCIL_MASK] = 0xff;
|
registers[NV4097_SET_BACK_STENCIL_MASK] = 0xff;
|
||||||
registers[NV4097_SET_BACK_STENCIL_FUNC] = CELL_GCM_ALWAYS;
|
registers[NV4097_SET_BACK_STENCIL_FUNC] = CELL_GCM_ALWAYS;
|
||||||
registers[NV4097_SET_BACK_STENCIL_FUNC_REF] = 0x00;
|
registers[NV4097_SET_BACK_STENCIL_FUNC_REF] = 0x00;
|
||||||
registers[NV4097_SET_BACK_STENCIL_FUNC_MASK] = 0xff;
|
registers[NV4097_SET_BACK_STENCIL_FUNC_MASK] = 0xff;
|
||||||
/* registers[NV4097_SET_BACK_STENCIL_OP_FAIL] = CELL_GCM_KEEP;
|
//registers[NV4097_SET_BACK_STENCIL_OP_FAIL] = CELL_GCM_KEEP;
|
||||||
registers[NV4097_SET_BACK_STENCIL_OP_ZFAIL] = CELL_GCM_KEEP;
|
//registers[NV4097_SET_BACK_STENCIL_OP_ZFAIL] = CELL_GCM_KEEP;
|
||||||
registers[NV4097_SET_BACK_STENCIL_OP_ZPASS] = CELL_GCM_KEEP;*/
|
//registers[NV4097_SET_BACK_STENCIL_OP_ZPASS] = CELL_GCM_KEEP;
|
||||||
|
|
||||||
//registers[NV4097_SET_SHADE_MODE] = CELL_GCM_SMOOTH;
|
//registers[NV4097_SET_SHADE_MODE] = CELL_GCM_SMOOTH;
|
||||||
|
|
||||||
@ -848,9 +846,9 @@ namespace rsx
|
|||||||
|
|
||||||
registers[NV4097_SET_ZSTENCIL_CLEAR_VALUE] = 0xffffffff;
|
registers[NV4097_SET_ZSTENCIL_CLEAR_VALUE] = 0xffffffff;
|
||||||
|
|
||||||
std::for_each(vertex_arrays_info.begin(), vertex_arrays_info.end(), [](auto &info) { info.size = 0; });
|
for (auto& info : vertex_arrays_info) info.size = 0;
|
||||||
std::for_each(fragment_textures.begin(), fragment_textures.end(), [](auto &tex) { tex.init(); });
|
for (auto& tex : fragment_textures) tex.init();
|
||||||
std::for_each(vertex_textures.begin(), vertex_textures.end(), [](auto &tex) { tex.init(); });
|
for (auto& tex : vertex_textures) tex.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void rsx_state::decode(u32 reg, u32 value)
|
void rsx_state::decode(u32 reg, u32 value)
|
||||||
|
@ -1116,5 +1116,5 @@ namespace rsx
|
|||||||
|
|
||||||
using rsx_method_t = void(*)(class thread*, u32);
|
using rsx_method_t = void(*)(class thread*, u32);
|
||||||
extern rsx_state method_registers;
|
extern rsx_state method_registers;
|
||||||
extern std::unordered_map<u32, rsx_method_t> methods;
|
extern std::array<rsx_method_t, 0x10000 / 4> methods;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user