glslang/Test/baseResults/spv.viewportArray2.vert.out
David Neto fb53f83503
Avoid spuriously adding Geometry capability for vert, tesc, tese (#2462)
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.
2020-11-12 13:00:16 -07:00

46 lines
2.2 KiB
Plaintext

spv.viewportArray2.vert
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 19
Capability Shader
Capability ShaderViewportIndexLayerNV
Capability ShaderViewportMaskNV
Extension "SPV_EXT_shader_viewport_index_layer"
Extension "SPV_NV_viewport_array2"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 11 16 18
Source GLSL 450
SourceExtension "GL_ARB_shader_viewport_layer_array"
SourceExtension "GL_NV_viewport_array2"
Name 4 "main"
Name 11 "gl_ViewportMask"
Name 16 "gl_ViewportIndex"
Name 18 "gl_Layer"
Decorate 11(gl_ViewportMask) BuiltIn ViewportMaskNV
Decorate 16(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 18(gl_Layer) BuiltIn Layer
Decorate 18(gl_Layer) ViewportRelativeNV
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeInt 32 0
8: 7(int) Constant 1
9: TypeArray 6(int) 8
10: TypePointer Output 9
11(gl_ViewportMask): 10(ptr) Variable Output
12: 6(int) Constant 0
13: 6(int) Constant 1
14: TypePointer Output 6(int)
16(gl_ViewportIndex): 14(ptr) Variable Output
17: 6(int) Constant 2
18(gl_Layer): 14(ptr) Variable Output
4(main): 2 Function None 3
5: Label
15: 14(ptr) AccessChain 11(gl_ViewportMask) 12
Store 15 13
Store 16(gl_ViewportIndex) 17
Return
FunctionEnd