diff options
Diffstat (limited to 'tests/bugs/array-size-static-const.hlsl')
| -rw-r--r-- | tests/bugs/array-size-static-const.hlsl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/bugs/array-size-static-const.hlsl b/tests/bugs/array-size-static-const.hlsl new file mode 100644 index 000000000..fe15d402d --- /dev/null +++ b/tests/bugs/array-size-static-const.hlsl @@ -0,0 +1,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() +{} |
