mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 15:31:03 +01:00
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:
1 parent
4f4dc63098
commit
ea0afc6216
34 files changed
+304
-246
No files matched your search
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user