summaryrefslogtreecommitdiffstats
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/command_processor.cpp')
-rw-r--r--src/video_core/command_processor.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 9c0ed79c7..45b994b46 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -125,7 +125,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
// TODO: Verify that this actually modifies the register!
if (setup.index < 15) {
- g_state.vs_default_attributes[setup.index] = attribute;
+ g_state.input_default_attributes.attr[setup.index] = attribute;
setup.index++;
} else {
// Put each attribute into an immediate input buffer.
@@ -138,7 +138,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
immediate_input.attr[immediate_attribute_id++] = attribute;
- if (immediate_attribute_id >= regs.vs.max_input_attribute_index + 1) {
+ if (immediate_attribute_id > regs.vs.max_input_attribute_index) {
MICROPROFILE_SCOPE(GPU_Drawing);
immediate_attribute_id = 0;
@@ -150,8 +150,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation,
static_cast<void*>(&immediate_input));
Shader::UnitState shader_unit;
- shader_unit.LoadInputVertex(immediate_input,
- regs.vs.max_input_attribute_index + 1);
+ shader_unit.LoadInput(immediate_input, regs.vs.max_input_attribute_index + 1);
shader_engine->Run(g_state.vs, shader_unit);
auto output_vertex = Shader::OutputVertex::FromRegisters(
shader_unit.registers.output, regs, regs.vs.output_mask);
@@ -281,14 +280,14 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
if (!vertex_cache_hit) {
// Initialize data for the current vertex
- Shader::InputVertex input;
+ Shader::AttributeBuffer input;
loader.LoadVertex(base_address, index, vertex, input, memory_accesses);
// Send to vertex shader
if (g_debug_context)
g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation,
(void*)&input);
- shader_unit.LoadInputVertex(input, loader.GetNumTotalAttributes());
+ shader_unit.LoadInput(input, loader.GetNumTotalAttributes());
shader_engine->Run(g_state.vs, shader_unit);
// Retrieve vertex from register data