wgpu-py icon indicating copy to clipboard operation
wgpu-py copied to clipboard

multi_draw_indirect_counter

Open fyellin opened this issue 1 year ago • 7 comments

Implementation of the final two functions. Fix some typos I had previous made.

fyellin avatar Sep 20 '24 07:09 fyellin

This code is working now, but it wasn't working an hour ago, and I didn't really do anything to fix it. I want to make sure I understand what's going on before this is merged. But it's rather straightforward code.

fyellin avatar Sep 20 '24 07:09 fyellin

The naga bug is back.

fyellin avatar Sep 20 '24 17:09 fyellin

This code is waiting for a new wgpu-native-lib to include:

https://github.com/gfx-rs/wgpu-native/pull/432 https://github.com/gfx-rs/wgpu/pull/6194

We pull directly from wpgu-native, so their next update should include the change. I'm not sure how wgpu-native decides which version of wgpu to use.

fyellin avatar Oct 01 '24 05:10 fyellin

I'm not sure how wgpu-native decides which version of wgpu to use.

Here's an example: https://github.com/gfx-rs/wgpu-native/pull/402 Basically bumping versions in cargo.toml and then making the necessary changes. It usually updates for each release of wgpu-core.

almarklein avatar Oct 01 '24 07:10 almarklein

@almarklein.

I ask because it seems that tag 22.1.0.5 was created on gfx-rs/wgpu-native on Sept 12.

Meanwhile I don't see any tags on gfx-rs/wgpu, and the fix was merged into "trunk" on Sept 2. But it doesn't seem to have made it into the build of lib-native.

fyellin avatar Oct 01 '24 23:10 fyellin

That's correct. The latest tag from wgpu-core is 22.1.0. The versioning of wgpu-native is to take the version of wgpu-core and add a fourth number to it. We've had a few releases (22.1.0.x) for bugfixes and changes to how the binary archives are composed.

almarklein avatar Oct 02 '24 07:10 almarklein

I've confirmed that this code works with a patched wgpu. I've tried it out both on emulated GPUs and on real GPUs.

I just need to wait for us to catch up.

fyellin avatar Oct 10 '24 23:10 fyellin

Do we have any news as to when there will be a new wgpu-native? This PR needs big foxes there in order to work.

fyellin avatar Nov 08 '24 00:11 fyellin

I see that gfx-rs/wgpu has just released v 23.0.0. Now I just need to wait for wgpu-native to incorporate that, and then for us to incorporate wgpu-native.

fyellin avatar Nov 08 '24 03:11 fyellin

The work has started some time ago: https://github.com/gfx-rs/wgpu-native/pull/441

almarklein avatar Nov 08 '24 11:11 almarklein

I compiled that PR along with its wgpu.h and webgpu.h, and ran it against our test suite. Almost everything worked perfectly. The only issues were that some error messages changed slightly (our tests looked for the exact test of the error message), and that the output of GlobalReport has changed so that test_objects and test_destroy weren't working.

I did it on a Mac, so couldn't test multi draw, but I'll try again later on a Linux.

So I'm hoping our porting efforts will be easy.

On Fri, Nov 8, 2024 at 3:11 AM Almar Klein @.***> wrote:

The work has started some time ago: gfx-rs/wgpu-native#441 https://github.com/gfx-rs/wgpu-native/pull/441

— Reply to this email directly, view it on GitHub https://github.com/pygfx/wgpu-py/pull/594#issuecomment-2464432319, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABC2LILGB24LS7BYUIW5IW3Z7SL7DAVCNFSM6AAAAABOROUHDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRUGQZTEMZRHE . You are receiving this because you authored the thread.Message ID: @.***>

fyellin avatar Nov 09 '24 17:11 fyellin