Add inherited Bind Groups to Render Bundles.#5185
Conversation
|
Previews, as seen when this build job started (2cb07ab): |
dff7316 to
0bc869f
Compare
|
Alright, I think this is ready for initial review. Still a few bits that are more handwavy than I'd like, but I want to get some feedback before trying to upend anything. |
| : <dfn>\[[dynamic_offsets]]</dfn>, of type [=ordered map=]<{{GPUIndex32}}, [=list=]<{{GPUBufferDynamicOffset}}>>, initally empty | ||
| :: | ||
| The current dynamic offsets for each {{GPUBindingCommandsMixin/[[bind_groups]]}} entry. | ||
|
|
There was a problem hiding this comment.
Maybe we could replace [[bind_groups]] with [[bind_groups_layouts]] or track both? This could avoid the need for placeholder bind groups as a concept. WDYT?
There was a problem hiding this comment.
I wondered about that myself. I'll take a pass at it and see how complicated it would be.
| boolean stencilReadOnly = false; | ||
|
|
||
| // Requires "interited-bundle-bind-groups" feature. | ||
| sequence<GPURenderBundleInheritedBindGroupEntry> inheritedBindGroups = []; |
There was a problem hiding this comment.
Alternatively we could match GPUPipelineLayoutDescriptor with sequece<GPUBindGroupLayout?>. This would force that the inherited bindgroups are a prefix of all the groups, that is you can inherit groups 0 , 1, 2 but not just 0, 2. This would be a useful way to encode in the API that the groups should be ordered from less frequently changed to more frequently changed.
|
@toji In JavaScript code using this feature, Is the only visible change the inclusion of an |
GPU Web WG 2025-05-14 Atlantic-time
|
WIP change to add inherited bind groups. I'd appreciate some feedback!
The bit I feel the most uncertain about at this point is the kinda hand-wavy "placeholder bind group" concept. I'm not sure it holds up very well under rigorous examination of all uses of bind groups, but I'm also not sure how to address it better without creating a new branch in effectively every encoder algorithm that touches bind groups saying "But IF it's an inherited group do this separate thing instead with the layout..."☹️
#5171