summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-19 07:12:38 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:32 +0200
commit12dcb9fcc256d016a46e15a61d139878fdd5caec (patch)
treed8f977700c87fae83b904a9d9de64f07cbb30cf7
parentglasm: Implement ImageFetch (diff)
downloadyuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.tar
yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.tar.gz
yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.tar.bz2
yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.tar.lz
yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.tar.xz
yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.tar.zst
yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.zip
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_image.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
index 333a003c9..747af84fe 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
@@ -457,9 +457,11 @@ void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst& inst, const IR::Value&
ctx.Add("TXQ {},{},{},{};", inst, lod, texture, type);
}
-void EmitImageQueryLod([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
- [[maybe_unused]] const IR::Value& index, [[maybe_unused]] Register coord) {
- throw NotImplementedException("GLASM instruction");
+void EmitImageQueryLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, Register coord) {
+ const auto info{inst.Flags<IR::TextureInstInfo>()};
+ const std::string texture{Texture(ctx, info, index)};
+ const std::string_view type{TextureType(info)};
+ ctx.Add("LOD.F {},{},{},{};", inst, coord, texture, type);
}
void EmitImageGradient([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,