spirv: Add SpvCapabilityShaderViewportIndexLayerEXT

This capability allows gl_ViewportIndex and gl_Layer to also be used
as outputs in Vertex and Tesselation shaders.

v2: Make conditional to the capability, add gl_Layer, add tesselation
    shaders. (Iago)

v3: Don't export to tesselation control shader.

v4: Add Reviewd-by tag.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2018-03-05 13:58:11 -08:00
committed by Samuel Iglesias Gonsálvez
parent 487f8d48c9
commit c17808562e
3 changed files with 13 additions and 0 deletions

View File

@@ -3203,6 +3203,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spv_check_supported(storage_16bit, cap);
break;
case SpvCapabilityShaderViewportIndexLayerEXT:
spv_check_supported(shader_viewport_index_layer, cap);
break;
default:
vtn_fail("Unhandled capability");
}