summaryrefslogtreecommitdiff
path: root/tests/bugs/array-size-static-const.hlsl
blob: fe15d402d566898810a774a4e4a63f43189e3430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// array-size-static-const.hlsl
//TEST:COMPARE_HLSL: -profile cs_5_0 -target dxbc-assembly

// The bug in this case is that were have a (hidden)
// cast from the `uint` constant to `int` to get
// the size of the array, and this cast was tripping
// up the constant-folding logic.

static const uint n = 16;
groupshared float b[n];

[numthreads(1,1,1)]
void main()
{}