2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #2375 from FernandoS27/fix-ldc

Remove unnecessary bounding in LD_C
This commit is contained in:
bunnei 2019-04-09 21:23:24 -04:00 committed by GitHub
commit ed9dba89d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -552,8 +552,7 @@ private:
} else if (std::holds_alternative<OperationNode>(*offset)) {
// Indirect access
const std::string final_offset = code.GenerateTemporary();
code.AddLine("uint " + final_offset + " = (ftou(" + Visit(offset) + ") / 4) & " +
std::to_string(MAX_CONSTBUFFER_ELEMENTS - 1) + ';');
code.AddLine("uint " + final_offset + " = (ftou(" + Visit(offset) + ") / 4);");
return fmt::format("{}[{} / 4][{} % 4]", GetConstBuffer(cbuf->GetIndex()),
final_offset, final_offset);