shader_ir/memory: Ignore global memory when tracking fails

Ignore global memory operations instead of invoking undefined behaviour
when constant buffer tracking fails and we are blasting through asserts,
ignore the operation.

In the case of LDG this means filling the destination registers with
zeroes; for STG this means ignore the instruction as a whole.

The default behaviour is still to abort execution on failure.
This commit is contained in:
ReinUsesLisp 2019-10-18 01:23:10 -03:00
parent e14b691970
commit 9b7ec9d1a0
2 changed files with 26 additions and 18 deletions

View file

@ -371,8 +371,9 @@ private:
std::pair<Node, s64> TrackRegister(const GprNode* tracked, const NodeBlock& code,
s64 cursor) const;
std::tuple<Node, Node, GlobalMemoryBase> TrackAndGetGlobalMemory(
NodeBlock& bb, Tegra::Shader::Instruction instr, bool is_write);
std::tuple<Node, Node, GlobalMemoryBase> TrackGlobalMemory(NodeBlock& bb,
Tegra::Shader::Instruction instr,
bool is_write);
const ProgramCode& program_code;
const u32 main_offset;