Setting vertex/index buffers to null?

13 views
Skip to first unread message

Mark Sibly

unread,
May 18, 2024, 7:05:24 PMMay 18
to Dawn Graphics
Hi,

I'm just messing around, and it appears that it's OK to set a render pass vertex buffers to nullptr (as long as it's not used in the pipeline) but not the index buffer.

Not a big deal, just curious what the rules are for using nullptr here?

Bye,
Mark

Corentin Wallez

unread,
May 20, 2024, 10:39:50 AMMay 20
to Mark Sibly, Dawn Graphics
Hey Mark,

Being able to unset vertex buffers was added as part of the addition of maxBindGroupsPlusVertexBuffers to allow unsetting vertex buffers and going back under the limit. (For Dawn this limit does nothing and is not even validated because you can't reach it). There were discussions about allowing to unset other things like index buffers but people didn't want to add this capability yet.

The JS spec which is the source of truth for validation details like this shows the index buffer in setIndexBuffer as not nullable but just below shows it nullable for vertex buffers. That's how you can tell the rules.

Hope this helps,

Corentin

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/56cd038d-6860-4184-9d4e-dce70087d147n%40googlegroups.com.

Mark Sibly

unread,
May 20, 2024, 10:02:07 PMMay 20
to Corentin Wallez, Dawn Graphics
> The JS spec which is the source of truth for validation details like this

D'oh, of course it is, thanks!

Bye,
Mark



Reply all
Reply to author
Forward
0 new messages