yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
63ca2325d
master
1// syntax-error-op-line.slang 2 3// NOTE! That although this is a 'diagnostic' like test, it tests using downstream compiler 4// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that 5// those tests are made. 6 7//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target spirv -emit-spirv-via-glsl 8//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxil -profile cs_6_0 9//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxbc 10//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target shader-dll 11//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target ptx 12 13[shader("compute")] 14[numthreads(4, 1, 1)] 15void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 16{ 17 int id = int(dispatchThreadID.x); 18 19 int v = int(dispatchThreadID.y); 20 21 //CHK:([[#@LINE+1]]): error 22 v += id + __SyntaxError(); 23}