diff options
| author | 2021-05-19 02:12:38 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:32 -0400 | |
| commit | 12dcb9fcc256d016a46e15a61d139878fdd5caec (patch) | |
| tree | d8f977700c87fae83b904a9d9de64f07cbb30cf7 /src/shader_recompiler/backend/glasm/emit_glasm_image.cpp | |
| parent | glasm: Implement ImageFetch (diff) | |
| download | yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.tar.gz yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.tar.xz yuzu-12dcb9fcc256d016a46e15a61d139878fdd5caec.zip | |
glasm: Implement ImageQueryLod
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_image.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_image.cpp | 8 |
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& | |||
| 457 | ctx.Add("TXQ {},{},{},{};", inst, lod, texture, type); | 457 | ctx.Add("TXQ {},{},{},{};", inst, lod, texture, type); |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | void EmitImageQueryLod([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 460 | void EmitImageQueryLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, Register coord) { |
| 461 | [[maybe_unused]] const IR::Value& index, [[maybe_unused]] Register coord) { | 461 | const auto info{inst.Flags<IR::TextureInstInfo>()}; |
| 462 | throw NotImplementedException("GLASM instruction"); | 462 | const std::string texture{Texture(ctx, info, index)}; |
| 463 | const std::string_view type{TextureType(info)}; | ||
| 464 | ctx.Add("LOD.F {},{},{},{};", inst, coord, texture, type); | ||
| 463 | } | 465 | } |
| 464 | 466 | ||
| 465 | void EmitImageGradient([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 467 | void EmitImageGradient([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |