microsoft / microsoft/DirectXShaderCompiler

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

Open
#7,491 2 comments 0 reactions 1 assignee View on GitHub

@Keenuts is already working on this.

Since Jan 19, 2026.

bug needs-triage spirv
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.