https://github.com/shader-slang/slang
Raw File
Tip revision: 10470f8796de5b4fe48a83d50cda75a4188c06e3 authored by Yong He on 25 January 2022, 23:34:34 UTC
gfx: Allow null entries in shader table. (#2096)
Tip revision: 10470f8
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