microsoft / microsoft/DirectXShaderCompiler

[SPIR-V] can't decorate a struct or type properly

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

@luciechoi is already working on this.

Since Apr 17, 2026.

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

Description

Doing this:

// declare a GLSL-like block
struct [[vk::ext_decorate(/* Block */ 2)]] SpheresShared
{
    Sphere spheres[9];
};

produces an error saying error: 'ext_decorate' attribute only applies to functions, variables, parameters, fields, and types

godbolt: https://godbolt.org/z/596Pcreaa

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.