diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-08-01 23:57:45 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:29 +0100 |
commit | e66d5b88a6f1c2d85c5cd8e351c6ed52c96a0ecf (patch) | |
tree | 0107548906df0b9d42e89451489be6a54ed71bf3 /src/shader_recompiler/backend/glsl/emit_glsl_image.cpp | |
parent | shader: Properly blacklist and scale image loads (diff) | |
download | yuzu-e66d5b88a6f1c2d85c5cd8e351c6ed52c96a0ecf.tar yuzu-e66d5b88a6f1c2d85c5cd8e351c6ed52c96a0ecf.tar.gz yuzu-e66d5b88a6f1c2d85c5cd8e351c6ed52c96a0ecf.tar.bz2 yuzu-e66d5b88a6f1c2d85c5cd8e351c6ed52c96a0ecf.tar.lz yuzu-e66d5b88a6f1c2d85c5cd8e351c6ed52c96a0ecf.tar.xz yuzu-e66d5b88a6f1c2d85c5cd8e351c6ed52c96a0ecf.tar.zst yuzu-e66d5b88a6f1c2d85c5cd8e351c6ed52c96a0ecf.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_image.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_image.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp index 82b6f0d77..2f78d0267 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp @@ -620,6 +620,14 @@ void EmitIsTextureScaled(EmitContext& ctx, IR::Inst& inst, const IR::Value& inde ctx.AddU1("{}=(ftou(scaling.x)&{})!=0;", inst, 1u << image_index); } +void EmitIsImageScaled(EmitContext& ctx, IR::Inst& inst, const IR::Value& index) { + if (!index.IsImmediate()) { + throw NotImplementedException("Non-constant texture rescaling"); + } + const u32 image_index{index.U32()}; + ctx.AddU1("{}=(ftou(scaling.y)&{})!=0;", inst, 1u << image_index); +} + void EmitBindlessImageSampleImplicitLod(EmitContext&) { NotImplemented(); } |