Skip to content

[naga] Test validation of function/entry point name collision. - #9990

Merged
jimblandy merged 1 commit into
gfx-rs:trunkfrom
jimblandy:naga-function-entry-point-name-uniqueness
Aug 3, 2026
Merged

[naga] Test validation of function/entry point name collision.#9990
jimblandy merged 1 commit into
gfx-rs:trunkfrom
jimblandy:naga-function-entry-point-name-uniqueness

Conversation

@jimblandy

Copy link
Copy Markdown
Member

Unlike WGSL, Naga IR permits functions to have conflicting names, and entry points must only have distinct names if they are for the same shader stage. Document and test this.

@ErichDonGubler ErichDonGubler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

praise: The prose description for these test functions are nice, and I wish we did it in more places. It doesn't seem like something likely to bitrot.

Comment thread naga/tests/naga/validation.rs Outdated
Comment thread naga/src/ir/mod.rs
Comment thread naga/tests/naga/validation.rs Outdated
@ErichDonGubler ErichDonGubler self-assigned this Aug 3, 2026
@ErichDonGubler ErichDonGubler added area: validation Issues related to validation, diagnostics, and error handling area: tests Improvements or issues with our test suite naga Shader Translator area: naga processing Passes over IR in the middle labels Aug 3, 2026
@jimblandy
jimblandy force-pushed the naga-function-entry-point-name-uniqueness branch from ec03a1d to a1e643d Compare August 3, 2026 14:49
@jimblandy
jimblandy enabled auto-merge (rebase) August 3, 2026 14:52
Unlike WGSL, Naga IR permits functions to have conflicting names, and
entry points must only have distinct names if they are for the same
shader stage. Document and test this.
@jimblandy
jimblandy force-pushed the naga-function-entry-point-name-uniqueness branch from a1e643d to 619963d Compare August 3, 2026 14:56
@jimblandy
jimblandy merged commit c2d5fa4 into gfx-rs:trunk Aug 3, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: naga processing Passes over IR in the middle area: tests Improvements or issues with our test suite area: validation Issues related to validation, diagnostics, and error handling naga Shader Translator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants