diff options
| author | 2014-08-23 14:14:34 +0200 | |
|---|---|---|
| committer | 2014-08-25 22:03:19 +0200 | |
| commit | 697b50c3ff1b0d179c5862efa56cb19fa640824c (patch) | |
| tree | 5fc892f9e922daae01366120874bfb8faf754574 /src | |
| parent | Math: Warning fixes. (diff) | |
| download | yuzu-697b50c3ff1b0d179c5862efa56cb19fa640824c.tar.gz yuzu-697b50c3ff1b0d179c5862efa56cb19fa640824c.tar.xz yuzu-697b50c3ff1b0d179c5862efa56cb19fa640824c.zip | |
Pica/VertexShader: Fix a bug in the call stack handling.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/vertex_shader.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index cdecbff3c..db8244317 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp | |||
| @@ -191,8 +191,9 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 191 | if (*state.call_stack_pointer == VertexShaderState::INVALID_ADDRESS) { | 191 | if (*state.call_stack_pointer == VertexShaderState::INVALID_ADDRESS) { |
| 192 | exit_loop = true; | 192 | exit_loop = true; |
| 193 | } else { | 193 | } else { |
| 194 | state.program_counter = &shader_memory[*state.call_stack_pointer--]; | 194 | // Jump back to call stack position, invalidate call stack entry, move up call stack pointer |
| 195 | *state.call_stack_pointer = VertexShaderState::INVALID_ADDRESS; | 195 | state.program_counter = &shader_memory[*state.call_stack_pointer]; |
| 196 | *state.call_stack_pointer-- = VertexShaderState::INVALID_ADDRESS; | ||
| 196 | } | 197 | } |
| 197 | 198 | ||
| 198 | break; | 199 | break; |