return spv::BuiltInCullDistance;
case glslang::EbvViewportIndex:
- builder.addCapability(spv::CapabilityMultiViewport);
+ if (glslangIntermediate->getStage() == EShLangGeometry ||
+ glslangIntermediate->getStage() == EShLangFragment) {
+ builder.addCapability(spv::CapabilityMultiViewport);
+ }
if (glslangIntermediate->getStage() == EShLangVertex ||
glslangIntermediate->getStage() == EShLangTessControl ||
glslangIntermediate->getStage() == EShLangTessEvaluation) {
if (glslangIntermediate->getStage() == EShLangMeshNV) {
return spv::BuiltInLayer;
}
- builder.addCapability(spv::CapabilityGeometry);
+ if (glslangIntermediate->getStage() == EShLangGeometry ||
+ glslangIntermediate->getStage() == EShLangFragment) {
+ builder.addCapability(spv::CapabilityGeometry);
+ }
if (glslangIntermediate->getStage() == EShLangVertex ||
glslangIntermediate->getStage() == EShLangTessControl ||
glslangIntermediate->getStage() == EShLangTessEvaluation) {
--- /dev/null
+spv.layer.tese
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 10
+
+ Capability Tessellation
+ Capability ShaderViewportIndexLayerNV
+ Extension "SPV_EXT_shader_viewport_index_layer"
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint TessellationEvaluation 4 "main" 8
+ ExecutionMode 4 Triangles
+ ExecutionMode 4 SpacingEqual
+ ExecutionMode 4 VertexOrderCcw
+ Source GLSL 450
+ SourceExtension "GL_ARB_shader_viewport_layer_array"
+ Name 4 "main"
+ Name 8 "gl_Layer"
+ Decorate 8(gl_Layer) BuiltIn Layer
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Output 6(int)
+ 8(gl_Layer): 7(ptr) Variable Output
+ 9: 6(int) Constant 1
+ 4(main): 2 Function None 3
+ 5: Label
+ Store 8(gl_Layer) 9
+ Return
+ FunctionEnd
Capability ClipDistance
Capability CullDistance
- Capability MultiViewport
Capability DrawParameters
Capability ShaderViewportMaskNV
Capability MeshShadingNV
spv.meshShaderPerViewBuiltins.mesh
+Validation failed
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 126
- Capability MultiViewport
Capability PerViewAttributesNV
Capability MeshShadingNV
Extension "SPV_NVX_multiview_per_view_attributes"
Capability ClipDistance
Capability CullDistance
- Capability MultiViewport
Capability ShaderViewportMaskNV
Capability MeshShadingNV
Extension "SPV_NV_mesh_shader"
// Generated by (magic number): 8000a
// Id's are bound by 42
- Capability Geometry
Capability Tessellation
Capability ShaderViewportIndexLayerNV
Capability ShaderViewportMaskNV
// Id's are bound by 27
Capability Shader
- Capability Geometry
Capability ShaderViewportIndexLayerNV
Capability ShaderViewportMaskNV
Capability ShaderStereoViewNV
// Generated by (magic number): 8000a
// Id's are bound by 25
- Capability Geometry
Capability Tessellation
- Capability MultiViewport
Capability ShaderViewportIndexLayerNV
Capability ShaderViewportMaskNV
Extension "SPV_EXT_shader_viewport_index_layer"
// Id's are bound by 19
Capability Shader
- Capability Geometry
- Capability MultiViewport
Capability ShaderViewportIndexLayerNV
Capability ShaderViewportMaskNV
Extension "SPV_EXT_shader_viewport_index_layer"
--- /dev/null
+spv.viewportindex.tese
+// Module Version 10000
+// Generated by (magic number): 8000a
+// Id's are bound by 10
+
+ Capability Tessellation
+ Capability ShaderViewportIndexLayerNV
+ Extension "SPV_EXT_shader_viewport_index_layer"
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint TessellationEvaluation 4 "main" 8
+ ExecutionMode 4 Triangles
+ ExecutionMode 4 SpacingEqual
+ ExecutionMode 4 VertexOrderCcw
+ Source GLSL 450
+ SourceExtension "GL_ARB_shader_viewport_layer_array"
+ Name 4 "main"
+ Name 8 "gl_ViewportIndex"
+ Decorate 8(gl_ViewportIndex) BuiltIn ViewportIndex
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Output 6(int)
+8(gl_ViewportIndex): 7(ptr) Variable Output
+ 9: 6(int) Constant 1
+ 4(main): 2 Function None 3
+ 5: Label
+ Store 8(gl_ViewportIndex) 9
+ Return
+ FunctionEnd
--- /dev/null
+#version 450
+
+#extension GL_ARB_shader_viewport_layer_array : require
+
+layout(triangles) in;
+void main() {
+ gl_Layer = 1;
+}
--- /dev/null
+#version 450
+
+#extension GL_ARB_shader_viewport_layer_array : require
+
+layout(triangles) in;
+void main() {
+ gl_ViewportIndex = 1;
+}
"spv.int64.frag",
"spv.intcoopmat.comp",
"spv.intOps.vert",
+ "spv.layer.tese",
"spv.layoutNested.vert",
"spv.length.frag",
"spv.localAggregates.frag",
"spv.terminate.frag",
"spv.precise.tese",
"spv.precise.tesc",
+ "spv.viewportindex.tese",
"spv.volatileAtomic.comp",
"spv.vulkan100.subgroupArithmetic.comp",
"spv.vulkan100.subgroupPartitioned.comp",