yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
cd5097449
master
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -g2 -O0 2 3// Test that writes to stand-in proxy variables for an `in` parameter are 4// properly updating the corresponding debug variable for the parameter when 5// debug info is enabled. 6 7//CHECK-COUNT-4: OpStore %_dbgvar_func_value 8 9cbuffer CBuffer 10{ 11 float x; 12} cb; 13 14float Func(float func_value) 15{ 16 func_value = func_value > 10.0f ? func_value + 1.0f : func_value - 1.0f; 17 func_value = sqrt(func_value); 18 func_value = sin(func_value); 19 20 return func_value; 21} 22 23RWBuffer<float> outbuf; 24 25[numthreads(1, 1, 1)] 26void main() 27{ 28 float value = cb.x; 29 30 value = Func(cb.x); 31 32 outbuf[0] = value; 33}