blob: 0f63b7ce3c9b666c5a695f1298bd650d8c8b0bb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//TEST:SIMPLE(filecheck=CHECK): -target metal
// Test that we can compile texture store operations with 2-component vectors
// without segfaulting. This reproduces the issue where legalizeImageStoreValue
// would crash when trying to expand a float2 to float4 for Metal texture writes.
RWTexture2D<float2> output;
[shader("compute")]
[numthreads(32, 32, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
// This should expand float2(1,2) to float4(1,2,0,0)
// CHECK: {{.*}}float4(1.0, 2.0,
output.Store(dispatchThreadID.xy, float2(1, 2));
}
|