$ bin/dxc -T ps_6_0 -E psmain ./test.hlsl -spirv
dxc: /usr/local/google/home/kubak/dxc/DirectXShaderCompiler/include/llvm/Support/Casting.h:96: static bool llvm::isa_impl_cl<clang::FieldDecl, const clang::Decl *>::doit(const From *) [To = clang::FieldDecl, From = const clang::Decl *]: Assertion `Val && "isa<> used on a null pointer"' failed.
[1] 318156 IOT instruction bin/dxc -T ps_6_0 -E psmain ./test5.hlsl -spirv
struct Foo {
float4 a;
int2 b;
};
ConstantBuffer<Foo> myCB2[2][3]: register(b0, space1);
struct VSOutput {
float2 TexCoord : TEXCOORD;
};
float4 psmain(VSOutput input) : SV_TARGET {
return 0;
}
Repro:
This is based on the example in https://docs.microsoft.com/en-us/windows/win32/direct3d12/resource-binding-in-hlsl#constant-buffers.