1
0
Fork 0
forked from suyu/suyu

Shader decompiler: Fix storage tracking in deko3d.

This commit is contained in:
Fernando Sahmkow 2022-03-13 17:41:16 +01:00
parent 8decc8d1a5
commit ec9f0f064e

View file

@ -334,7 +334,8 @@ std::optional<LowAddrInfo> TrackLowAddress(IR::Inst* inst) {
/// Tries to track the storage buffer address used by a global memory instruction /// Tries to track the storage buffer address used by a global memory instruction
std::optional<StorageBufferAddr> Track(const IR::Value& value, const Bias* bias) { std::optional<StorageBufferAddr> Track(const IR::Value& value, const Bias* bias) {
const auto pred{[bias](const IR::Inst* inst) -> std::optional<StorageBufferAddr> { const auto pred{[bias](const IR::Inst* inst) -> std::optional<StorageBufferAddr> {
if (inst->GetOpcode() != IR::Opcode::GetCbufU32) { if (inst->GetOpcode() != IR::Opcode::GetCbufU32 &&
inst->GetOpcode() != IR::Opcode::GetCbufU32x2) {
return std::nullopt; return std::nullopt;
} }
const IR::Value index{inst->Arg(0)}; const IR::Value index{inst->Arg(0)};