summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/ir_opt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp1
-rw-r--r--src/shader_recompiler/ir_opt/rescaling_pass.cpp3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
index ed82fa2ac..1e476d83d 100644
--- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
+++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
@@ -432,6 +432,7 @@ void VisitUsages(Info& info, IR::Inst& inst) {
break;
case IR::Opcode::ResolutionDownFactor:
case IR::Opcode::IsTextureScaled:
+ case IR::Opcode::IsImageScaled:
info.uses_rescaling_uniform = true;
break;
case IR::Opcode::LaneId:
diff --git a/src/shader_recompiler/ir_opt/rescaling_pass.cpp b/src/shader_recompiler/ir_opt/rescaling_pass.cpp
index 86c8f0c69..2af12fc07 100644
--- a/src/shader_recompiler/ir_opt/rescaling_pass.cpp
+++ b/src/shader_recompiler/ir_opt/rescaling_pass.cpp
@@ -129,8 +129,7 @@ void PatchImageFetch(IR::Block& block, IR::Inst& inst) {
void PatchImageRead(IR::Block& block, IR::Inst& inst) {
IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)};
const auto info{inst.Flags<IR::TextureInstInfo>()};
- // TODO: Scale conditionally
- const IR::U1 is_scaled{IR::Value{true}};
+ const IR::U1 is_scaled{ir.IsImageScaled(ir.Imm32(info.descriptor_index))};
ScaleIntegerCoord(ir, inst, is_scaled);
}