https://github.com/shader-slang/slang
Raw File
Tip revision: d3e255b31b39c9a8979a60023269567078d9dce3 authored by Tim Foley on 15 October 2020, 20:13:49 UTC
Fix a bug in IR lowering (#1578)
Tip revision: d3e255b
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