yum-mirror/slang

Making it easier to work with shaders

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

Yong HeMake `-no-mangle` option work, add `-no-hlsl-binding`. (#3817)a23adc221

master
457 B26 linesraw
1//TEST:COMPARE_HLSL: -profile cs_5_0
2//TEST:COMPARE_HLSL: -profile cs_5_0 -verify-debug-serial-ir
3
4// Check output for `[allow_uav_conditional]`
5
6#ifndef __SLANG__
7#define gBuffer gBuffer_0
8#endif
9
10RWStructuredBuffer<uint> gBuffer : register(u0);
11
12[numthreads(16,1,1)]
13void main(
14	uint tid : SV_DispatchThreadID)
15{
16	uint index = tid;
17
18	[allow_uav_condition]
19	for(;;)
20	{
21		if(gBuffer[index] == 0)
22			break;
23		index = gBuffer[index];
24		gBuffer[index]--;
25	}
26}