summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/spirv/emit_context.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-04-16 16:31:15 -0300
committerGravatar ameerj2021-07-22 21:51:28 -0400
commite3514bcd6b09f623da14c4f3c4ffd988e75577ed (patch)
tree8c7e375472cb6b654b9d462ae4a9b51575c38b93 /src/shader_recompiler/backend/spirv/emit_context.cpp
parentspirv: Bitcast non-F32 attributes to F32 (diff)
downloadyuzu-e3514bcd6b09f623da14c4f3c4ffd988e75577ed.tar.gz
yuzu-e3514bcd6b09f623da14c4f3c4ffd988e75577ed.tar.xz
yuzu-e3514bcd6b09f623da14c4f3c4ffd988e75577ed.zip
spirv: Implement ViewportMask with NV_viewport_array2
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_context.cpp')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp
index 3946dab14..2f8678b4e 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_context.cpp
@@ -457,6 +457,7 @@ void EmitContext::DefineCommonTypes(const Info& info) {
457 input_s32 = Name(TypePointer(spv::StorageClass::Input, TypeInt(32, true)), "input_s32"); 457 input_s32 = Name(TypePointer(spv::StorageClass::Input, TypeInt(32, true)), "input_s32");
458 458
459 output_f32 = Name(TypePointer(spv::StorageClass::Output, F32[1]), "output_f32"); 459 output_f32 = Name(TypePointer(spv::StorageClass::Output, F32[1]), "output_f32");
460 output_u32 = Name(TypePointer(spv::StorageClass::Output, U32[1]), "output_u32");
460 461
461 if (info.uses_int8) { 462 if (info.uses_int8) {
462 AddCapability(spv::Capability::Int8); 463 AddCapability(spv::Capability::Int8);
@@ -1131,6 +1132,9 @@ void EmitContext::DefineOutputs(const IR::Program& program) {
1131 } 1132 }
1132 viewport_index = DefineOutput(*this, U32[1], invocations, spv::BuiltIn::ViewportIndex); 1133 viewport_index = DefineOutput(*this, U32[1], invocations, spv::BuiltIn::ViewportIndex);
1133 } 1134 }
1135 if (info.stores_viewport_mask && profile.support_viewport_mask) {
1136 viewport_mask = DefineOutput(*this, TypeArray(U32[1], Constant(U32[1], 1u)), std::nullopt);
1137 }
1134 for (size_t index = 0; index < info.stores_generics.size(); ++index) { 1138 for (size_t index = 0; index < info.stores_generics.size(); ++index) {
1135 if (info.stores_generics[index]) { 1139 if (info.stores_generics[index]) {
1136 DefineGenericOutput(*this, index, invocations); 1140 DefineGenericOutput(*this, index, invocations);