summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/vertex_shader.cpp5
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;