diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-05-31 07:12:52 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:37 +0200 |
commit | 3a024b302622068f4842715a7f0b31652898a606 (patch) | |
tree | d49557bf93c1a201c535db48c203b3331e4cec91 /src/shader_recompiler/backend/glsl/emit_glsl_image.cpp | |
parent | glsl: SHFL fix and prefer shift operations over divide in glsl shader (diff) | |
download | yuzu-3a024b302622068f4842715a7f0b31652898a606.tar yuzu-3a024b302622068f4842715a7f0b31652898a606.tar.gz yuzu-3a024b302622068f4842715a7f0b31652898a606.tar.bz2 yuzu-3a024b302622068f4842715a7f0b31652898a606.tar.lz yuzu-3a024b302622068f4842715a7f0b31652898a606.tar.xz yuzu-3a024b302622068f4842715a7f0b31652898a606.tar.zst yuzu-3a024b302622068f4842715a7f0b31652898a606.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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp index eb427d8b5..f339f4ade 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp @@ -71,7 +71,7 @@ std::string PtpOffsets(const IR::Value& offset, const IR::Value& offset2) { const std::array values{offset.InstRecursive(), offset2.InstRecursive()}; if (!values[0]->AreAllArgsImmediates() || !values[1]->AreAllArgsImmediates()) { // LOG_WARNING("Not all arguments in PTP are immediate, STUBBING"); - return ""; + return "ivec2[](ivec2(0), ivec2(1), ivec2(2), ivec2(3))"; } const IR::Opcode opcode{values[0]->GetOpcode()}; if (opcode != values[1]->GetOpcode() || opcode != IR::Opcode::CompositeConstructU32x4) { @@ -340,8 +340,8 @@ void EmitImageFetch([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst *sparse_inst, texture, CastToIntVec(coords, info), lod, CastToIntVec(offset, info), texel); } else { - ctx.AddU1("{}=sparseTexelsResidentARB(sparseTexelFetchARB({},{},{},{}));", *sparse_inst, - texture, CastToIntVec(coords, info), lod, texel); + ctx.AddU1("{}=sparseTexelsResidentARB(sparseTexelFetchARB({},{},int({}),{}));", + *sparse_inst, texture, CastToIntVec(coords, info), lod, texel); } } |