refactor: Parameterize type of hal::BufferBinding::size; resolve sizes in core

For storage and uniform buffer bindings, the size is a `wgt::BufferSize`
(`NonZeroU64`). For vertex and index buffer bindings, the size is a 
`wgt::BufferAddress` (regular `u64`).

Temporarily breaks some zero-size vertex/index binding cases that worked
before (end of buffer); will be resolved in an immediate follow-up
commit that fully implements zero-size vertex/index binding support.
This commit is contained in:
Andy Leiserson committed 2026-09-08 15:07:15 -07:00
1 parent 4f4dc63098
commit ea0afc6216
34 files changed
+304 -246

No files matched your search

+2 -2
View File
@@ -23,13 +23,13 @@ pub enum RenderCommand<R: ReferenceType> {
buffer: R::Buffer,
index_format: wgt::IndexFormat,
offset: BufferAddress,
size: Option<BufferSize>,
size: Option<BufferSize>, // optional in encoder; must be `Some` in a finished render bundle
},
SetVertexBuffer {
slot: u32,
buffer: Option<R::Buffer>,
offset: BufferAddress,
size: Option<BufferSize>,
size: Option<BufferSize>, // optional in encoder; must be `Some` in a finished render bundle
},
SetBlendConstant(Color),
SetStencilReference(u32),