summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/ir_opt
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-06-14 01:12:03 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:38 +0200
commita0d0704affa0f86ba29ef59d90fa06c1b7c974da (patch)
tree6bf42ec914e7911c5244f84191124d888f458fab /src/shader_recompiler/ir_opt
parentglsl: Add stubs for sparse queries and variable aoffi when not supported (diff)
downloadyuzu-a0d0704affa0f86ba29ef59d90fa06c1b7c974da.tar
yuzu-a0d0704affa0f86ba29ef59d90fa06c1b7c974da.tar.gz
yuzu-a0d0704affa0f86ba29ef59d90fa06c1b7c974da.tar.bz2
yuzu-a0d0704affa0f86ba29ef59d90fa06c1b7c974da.tar.lz
yuzu-a0d0704affa0f86ba29ef59d90fa06c1b7c974da.tar.xz
yuzu-a0d0704affa0f86ba29ef59d90fa06c1b7c974da.tar.zst
yuzu-a0d0704affa0f86ba29ef59d90fa06c1b7c974da.zip
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) {
case IR::Opcode::ImageGatherDref:
case IR::Opcode::ImageFetch:
case IR::Opcode::ImageQueryDimensions:
- case IR::Opcode::ImageQueryLod:
case IR::Opcode::ImageGradient: {
const TextureType type{inst.Flags<IR::TextureInstInfo>().type};
info.uses_sampled_1d |= type == TextureType::Color1D || type == TextureType::ColorArray1D;
@@ -644,6 +643,15 @@ void VisitUsages(Info& info, IR::Inst& inst) {
inst.GetAssociatedPseudoOperation(IR::Opcode::GetSparseFromOp) != nullptr;
break;
}
+ case IR::Opcode::ImageQueryLod: {
+ const auto flags{inst.Flags<IR::TextureInstInfo>()};
+ const TextureType type{flags.type};
+ info.uses_sampled_1d |= type == TextureType::Color1D || type == TextureType::ColorArray1D;
+ info.uses_shadow_lod |= flags.is_depth != 0;
+ info.uses_sparse_residency |=
+ inst.GetAssociatedPseudoOperation(IR::Opcode::GetSparseFromOp) != nullptr;
+ break;
+ }
case IR::Opcode::ImageRead: {
const auto flags{inst.Flags<IR::TextureInstInfo>()};
info.uses_typeless_image_reads |= flags.image_format == ImageFormat::Typeless;