yum-mirror/slang

Making it easier to work with shaders

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

Gangzheng TongAdd check for the variable requirement (#6677)da5cf478c

master
509 B15 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target wgsl -entry Main -stage compute
2//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target wgsl -entry Main -stage compute -ignore-capabilities
3
4[require(cpp_cuda_glsl_hlsl_metal_spirv)]
5Buffer<float> InputTyped;
6[require(cpp_cuda_glsl_hlsl_metal_spirv)]
7RWBuffer<float> OutputTyped;
8
9//CHECK: ([[# @LINE+3]]): error 36107
10//CHECK_IGNORE_CAPS-NOT: error 36107
11[numthreads(64, 1, 1)]
12void Main(uint3 DTid : SV_DispatchThreadID)
13{
14    OutputTyped[DTid.x] = InputTyped[DTid.x];
15}