summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv/emit_spirv.cpp
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-04-01 08:34:45 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:25 +0200
commitd819ba4489b90955286341c739083e638173b938 (patch)
treec0210cabb9dd5a0a7ee3df3a4c36c4135c51ac91 /src/shader_recompiler/backend/spirv/emit_spirv.cpp
parentshader: Stub TLD4's PTP when it isn't constant (diff)
downloadyuzu-d819ba4489b90955286341c739083e638173b938.tar
yuzu-d819ba4489b90955286341c739083e638173b938.tar.gz
yuzu-d819ba4489b90955286341c739083e638173b938.tar.bz2
yuzu-d819ba4489b90955286341c739083e638173b938.tar.lz
yuzu-d819ba4489b90955286341c739083e638173b938.tar.xz
yuzu-d819ba4489b90955286341c739083e638173b938.tar.zst
yuzu-d819ba4489b90955286341c739083e638173b938.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp
index b8e3b8527..cc6b98f7e 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp
@@ -225,6 +225,16 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct
ctx.AddExtension("SPV_EXT_demote_to_helper_invocation");
ctx.AddCapability(spv::Capability::DemoteToHelperInvocationEXT);
}
+ if (info.stores_viewport_index) {
+ ctx.AddCapability(spv::Capability::MultiViewport);
+ if (profile.support_viewport_index_layer_non_geometry &&
+ ctx.stage == Shader::Stage::VertexB) {
+ ctx.AddExtension("SPV_EXT_shader_viewport_index_layer");
+ ctx.AddCapability(spv::Capability::ShaderViewportIndexLayerEXT);
+ } else {
+ ctx.ignore_viewport_layer = true;
+ }
+ }
if (!profile.support_vertex_instance_id && (info.loads_instance_id || info.loads_vertex_id)) {
ctx.AddExtension("SPV_KHR_shader_draw_parameters");
ctx.AddCapability(spv::Capability::DrawParameters);