Merge pull request #8015 from FernandoS27/fix-global-mem
Shader decompiler: Fix storage tracking in deko3d.
This commit is contained in:
commit
cc285b9924
@ -212,11 +212,11 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo
|
|||||||
}
|
}
|
||||||
Optimization::SsaRewritePass(program);
|
Optimization::SsaRewritePass(program);
|
||||||
|
|
||||||
|
Optimization::ConstantPropagationPass(program);
|
||||||
|
|
||||||
Optimization::GlobalMemoryToStorageBufferPass(program);
|
Optimization::GlobalMemoryToStorageBufferPass(program);
|
||||||
Optimization::TexturePass(env, program);
|
Optimization::TexturePass(env, program);
|
||||||
|
|
||||||
Optimization::ConstantPropagationPass(program);
|
|
||||||
|
|
||||||
if (Settings::values.resolution_info.active) {
|
if (Settings::values.resolution_info.active) {
|
||||||
Optimization::RescalingPass(program);
|
Optimization::RescalingPass(program);
|
||||||
}
|
}
|
||||||
|
@ -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)};
|
||||||
|
Loading…
Reference in New Issue
Block a user