summaryrefslogtreecommitdiffstats
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-12-17 08:21:26 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-26 03:53:23 +0100
commitdd4a1672a77830a53de61cf0554b34e9e17a2905 (patch)
tree63b1b64e3858aca34c0828dbd9fec6f5ebc1f887 /src/video_core/command_processor.cpp
parentVideoCore/Shader: Add constness to methods (diff)
downloadyuzu-dd4a1672a77830a53de61cf0554b34e9e17a2905.tar
yuzu-dd4a1672a77830a53de61cf0554b34e9e17a2905.tar.gz
yuzu-dd4a1672a77830a53de61cf0554b34e9e17a2905.tar.bz2
yuzu-dd4a1672a77830a53de61cf0554b34e9e17a2905.tar.lz
yuzu-dd4a1672a77830a53de61cf0554b34e9e17a2905.tar.xz
yuzu-dd4a1672a77830a53de61cf0554b34e9e17a2905.tar.zst
yuzu-dd4a1672a77830a53de61cf0554b34e9e17a2905.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/command_processor.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index fc224c6f2..694c9f169 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -142,15 +142,16 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
MICROPROFILE_SCOPE(GPU_Drawing);
immediate_attribute_id = 0;
- Shader::UnitState shader_unit;
- g_state.vs.Setup();
+ auto* shader_engine = Shader::GetEngine();
+ shader_engine->SetupBatch(&g_state.vs);
// Send to vertex shader
if (g_debug_context)
g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation,
static_cast<void*>(&immediate_input));
+ Shader::UnitState shader_unit;
shader_unit.LoadInputVertex(immediate_input, regs.vs.num_input_attributes + 1);
- g_state.vs.Run(shader_unit, regs.vs.main_offset);
+ shader_engine->Run(shader_unit, regs.vs.main_offset);
Shader::OutputVertex output_vertex =
shader_unit.output_registers.ToVertex(regs.vs);
@@ -244,8 +245,10 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
unsigned int vertex_cache_pos = 0;
vertex_cache_ids.fill(-1);
+ auto* shader_engine = Shader::GetEngine();
Shader::UnitState shader_unit;
- g_state.vs.Setup();
+
+ shader_engine->SetupBatch(&g_state.vs);
for (unsigned int index = 0; index < regs.num_vertices; ++index) {
// Indexed rendering doesn't use the start offset
@@ -285,7 +288,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation,
(void*)&input);
shader_unit.LoadInputVertex(input, loader.GetNumTotalAttributes());
- g_state.vs.Run(shader_unit, regs.vs.main_offset);
+ shader_engine->Run(shader_unit, regs.vs.main_offset);
// Retrieve vertex from register data
output_vertex = shader_unit.output_registers.ToVertex(regs.vs);