mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-16 20:07:16 +01:00
VideoCore: Use correct register for immediate mode attribute count
This commit is contained in:
parent
ab6954e942
commit
fccb28d2e9
@ -128,17 +128,18 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
|
|||||||
g_state.input_default_attributes.attr[setup.index] = attribute;
|
g_state.input_default_attributes.attr[setup.index] = attribute;
|
||||||
setup.index++;
|
setup.index++;
|
||||||
} else {
|
} else {
|
||||||
// Put each attribute into an immediate input buffer.
|
// Put each attribute into an immediate input buffer. When all specified immediate
|
||||||
// When all specified immediate attributes are present, the Vertex Shader is invoked
|
// attributes are present, the Vertex Shader is invoked and everything is sent to
|
||||||
// and everything is
|
// the primitive assembler.
|
||||||
// sent to the primitive assembler.
|
|
||||||
|
|
||||||
auto& immediate_input = g_state.immediate.input_vertex;
|
auto& immediate_input = g_state.immediate.input_vertex;
|
||||||
auto& immediate_attribute_id = g_state.immediate.current_attribute;
|
auto& immediate_attribute_id = g_state.immediate.current_attribute;
|
||||||
|
|
||||||
immediate_input.attr[immediate_attribute_id++] = attribute;
|
immediate_input.attr[immediate_attribute_id] = attribute;
|
||||||
|
|
||||||
if (immediate_attribute_id > regs.vs.max_input_attribute_index) {
|
if (immediate_attribute_id < regs.max_input_attrib_index) {
|
||||||
|
immediate_attribute_id += 1;
|
||||||
|
} else {
|
||||||
MICROPROFILE_SCOPE(GPU_Drawing);
|
MICROPROFILE_SCOPE(GPU_Drawing);
|
||||||
immediate_attribute_id = 0;
|
immediate_attribute_id = 0;
|
||||||
|
|
||||||
|
@ -1176,7 +1176,12 @@ struct Regs {
|
|||||||
}
|
}
|
||||||
} command_buffer;
|
} command_buffer;
|
||||||
|
|
||||||
INSERT_PADDING_WORDS(0x07);
|
INSERT_PADDING_WORDS(4);
|
||||||
|
|
||||||
|
/// Number of input attributes to the vertex shader minus 1
|
||||||
|
BitField<0, 4, u32> max_input_attrib_index;
|
||||||
|
|
||||||
|
INSERT_PADDING_WORDS(2);
|
||||||
|
|
||||||
enum class GPUMode : u32 {
|
enum class GPUMode : u32 {
|
||||||
Drawing = 0,
|
Drawing = 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user