Consider https://hlsl.godbolt.org/z/x6sT7baY8:
// -T cs_6_4
cbuffer Bar {
namespace NS {
float i;
}
}
RWStructuredBuffer<float> Out;
[numthreads(1,1,1)]
void main() {
Out[0] = NS::i;
}
As per microsoft/hlsl-specs#671, namespaces nested inside cbuffer decls are allowed. We shouldn't error on them.
The fix should be as simple as updating validateDeclsInsideHLSLBuffer to stop explicitly disallowing them.