blob: 49ce8e6a1c795658e91049c15550aa954f52bf80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// gather-texture2darray.slang
//TEST:CROSS_COMPILE: -target dxbc -profile sm_5_1 -entry main -stage compute
// Test gathering from a `Texture2DArray`
Texture2DArray<uint> t;
SamplerState s;
RWBuffer<uint4> b;
[shader("compute")]
[numthreads(32, 1, 1)]
void main(uint3 tid : SV_DispatchThreadID)
{
b[tid.x] = t.Gather(s, tid);
}
|