Skip to content

Instantly share code, notes, and snippets.

@Subv
Created April 21, 2015 03:11
Show Gist options
  • Select an option

  • Save Subv/13752d43fe1c882c2141 to your computer and use it in GitHub Desktop.

Select an option

Save Subv/13752d43fe1c882c2141 to your computer and use it in GitHub Desktop.
@@ -164,9 +164,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