Skip to content

Move Features::PRIMITIVE_INDEX into the WebGPU group #9101

Merged
andyleiserson merged 1 commit intogfx-rs:trunkfrom
andyleiserson:jj-push-vpyr
Mar 13, 2026
Merged

Move Features::PRIMITIVE_INDEX into the WebGPU group #9101
andyleiserson merged 1 commit intogfx-rs:trunkfrom
andyleiserson:jj-push-vpyr

Conversation

@andyleiserson
Copy link
Contributor

@andyleiserson andyleiserson commented Feb 24, 2026

Will conflict with #9119 and #9163.

Renames Features::SHADER_PRIMITIVE_INDEX to Features::PRIMITIVE_INDEX (for consistency with the spec, which uses shader_f16 but not shader_primitive_index), and moves it to the WebGPU feature set.

Putting it in the WebGPU feature set results in it being exposed by Deno and available in CTS runs, so, enable the CTS tests for primitive_index. I've also added a cts_runner integration test that checks the feature is exposed, because the CTS silently skips the relevant tests if it is not.

I've also reworded the changelog entry related to enable primitive_index, but the actual functional change was in #8879.

CC @inner-daemons

Squash or Rebase? Squash

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

Copy link
Collaborator

@inner-daemons inner-daemons left a comment

Choose a reason for hiding this comment

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

Yeah LGTM for the most part.

@andyleiserson andyleiserson marked this pull request as draft February 24, 2026 18:53
@andyleiserson
Copy link
Contributor Author

I've marked this as draft because the CTS failures in CI appear real, and I don't have time to debug them right now.

#9105 is a failure related to primitive_index on DX12
#9106 is a failure elsewhere in the fragment_builtins suite on DX12 and Vulkan, doesn't necessarily need to be fixed if we enable only the primitive index tests

@andyleiserson
Copy link
Contributor Author

#9105 was resolved by switching to DXC. #9106 remains, so I've only added to test.lst the tests in fragment_builtins that are currently passing (which includes all primitive_index tests).

@andyleiserson andyleiserson marked this pull request as ready for review March 11, 2026 00:11
@inner-daemons
Copy link
Collaborator

@andyleiserson If there are bugs on FXC, should we not expose the feature on FXC?

@andyleiserson
Copy link
Contributor Author

should we not expose the feature on FXC?

My inclination is that it's not worth the trouble (we don't know whether it's a wgpu bug or an FXC bug, and we don't know what the impact of the bug is), that we can just leave it until there is a complaint. But I don't feel strongly about that -- Firefox cares mostly about DXC.

I guess another option would be to note in the changelog that there may be issues on FXC.

@inner-daemons
Copy link
Collaborator

I'm mainly worried that if this is a wgpu bug then it could still cause problems when using DXC, but I have no idea. I haven't looked at what shaders are involved in the tests.

@teoxoy
Copy link
Member

teoxoy commented Mar 13, 2026

Changes look good, I reopened #9105 as it's marked as an FXC issue. If people want to investigate fixing it.

@andyleiserson andyleiserson merged commit ca3239e into gfx-rs:trunk Mar 13, 2026
59 checks passed
@andyleiserson andyleiserson deleted the jj-push-vpyr branch March 13, 2026 20:52
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.

3 participants