Use of gl_Layer and gl_ViewportIndex in tessellation and vertex shaders should not trigger the addition of the Geometry capability. Fixes #2461 Added tests for use of gl_Layer and gl_ViewportIndex in a tessellation evaluation shader. Several tests for NVIDIA features for tessellation, vertex, or mesh shaders now lose the Geometry or MultiViewport capabilities. This is ok because the functionality is already covered by the ShaderViewportIndexLayerNV capability. The spv.meshShaderPerViewBuiltins.mesh test now fails validation because the validator does not know that PrimitiveId (and possibly other) builtins are enabled by the MeshShadingNV capability. I filed https://github.com/KhronosGroup/SPIRV-Headers/issues/179 to fix the grammar upstream.
31 lines
1.4 KiB
Plaintext
31 lines
1.4 KiB
Plaintext
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
|