[wgsl] gate primitive_index built-in behind its extension & [glsl-out] require extensions for gl_PrimitiveID if needed#8879
Conversation
|
CI is unhappy, I think because we try to use the builtin in mesh shaders but it's behind its own feature. I think we need to allow usage of the builtin within mesh shaders but also as an input of a fragment shader (that has a mesh shader before it) even if the |
|
@teoxoy Yep I jumped the gun on re-requesting a review. Should be good to go now? |
|
I guess that works but is it intended that mesh shaders require |
|
Github was having some issues and the CI workflows got cancelled, could you force push? |
I mean it's not ideal but it's also not the end of the world. Primitive index in mesh shaders is questionably useful anyway, it basically only exists to let you work with existing fragment shaders to my knowledge. You can achieve the exact same thing with a per-primitive u32. Adding complex logic to decide on which extension to use is probably not worth it. |
primitive_index built-in behind its extension & [glsl-out] require extensions for gl_PrimitiveID if needed
Connections
Closes #8236
Fixes #4413
Description
Adds support for the extension and cleans up some implementation on backends
Testing
Tested using snapshots & other tests
Squash or Rebase?
Squash
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.