diff options
| author | 2018-03-16 19:24:41 -0500 | |
|---|---|---|
| committer | 2018-03-16 19:24:41 -0500 | |
| commit | bf310a41b8bd1618c45040aaf039b9d44cb2c45f (patch) | |
| tree | 942772462391c988c586938a5de4ffd2499bb221 /src | |
| parent | GPU: Added Maxwell registers for Shader Program control. (diff) | |
| download | yuzu-bf310a41b8bd1618c45040aaf039b9d44cb2c45f.tar.gz yuzu-bf310a41b8bd1618c45040aaf039b9d44cb2c45f.tar.xz yuzu-bf310a41b8bd1618c45040aaf039b9d44cb2c45f.zip | |
GPU: Assert that we get a 0 CODE_ADDRESS register in the 3D engine.
Shader address calculation depends on this value to some extent, we do not currently know what it being 0 entails.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 842c5a014..8c6d1172c 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -19,6 +19,14 @@ void Maxwell3D::WriteReg(u32 method, u32 value) { | |||
| 19 | #define MAXWELL3D_REG_INDEX(field_name) (offsetof(Regs, field_name) / sizeof(u32)) | 19 | #define MAXWELL3D_REG_INDEX(field_name) (offsetof(Regs, field_name) / sizeof(u32)) |
| 20 | 20 | ||
| 21 | switch (method) { | 21 | switch (method) { |
| 22 | case MAXWELL3D_REG_INDEX(code_address.code_address_high): | ||
| 23 | case MAXWELL3D_REG_INDEX(code_address.code_address_low): { | ||
| 24 | // Note: For some reason games (like Puyo Puyo Tetris) seem to write 0 to the CODE_ADDRESS | ||
| 25 | // register, we do not currently know if that's intended or a bug, so we assert it lest | ||
| 26 | // stuff breaks in other places (like the shader address calculation). | ||
| 27 | ASSERT_MSG(regs.code_address.CodeAddress() == 0, "Unexpected CODE_ADDRESS register value."); | ||
| 28 | break; | ||
| 29 | } | ||
| 22 | case MAXWELL3D_REG_INDEX(draw.vertex_end_gl): { | 30 | case MAXWELL3D_REG_INDEX(draw.vertex_end_gl): { |
| 23 | DrawArrays(); | 31 | DrawArrays(); |
| 24 | break; | 32 | break; |