Skip to content

[SPIRV] Structs with Bitfields used as input or output consume superfluous locations #7491

Open

Description

@SamCZ

Description
Structs with Bitfields used as input or output consume superfluous locations
and DXC sizeof() knows the size of the struct with bitfields is 4

OpDecorate %in_var_POSITION Location 0
OpDecorate %in_var_BLENDINDICES1 Location 8

Steps to Reproduce
https://godbolt.org/z/xvG64bhP4

Actual Behavior
OpDecorate uses correct location

Environment

  • DXC version 1.5
  • Windows 10

Activity

  1. added
    bug
    needs-triage
    on May 28, 2025
  2. changed the title [-]Structs with Bitfields used as input or output consume superfluous locations[/-] [+][SPIRV] Structs with Bitfields used as input or output consume superfluous locations[/+] on May 29, 2025
  3. s-perron commented on May 29, 2025

    @s-perron
    Collaborator

    I'm guessing the code that assigns the location goes though the members of the struct in away that treats each bitfield as a separate member. The loop that traverse the structs needs to be updated.

  4. s-perron commented on Jan 19, 2026

    @s-perron
    Collaborator

    Nathan Gauër (@Keenuts) We should add testing for this in the offload test suite, and make sure the DXC and clang work properly.

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

Metadata

Metadata

Labels

bugneeds-triagespirv

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions