yum-mirror/slang

Making it easier to work with shaders

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

Jay KwakFix false negative result for CUDA with recent versions (#7409)63ca2325d

master
791 B21 linesraw
1// syntax-error-intrinsic.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()
16{
17    // Will output what downstream compilers will output as a syntax
18    // error.
19    //CHK:([[#@LINE+1]]): error
20    __SyntaxError();
21}