https://github.com/shader-slang/slang
Raw File
Tip revision: 66f9a7cefe351d7e0a27fa77fbfe5ca93f2d8133 authored by Tim Foley on 02 January 2018, 18:44:05 UTC
Bug fix for humane source location computation. (#346)
Tip revision: 66f9a7c
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