hal/vulkan: Fix multi draw indirect emulating and respect maxDrawIndirectCount#8665
hal/vulkan: Fix multi draw indirect emulating and respect maxDrawIndirectCount#8665cwfitzgerald merged 2 commits intogfx-rs:trunkfrom
maxDrawIndirectCount#8665Conversation
There was a problem hiding this comment.
I'm not @cwfitzgerald (the current assignee), but: We definitely need test coverage for this. This is fundamental enough to these specific APIs that I'd be shocked if there wasn't a CTS test path we could simply drop into it's necessary.cts_runner/test.lst
EDIT: This isn't covered by CTS, because it ain't WebGPU. 😅
MDI currently isn't in the spec, though there are plans to add it at some point.
+1 |
|
Welp, I'm shocked, and it's my fault. 🤦🏻♂️😆 |
cwfitzgerald
left a comment
There was a problem hiding this comment.
Looks good, lets get some more tests and one quibble
|
Not sure how I should add tests for this as I’m not very familiar with this repository. |
|
Information on the tests are available in https://github.com/gfx-rs/wgpu/blob/trunk/docs/testing.md if you're interested but honestly we can keep his as is for now, landing this fix is more important than getting testing for it. Lets just get that one change implemented and we can land this. |
Description
Noted this when I was checking #8162
The offset argument of
draw_indexed_indirectin hal/vulkan seems incorrect. It should+ i * stride.Also multi draw indirect should respect limits.maxDrawIndirectCount.
Actually,
vkCmdDrawIndirectCountvkCmdDrawIndexedIndirectCountvkCmdDrawMeshTasksIndirectCountEXTalso require that the count in the countBuffer must be <= maxDrawIndirectCount, altough on many devices it'su32::MAX(vulkan gpuinfo)Testing
I assume the code is correct, I don't have a device to test this.
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.