blob: bdc09c7d8a6574821aca96db79453c6d8d72a3a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// uint16-buffer.slang - Simple shader that takes a buffer of uint16 type and increments all elements by 1.
// This is to verify that GFX can correct set correct buffer strides for structured buffer bindings.
uniform RWStructuredBuffer<uint16_t> buffer;
[shader("compute")]
[numthreads(4,1,1)]
void computeMain(
uint3 sv_dispatchThreadID : SV_DispatchThreadID)
{
var input = buffer[sv_dispatchThreadID.x];
buffer[sv_dispatchThreadID.x] = input + 1;
}
|