yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
c9d89a407
master
1struct input_t { 2 uint32_t i : 8; 3 uint32_t j : 24; 4}; 5 6struct output_t { 7 uint32_t i; 8 uint32_t j; 9}; 10 11uniform void *parameters[1000]; 12 13//TEST:SIMPLE(filecheck=CHECK): -target spirv 14 15//CHECK: OpEntryPoint 16 17[shader("compute")] 18[numthreads(1, 1, 1)] 19void main(uint3 dispatchThreadID: SV_DispatchThreadID, uint groupIndex: SV_GroupIndex) { 20 // buffer 0 is input 21 // buffer 1 is output 22 input_t *input = (input_t *)(parameters[0]); 23 output_t *output = (output_t *)(parameters[1]); 24 25 output->i = input->i; 26 output->j = input->j; 27}