diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-04-30 19:37:37 +0200 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-04-30 19:37:37 +0200 |
commit | b566c98258ad368fb1c4b18fa5ffeb51ff4b0efb (patch) | |
tree | 934a5dff2df5c9f94f9cebab58da896d859ad8ca /src/shader_recompiler/backend/spirv | |
parent | Merge pull request #10082 from FernandoS27/the-testers-really-love-chocolate (diff) | |
download | yuzu-b566c98258ad368fb1c4b18fa5ffeb51ff4b0efb.tar yuzu-b566c98258ad368fb1c4b18fa5ffeb51ff4b0efb.tar.gz yuzu-b566c98258ad368fb1c4b18fa5ffeb51ff4b0efb.tar.bz2 yuzu-b566c98258ad368fb1c4b18fa5ffeb51ff4b0efb.tar.lz yuzu-b566c98258ad368fb1c4b18fa5ffeb51ff4b0efb.tar.xz yuzu-b566c98258ad368fb1c4b18fa5ffeb51ff4b0efb.tar.zst yuzu-b566c98258ad368fb1c4b18fa5ffeb51ff4b0efb.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 3 | ||||
-rw-r--r-- | src/shader_recompiler/backend/spirv/spirv_emit_context.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index 0cd87a48f..fee510f7b 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp @@ -473,7 +473,8 @@ void EmitSetFragColor(EmitContext& ctx, u32 index, u32 component, Id value) { } void EmitSetSampleMask(EmitContext& ctx, Id value) { - ctx.OpStore(ctx.sample_mask, value); + const Id pointer{ctx.OpAccessChain(ctx.output_u32, ctx.sample_mask, ctx.u32_zero_value)}; + ctx.OpStore(pointer, value); } void EmitSetFragDepth(EmitContext& ctx, Id value) { diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp index d48d4860e..47739794f 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp @@ -1572,7 +1572,8 @@ void EmitContext::DefineOutputs(const IR::Program& program) { Decorate(frag_depth, spv::Decoration::BuiltIn, spv::BuiltIn::FragDepth); } if (info.stores_sample_mask) { - sample_mask = DefineOutput(*this, U32[1], std::nullopt); + const Id array_type{TypeArray(U32[1], Const(1U))}; + sample_mask = DefineOutput(*this, array_type, std::nullopt); Decorate(sample_mask, spv::Decoration::BuiltIn, spv::BuiltIn::SampleMask); } break; |