diff options
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | 2 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_image.cpp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 542a79230..4c26f3829 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | |||
| @@ -446,7 +446,7 @@ void EmitYDirection(EmitContext& ctx, IR::Inst& inst) { | |||
| 446 | } | 446 | } |
| 447 | 447 | ||
| 448 | void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst) { | 448 | void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst) { |
| 449 | ctx.AddF32("{}=scaling.y;", inst); | 449 | ctx.AddF32("{}=scaling.z;", inst); |
| 450 | } | 450 | } |
| 451 | 451 | ||
| 452 | void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset) { | 452 | void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset) { |
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 | |||
| 620 | ctx.AddU1("{}=(ftou(scaling.x)&{})!=0;", inst, 1u << image_index); | 620 | ctx.AddU1("{}=(ftou(scaling.x)&{})!=0;", inst, 1u << image_index); |
| 621 | } | 621 | } |
| 622 | 622 | ||
| 623 | void EmitIsImageScaled(EmitContext& ctx, IR::Inst& inst, const IR::Value& index) { | ||
| 624 | if (!index.IsImmediate()) { | ||
| 625 | throw NotImplementedException("Non-constant texture rescaling"); | ||
| 626 | } | ||
| 627 | const u32 image_index{index.U32()}; | ||
| 628 | ctx.AddU1("{}=(ftou(scaling.y)&{})!=0;", inst, 1u << image_index); | ||
| 629 | } | ||
| 630 | |||
| 623 | void EmitBindlessImageSampleImplicitLod(EmitContext&) { | 631 | void EmitBindlessImageSampleImplicitLod(EmitContext&) { |
| 624 | NotImplemented(); | 632 | NotImplemented(); |
| 625 | } | 633 | } |