summaryrefslogtreecommitdiffstats
path: root/tests/hlsl/simple/compute-numthreads.hlsl
blob: 3c0d8e57b5e4e69eb885ed44724731e506643f14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//TEST:COMPARE_HLSL: -profile cs_5_0 -entry main

// Confirm that we properly pass along the `numthreads` attribute on an entry point.

#ifndef __SLANG__
#define b b_0
#endif

RWStructuredBuffer<float> b;

[numthreads(32,1,1)]
void main(uint3 tid : SV_DispatchThreadID)
{
	b[tid.x] = b[tid.x + 1] + 1.0f;
}