https://github.com/shader-slang/slang
Raw File
Tip revision: de6ca4df6668aa4f3f5113410e2e898e37cd7bc4 authored by jsmall-nvidia on 07 November 2018, 00:17:10 UTC
Made sameStageSpecifiedMoreThanOnce a warning instead of an error. (#714)
Tip revision: de6ca4d
array-size-static-const.hlsl
// array-size-static-const.hlsl
//TEST:COMPARE_HLSL: -profile cs_5_0

// 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()
{}
back to top