diff options
| author | 2016-05-12 10:06:35 +0200 | |
|---|---|---|
| committer | 2016-05-12 19:05:41 +0200 | |
| commit | 6c6d99ca51cca8d11e0641ee254377d45c5ff9f3 (patch) | |
| tree | c899af0bce388607ba368d78dcd083c79f76fe10 /src | |
| parent | Merge pull request #1690 from JayFoxRox/tex-type-3 (diff) | |
| download | yuzu-6c6d99ca51cca8d11e0641ee254377d45c5ff9f3.tar.gz yuzu-6c6d99ca51cca8d11e0641ee254377d45c5ff9f3.tar.xz yuzu-6c6d99ca51cca8d11e0641ee254377d45c5ff9f3.zip | |
Move default_attributes into Pica state
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/debugger/graphics_tracing.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/command_processor.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/pica_state.h | 2 | ||||
| -rw-r--r-- | src/video_core/shader/shader.h | 2 | ||||
| -rw-r--r-- | src/video_core/vertex_loader.cpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/citra_qt/debugger/graphics_tracing.cpp b/src/citra_qt/debugger/graphics_tracing.cpp index 1402f8e79..9c80f7ec9 100644 --- a/src/citra_qt/debugger/graphics_tracing.cpp +++ b/src/citra_qt/debugger/graphics_tracing.cpp | |||
| @@ -74,7 +74,7 @@ void GraphicsTracingWidget::StartRecording() { | |||
| 74 | std::array<u32, 4 * 16> default_attributes; | 74 | std::array<u32, 4 * 16> default_attributes; |
| 75 | for (unsigned i = 0; i < 16; ++i) { | 75 | for (unsigned i = 0; i < 16; ++i) { |
| 76 | for (unsigned comp = 0; comp < 3; ++comp) { | 76 | for (unsigned comp = 0; comp < 3; ++comp) { |
| 77 | default_attributes[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs.default_attributes[i][comp].ToFloat32()); | 77 | default_attributes[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs_default_attributes[i][comp].ToFloat32()); |
| 78 | } | 78 | } |
| 79 | } | 79 | } |
| 80 | 80 | ||
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index e7dc5ddac..ad0da796e 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp | |||
| @@ -128,7 +128,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 128 | 128 | ||
| 129 | // TODO: Verify that this actually modifies the register! | 129 | // TODO: Verify that this actually modifies the register! |
| 130 | if (setup.index < 15) { | 130 | if (setup.index < 15) { |
| 131 | g_state.vs.default_attributes[setup.index] = attribute; | 131 | g_state.vs_default_attributes[setup.index] = attribute; |
| 132 | setup.index++; | 132 | setup.index++; |
| 133 | } else { | 133 | } else { |
| 134 | // Put each attribute into an immediate input buffer. | 134 | // Put each attribute into an immediate input buffer. |
diff --git a/src/video_core/pica_state.h b/src/video_core/pica_state.h index 1059c6ae4..495174c25 100644 --- a/src/video_core/pica_state.h +++ b/src/video_core/pica_state.h | |||
| @@ -25,6 +25,8 @@ struct State { | |||
| 25 | Shader::ShaderSetup vs; | 25 | Shader::ShaderSetup vs; |
| 26 | Shader::ShaderSetup gs; | 26 | Shader::ShaderSetup gs; |
| 27 | 27 | ||
| 28 | std::array<Math::Vec4<float24>, 16> vs_default_attributes; | ||
| 29 | |||
| 28 | struct { | 30 | struct { |
| 29 | union LutEntry { | 31 | union LutEntry { |
| 30 | // Used for raw access | 32 | // Used for raw access |
diff --git a/src/video_core/shader/shader.h b/src/video_core/shader/shader.h index 7f417675a..828c0a0e9 100644 --- a/src/video_core/shader/shader.h +++ b/src/video_core/shader/shader.h | |||
| @@ -340,8 +340,6 @@ struct ShaderSetup { | |||
| 340 | std::array<Math::Vec4<u8>, 4> i; | 340 | std::array<Math::Vec4<u8>, 4> i; |
| 341 | } uniforms; | 341 | } uniforms; |
| 342 | 342 | ||
| 343 | Math::Vec4<float24> default_attributes[16]; | ||
| 344 | |||
| 345 | std::array<u32, 1024> program_code; | 343 | std::array<u32, 1024> program_code; |
| 346 | std::array<u32, 1024> swizzle_data; | 344 | std::array<u32, 1024> swizzle_data; |
| 347 | 345 | ||
diff --git a/src/video_core/vertex_loader.cpp b/src/video_core/vertex_loader.cpp index 21ae52949..83896814f 100644 --- a/src/video_core/vertex_loader.cpp +++ b/src/video_core/vertex_loader.cpp | |||
| @@ -124,7 +124,7 @@ void VertexLoader::LoadVertex(u32 base_address, int index, int vertex, Shader::I | |||
| 124 | input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(), input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32()); | 124 | input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(), input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32()); |
| 125 | } else if (vertex_attribute_is_default[i]) { | 125 | } else if (vertex_attribute_is_default[i]) { |
| 126 | // Load the default attribute if we're configured to do so | 126 | // Load the default attribute if we're configured to do so |
| 127 | input.attr[i] = g_state.vs.default_attributes[i]; | 127 | input.attr[i] = g_state.vs_default_attributes[i]; |
| 128 | LOG_TRACE(HW_GPU, "Loaded default attribute %x for vertex %x (index %x): (%f, %f, %f, %f)", | 128 | LOG_TRACE(HW_GPU, "Loaded default attribute %x for vertex %x (index %x): (%f, %f, %f, %f)", |
| 129 | i, vertex, index, | 129 | i, vertex, index, |
| 130 | input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(), | 130 | input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(), |