yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
8086adc90
master
1//TEST:SIMPLE(filecheck=METAL): -target metal 2//TEST:SIMPLE(filecheck=METALLIB): -target metallib 3 4// METALLIB-NOT: error : 5// METALLIB: @computeMain 6 7// Test that we can compile texture store operations with 2-component vectors 8// without segfaulting. This reproduces the issue where legalizeImageStoreValue 9// would crash when trying to expand a float2 to float4 for Metal texture writes. 10 11RWTexture2D<float2> output; 12 13[shader("compute")] 14[numthreads(32, 32, 1)] 15void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 16{ 17 // This should expand float2(1,2) to float4(1,2,0,0) 18 // METAL: {{.*}}float4(1.0, 2.0, 19 output.Store(dispatchThreadID.xy, float2(1, 2)); 20}