diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate_program.cpp | 4 | ||||
| -rw-r--r-- | src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate_program.cpp b/src/shader_recompiler/frontend/maxwell/translate_program.cpp index 248ad3ced..b22725584 100644 --- a/src/shader_recompiler/frontend/maxwell/translate_program.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate_program.cpp | |||
| @@ -212,11 +212,11 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo | |||
| 212 | } | 212 | } |
| 213 | Optimization::SsaRewritePass(program); | 213 | Optimization::SsaRewritePass(program); |
| 214 | 214 | ||
| 215 | Optimization::ConstantPropagationPass(program); | ||
| 216 | |||
| 215 | Optimization::GlobalMemoryToStorageBufferPass(program); | 217 | Optimization::GlobalMemoryToStorageBufferPass(program); |
| 216 | Optimization::TexturePass(env, program); | 218 | Optimization::TexturePass(env, program); |
| 217 | 219 | ||
| 218 | Optimization::ConstantPropagationPass(program); | ||
| 219 | |||
| 220 | if (Settings::values.resolution_info.active) { | 220 | if (Settings::values.resolution_info.active) { |
| 221 | Optimization::RescalingPass(program); | 221 | Optimization::RescalingPass(program); |
| 222 | } | 222 | } |
diff --git a/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp b/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp index 38592afd0..ddf497e32 100644 --- a/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp +++ b/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp | |||
| @@ -334,7 +334,8 @@ std::optional<LowAddrInfo> TrackLowAddress(IR::Inst* inst) { | |||
| 334 | /// Tries to track the storage buffer address used by a global memory instruction | 334 | /// Tries to track the storage buffer address used by a global memory instruction |
| 335 | std::optional<StorageBufferAddr> Track(const IR::Value& value, const Bias* bias) { | 335 | std::optional<StorageBufferAddr> Track(const IR::Value& value, const Bias* bias) { |
| 336 | const auto pred{[bias](const IR::Inst* inst) -> std::optional<StorageBufferAddr> { | 336 | const auto pred{[bias](const IR::Inst* inst) -> std::optional<StorageBufferAddr> { |
| 337 | if (inst->GetOpcode() != IR::Opcode::GetCbufU32) { | 337 | if (inst->GetOpcode() != IR::Opcode::GetCbufU32 && |
| 338 | inst->GetOpcode() != IR::Opcode::GetCbufU32x2) { | ||
| 338 | return std::nullopt; | 339 | return std::nullopt; |
| 339 | } | 340 | } |
| 340 | const IR::Value index{inst->Arg(0)}; | 341 | const IR::Value index{inst->Arg(0)}; |