glslang/Test/spv.viewportindex.tese
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

9 lines
133 B
GLSL

#version 450
#extension GL_ARB_shader_viewport_layer_array : require
layout(triangles) in;
void main() {
gl_ViewportIndex = 1;
}