https://github.com/shader-slang/slang
Raw File
Tip revision: 892c4156f9ce8f658a1a7c3bdd9a9ee635b4a87e authored by Yong He on 20 June 2022, 08:33:29 UTC
Fix regression.
Tip revision: 892c415
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