Skip to content

[SPIR-V] generated SPIR-V is invalid: Result type (OpTypeStruct) does not match the type that results from indexing into the composite (OpTypeStruct). #8244

Description

@alexandreLBarrett

Description
While trying to compile my shader for SPIR-V I get an error regarding two OpTypeStruct that don't match. I get it when trying to assigning a ConstantBuffer to a T in the shader. See Godbolt link for more details.

Steps to Reproduce
See Godbolt link: https://godbolt.org/z/vT9jzazfr

It seems related to the fact there is a nested struct inside another struct used in a ConstantBuffer. They are then incompatible.

Actual Behavior

fatal error: generated SPIR-V is invalid: Result type (OpTypeStruct) does not match the type that results from indexing into the composite (OpTypeStruct).
  %33 = OpCompositeExtract %DirectionalLight_0 %32 0

Environment

  • DXC version 1.8.2505 (Godbolt link), also on 1.9.2602
  • Host Operating System: Windows 11 25H2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugBug, regression, crashspirvWork related to SPIR-V

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions