Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed builtin(primitive_index) for vulkan backend #2716

Merged
merged 5 commits into from
Jun 7, 2022
Merged

Fixed builtin(primitive_index) for vulkan backend #2716

merged 5 commits into from
Jun 7, 2022

Conversation

kwillemsen
Copy link
Contributor

Description

The primitive_index builtin in wgsl was not usable on the vulkan backend, because the adapter did not properly advertise the spirv Geometry capability. This has been fixed by exposing Geometry when the adapter supports SHADER_PRIMITIVE_INDEX.

Testing

Two new unit tests select their fragment shader output based on primitive_index.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

This is really great stuff, the test is especially great! I have one very minor comment and there are CI issues

wgpu/tests/shader_primitive_index/mod.rs Outdated Show resolved Hide resolved
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Great stuff!

@cwfitzgerald
Copy link
Member

Just need conflict resolution and we're good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants