https://github.com/shader-slang/slang
Raw File
Tip revision: 697e7fbbbb5dcb448c03a9887e6ef09e328505ef authored by Tim Foley on 17 August 2020, 22:28:05 UTC
Attempt to fix lookup for members that "override" (#1501)
Tip revision: 697e7fb
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