summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-06-04 19:24:34 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:37 +0200
commitd41aef03c74e15fb8927bbae741c099694d14e79 (patch)
treeedbfaff57deb949defd033b9c0b60f9373caed65
parentglsl: Add cbuf access workaround for devices with component indexing bug (diff)
downloadyuzu-d41aef03c74e15fb8927bbae741c099694d14e79.tar
yuzu-d41aef03c74e15fb8927bbae741c099694d14e79.tar.gz
yuzu-d41aef03c74e15fb8927bbae741c099694d14e79.tar.bz2
yuzu-d41aef03c74e15fb8927bbae741c099694d14e79.tar.lz
yuzu-d41aef03c74e15fb8927bbae741c099694d14e79.tar.xz
yuzu-d41aef03c74e15fb8927bbae741c099694d14e79.tar.zst
yuzu-d41aef03c74e15fb8927bbae741c099694d14e79.zip
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_image.cpp4
1 files changed, 4 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 6cf0300ab..f022c5f30 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
@@ -343,11 +343,13 @@ void EmitImageGather([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Ins
if (offset.IsEmpty()) {
ctx.AddU1("{}=sparseTexelsResidentARB(sparseTextureGatherARB({},{},{},int({})));",
*sparse_inst, texture, coords, texel, info.gather_component);
+ return;
}
if (offset2.IsEmpty()) {
ctx.AddU1("{}=sparseTexelsResidentARB(sparseTextureGatherOffsetARB({},{},{},{},int({})));",
*sparse_inst, texture, CastToIntVec(coords, info), GetOffsetVec(ctx, offset),
texel, info.gather_component);
+ return;
}
// PTP
const auto offsets{PtpOffsets(offset, offset2)};
@@ -385,11 +387,13 @@ void EmitImageGatherDref([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR:
if (offset.IsEmpty()) {
ctx.AddU1("{}=sparseTexelsResidentARB(sparseTextureGatherARB({},{},{},{}));", *sparse_inst,
texture, coords, dref, texel);
+ return;
}
if (offset2.IsEmpty()) {
ctx.AddU1("{}=sparseTexelsResidentARB(sparseTextureGatherOffsetARB({},{},{},,{},{}));",
*sparse_inst, texture, CastToIntVec(coords, info), dref,
GetOffsetVec(ctx, offset), texel);
+ return;
}
// PTP
const auto offsets{PtpOffsets(offset, offset2)};