Does instance_index
work on Metal ?
#4928
olofwalker
started this conversation in
General
Replies: 2 comments 1 reply
-
It should, could you locally run our test for this thing. cargo install cargo-nextest
// in wgpu checkout
cargo xtask test vertex_indices |
Beta Was this translation helpful? Give feedback.
0 replies
-
@cwfitzgerald Thanks, this works, and I quickly discovered the problem when running my code. My buffer holding The question is, why is there a need for two different functions doing in essences the same thing? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have rewritten my rendering pipeline to use
DrawIndexedIndirect
and rely oninstance_index
being set tobase_instance
to correctly index arrays with transforms and other stuff in the shader.However, I can't get it to work, it seems like the builtin
instance_index
is always zero.This is how the vertex shader entrypoint looks like
Here is how I create the indirect commands
And yes, I have enabled the non-zero based instance index feature
Is anyone else seeing this?
Specs: Macos Sonoma, Rust 1.72, WGPU 0.18
Beta Was this translation helpful? Give feedback.
All reactions