diff options
| author | 2021-05-27 22:28:33 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:36 -0400 | |
| commit | 2a713337165df4d5c4228458999a680e9ab65369 (patch) | |
| tree | 0e820cbfcedaaffafc34b334bd04107a51e2a24d /src/shader_recompiler/backend/glsl/emit_glsl_image.cpp | |
| parent | glsl: remove unused headers (diff) | |
| download | yuzu-2a713337165df4d5c4228458999a680e9ab65369.tar.gz yuzu-2a713337165df4d5c4228458999a680e9ab65369.tar.xz yuzu-2a713337165df4d5c4228458999a680e9ab65369.zip | |
glsl: Fix bindings, add some CC ops
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_image.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_image.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp index 6b7f1eaad..c070fba0e 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp | |||
| @@ -32,14 +32,13 @@ void EmitImageSampleImplicitLod([[maybe_unused]] EmitContext& ctx, [[maybe_unuse | |||
| 32 | if (info.has_lod_clamp) { | 32 | if (info.has_lod_clamp) { |
| 33 | throw NotImplementedException("Lod clamp samples"); | 33 | throw NotImplementedException("Lod clamp samples"); |
| 34 | } | 34 | } |
| 35 | const auto texture{Texture(ctx, info, index)}; | ||
| 35 | if (!offset.IsEmpty()) { | 36 | if (!offset.IsEmpty()) { |
| 36 | throw NotImplementedException("Offset"); | 37 | ctx.AddF32x4("{}=textureOffset({},{},ivec2({}));", inst, texture, coords, |
| 37 | } | 38 | ctx.reg_alloc.Consume(offset)); |
| 38 | if (info.type != TextureType::Color2D) { | 39 | } else { |
| 39 | throw NotImplementedException("Texture type: {}", info.type.Value()); | 40 | ctx.AddF32x4("{}=texture({},{});", inst, texture, coords); |
| 40 | } | 41 | } |
| 41 | const auto texture{Texture(ctx, info, index)}; | ||
| 42 | ctx.AddF32x4("{}=texture({},{});", inst, texture, coords); | ||
| 43 | } | 42 | } |
| 44 | 43 | ||
| 45 | void EmitImageSampleExplicitLod([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 44 | void EmitImageSampleExplicitLod([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |