Uniform buffer and bind group that one textured quad keeps across frames, so drawing it again with unchanged inputs writes no buffer and creates no bind group.
More...
|
|
| RetainedQuadBinding (const RetainedQuadBinding &)=delete |
|
RetainedQuadBinding & | operator= (const RetainedQuadBinding &)=delete |
|
| RetainedQuadBinding (RetainedQuadBinding &&) noexcept=default |
| | Move constructor.
|
|
RetainedQuadBinding & | operator= (RetainedQuadBinding &&) noexcept=default |
| | Move assignment.
|
|
bool | holdsTextureViews () const |
| | Whether this binding holds a texture view or a bind group naming one.
|
| bool | viewsTexture (const gpu::ResourceIdentity &texture) const |
| | Whether this binding holds a view of the texture texture, as its source, mask or backdrop.
|
| bool | bindsClipMaskView (const gpu::ResourceIdentity &view) const |
| | Whether this binding's bind group names the clip-mask view view. The binding does not own that view, so its owner must release this binding's views before it drops the view.
|
| void | releaseTextureViews () |
| | Release the texture views and the bind group, keeping the uniform buffer and the bytes it holds.
|
Uniform buffer and bind group that one textured quad keeps across frames, so drawing it again with unchanged inputs writes no buffer and creates no bind group.
The bind group is reused only with the exact textures and clip-mask view it was built from. Each texture is matched by its runtime identity, a slot plus a generation that no later texture ever takes, so a reused bind group cannot sample a texture that was destroyed, nor one whose slot now holds a different texture. A texture returned to a pool and handed out again keeps its identity, so a caller must only pass a binding when the quad's current owner rendered the texture's contents for this draw. The uniform buffer is rewritten only when the quad's uniform bytes change.
A binding serves at most one draw per frame: its uniform write reaches the queue ahead of the frame's command buffers, so a second draw recorded in the same frame would make the first read the second's bytes.