diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-14 23:09:18 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:27 +0200 |
commit | d8ec99dadaa033aa440671572ed38e2614815e11 (patch) | |
tree | b17186775bbfe5d4c1d135aba73605407d7e080a /src/shader_recompiler/backend/spirv/emit_context.cpp | |
parent | spirv: Fix alpha test (diff) | |
download | yuzu-d8ec99dadaa033aa440671572ed38e2614815e11.tar yuzu-d8ec99dadaa033aa440671572ed38e2614815e11.tar.gz yuzu-d8ec99dadaa033aa440671572ed38e2614815e11.tar.bz2 yuzu-d8ec99dadaa033aa440671572ed38e2614815e11.tar.lz yuzu-d8ec99dadaa033aa440671572ed38e2614815e11.tar.xz yuzu-d8ec99dadaa033aa440671572ed38e2614815e11.tar.zst yuzu-d8ec99dadaa033aa440671572ed38e2614815e11.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_context.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp index 74c42233d..f96d5ae37 100644 --- a/src/shader_recompiler/backend/spirv/emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/emit_context.cpp @@ -1050,8 +1050,15 @@ void EmitContext::DefineOutputs(const Info& info) { const Id type{TypeArray(F32[1], Constant(U32[1], 8U))}; clip_distances = DefineOutput(*this, type, spv::BuiltIn::ClipDistance); } + if (info.stores_layer && + (profile.support_viewport_index_layer_non_geometry || stage == Stage::Geometry)) { + if (stage == Stage::Fragment) { + throw NotImplementedException("Storing Layer in fragment stage"); + } + layer = DefineOutput(*this, U32[1], spv::BuiltIn::Layer); + } if (info.stores_viewport_index && - (profile.support_viewport_index_layer_non_geometry || stage == Shader::Stage::Geometry)) { + (profile.support_viewport_index_layer_non_geometry || stage == Stage::Geometry)) { if (stage == Stage::Fragment) { throw NotImplementedException("Storing ViewportIndex in fragment stage"); } |