mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 10:25:45 +00:00
VideoCore: Change misleading register names
A few registers had names such as "count" or "number" when they actually contained the maximum (that is, count - 1). This can easily lead to hard to notice off by one errors.
This commit is contained in:
parent
1ddd931c76
commit
07b51a7da0
4 changed files with 9 additions and 8 deletions
|
@ -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.num_input_attributes + 1) {
|
||||
if (immediate_attribute_id >= regs.vs.max_input_attribute_index + 1) {
|
||||
MICROPROFILE_SCOPE(GPU_Drawing);
|
||||
immediate_attribute_id = 0;
|
||||
|
||||
|
@ -150,7 +150,8 @@ 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.num_input_attributes + 1);
|
||||
shader_unit.LoadInputVertex(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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue