https://github.com/shader-slang/slang
Raw File
Tip revision: ace9a8dc7e4353b1cf8e846abe2b8dc53ecdbc59 authored by Yong He on 25 May 2018, 14:01:34 UTC
Fixes 574. Eliminate empty structs during type legalization (#577)
Tip revision: ace9a8d
array-size-static-const.hlsl
// array-size-static-const.hlsl
//TEST:COMPARE_HLSL: -profile cs_5_0 -target dxbc-assembly

// 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