Hello!
from clang/test/CodeGenHLSL/static_global_and_function_in_cb.hlsl
cbuffer {
static float b = 3;
}
This test checks b is correctly emitted as a global variable. But is that even legal?
DXC kinda doesn't allow that for Vulkan: we warn, but compile and then fail validation.
MSDN doesn't mentions that: https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-constants
And since cbuffers are supposed to be a "view" on an external buffer, having a static defined inside doesn't seem right.