blob: a0015b83cb694ab3f31b3d0b900a61f238bee6bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// shader-cache-multiple-entry-points.slang
[shader("compute")]
[numthreads(4, 1, 1)]
void computeA(
uint3 sv_dispatchThreadID: SV_DispatchThreadID,
uniform RWStructuredBuffer<float> buffer)
{
var input = buffer[sv_dispatchThreadID.x];
buffer[sv_dispatchThreadID.x] = input + 1.0f;
}
[shader("compute")]
[numthreads(4, 1, 1)]
void computeB(
uint3 sv_dispatchThreadID: SV_DispatchThreadID,
uniform RWStructuredBuffer<float> buffer)
{
var input = buffer[sv_dispatchThreadID.x];
buffer[sv_dispatchThreadID.x] = input + 2.0f;
}
[shader("compute")]
[numthreads(4, 1, 1)]
void computeC(
uint3 sv_dispatchThreadID: SV_DispatchThreadID,
uniform RWStructuredBuffer<float> buffer)
{
var input = buffer[sv_dispatchThreadID.x];
buffer[sv_dispatchThreadID.x] = input + 3.0f;
}
|