summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/ir_opt')
-rw-r--r--src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp10
1 files changed, 9 insertions, 1 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 10d2822ae..47933df97 100644
--- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
+++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
@@ -636,7 +636,6 @@ void VisitUsages(Info& info, IR::Inst& inst) {
636 case IR::Opcode::ImageGatherDref: 636 case IR::Opcode::ImageGatherDref:
637 case IR::Opcode::ImageFetch: 637 case IR::Opcode::ImageFetch:
638 case IR::Opcode::ImageQueryDimensions: 638 case IR::Opcode::ImageQueryDimensions:
639 case IR::Opcode::ImageQueryLod:
640 case IR::Opcode::ImageGradient: { 639 case IR::Opcode::ImageGradient: {
641 const TextureType type{inst.Flags<IR::TextureInstInfo>().type}; 640 const TextureType type{inst.Flags<IR::TextureInstInfo>().type};
642 info.uses_sampled_1d |= type == TextureType::Color1D || type == TextureType::ColorArray1D; 641 info.uses_sampled_1d |= type == TextureType::Color1D || type == TextureType::ColorArray1D;
@@ -644,6 +643,15 @@ void VisitUsages(Info& info, IR::Inst& inst) {
644 inst.GetAssociatedPseudoOperation(IR::Opcode::GetSparseFromOp) != nullptr; 643 inst.GetAssociatedPseudoOperation(IR::Opcode::GetSparseFromOp) != nullptr;
645 break; 644 break;
646 } 645 }
646 case IR::Opcode::ImageQueryLod: {
647 const auto flags{inst.Flags<IR::TextureInstInfo>()};
648 const TextureType type{flags.type};
649 info.uses_sampled_1d |= type == TextureType::Color1D || type == TextureType::ColorArray1D;
650 info.uses_shadow_lod |= flags.is_depth != 0;
651 info.uses_sparse_residency |=
652 inst.GetAssociatedPseudoOperation(IR::Opcode::GetSparseFromOp) != nullptr;
653 break;
654 }
647 case IR::Opcode::ImageRead: { 655 case IR::Opcode::ImageRead: {
648 const auto flags{inst.Flags<IR::TextureInstInfo>()}; 656 const auto flags{inst.Flags<IR::TextureInstInfo>()};
649 info.uses_typeless_image_reads |= flags.image_format == ImageFormat::Typeless; 657 info.uses_typeless_image_reads |= flags.image_format == ImageFormat::Typeless;