blob: 9020eb8b494559d57c59675bada4e0ad102e39d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//TEST:SIMPLE(filecheck=SPIRV): -target spirv
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry vsMain -stage vertex -emit-spirv-via-glsl
//TEST:SIMPLE(filecheck=GLSL): -target glsl -entry vsMain -stage vertex
// SPIRV: OpDecorate %{{.*}} BuiltIn DrawIndex
// GLSL: gl_DrawID
struct VertexIn
{
float3 position;
int drawIndex : SV_DrawIndex;
}
[shader("vertex")]
float4 vsMain(VertexIn vin) : SV_Position
{
return float4(vin.position, vin.drawIndex);
}
|