Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
uint func(uint3 dispatch)
{
[loop]
for (int i = 0; i < 10; i++)
{
[loop]
for (int j = 0; j < 20; j++)
{
[branch]
if (dispatch.y < 10)
return 50;
[branch]
if (dispatch.z < 10)
return 70;
dispatch.y++;
}
dispatch.x++;
}
return 80;
}
RWStructuredBuffer<uint> buf : register(u0);
[numthreads(1, 1, 1)]
void main(uint3 dispatch : SV_DispatchThreadID)
{
buf[dispatch.x] = func(dispatch);
}