yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

CopilotFix SV_VertexID and SV_InstanceID crash with -preserve-params in SPIR-V emitter (#7691)aa3cc1e79

master
500 B13 linesraw
1//TEST:SIMPLE(filecheck=SPIRV): -entry VertexMain -stage vertex -target spirv -preserve-params
2//TEST:SIMPLE(filecheck=SPIRV): -entry VertexMain -stage vertex -target spirv -emit-spirv-directly -preserve-params
3
4// Test for https://github.com/shader-slang/slang/issues/7689
5// SV_VertexID combined with -preserve-params should not crash
6
7// SPIRV: OpEntryPoint
8
9[shader("vertex")]
10float4 VertexMain(uint vertexId: SV_VertexID, uint instanceId: SV_InstanceID) : SV_Position
11{
12    return float4(0.0);
13}