Last active
August 29, 2015 14:16
-
-
Save Subv/b9bd539fd52df9fa4e82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp | |
index bc8c004..9d60d63 100644 | |
-- a/src/video_core/vertex_shader.cpp | |
++ b/src/video_core/vertex_shader.cpp | |
@@ -163,9 +163,12 @@ static void ProcessShaderCode(VertexShaderState& state) { | |
// For now, we just abort in this situation. | |
ASSERT_MSG(!is_inverted, "Bad condition..."); | |
- const int address_offset = (instr.common.address_register_index == 0) | |
+ int address_offset = (instr.common.address_register_index == 0) | |
? 0 : state.address_registers[instr.common.address_register_index - 1]; | |
+ if (address_offset < -95 || address_offset > 95) | |
+ address_offset = 0; | |
const float24* src1_ = LookupSourceRegister(instr.common.GetSrc1(is_inverted) + address_offset); | |
const float24* src2_ = LookupSourceRegister(instr.common.GetSrc2(is_inverted)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment