yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
9a23a9aab
master
1//TEST:SIMPLE(filecheck=CHECK): -profile spirv_1_5+fragment -entry main -target spirv-assembly 2//TEST:SIMPLE(filecheck=GLSL): -profile spirv_1_5+fragment -entry main -target glsl 3 4// Ensure that we add the `GL_EXT_nonuniform_qualifier` extension for any code that uses unbounded-size arrays of resources. 5 6// CHECK: OpCapability RuntimeDescriptorArray 7// GLSL: #extension GL_EXT_nonuniform_qualifier : require 8 9Texture2D t[]; 10SamplerState s; 11 12cbuffer C 13{ 14 float2 uv; 15 uint index; 16} 17 18float4 main() : SV_Target 19{ 20 return t[index].Sample(s, uv); 21}