mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Improve write_buffer_with Spans (#3383)
This commit is contained in:
committed by
GitHub
parent
f40611fd5c
commit
2ecced0c88
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -2913,6 +2913,7 @@ dependencies = [
|
||||
"parking_lot 0.12.1",
|
||||
"png",
|
||||
"pollster",
|
||||
"profiling",
|
||||
"raw-window-handle 0.5.0",
|
||||
"serde",
|
||||
"smallvec",
|
||||
|
||||
@@ -389,6 +389,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
buffer_size: wgt::BufferSize,
|
||||
id_in: Input<G, id::StagingBufferId>,
|
||||
) -> Result<(id::StagingBufferId, *mut u8), QueueWriteError> {
|
||||
profiling::scope!("Queue::create_staging_buffer");
|
||||
let hub = A::hub(self);
|
||||
let root_token = &mut Token::root();
|
||||
|
||||
@@ -413,8 +414,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
buffer_offset: wgt::BufferAddress,
|
||||
staging_buffer_id: id::StagingBufferId,
|
||||
) -> Result<(), QueueWriteError> {
|
||||
profiling::scope!("Queue::write_buffer_with");
|
||||
|
||||
profiling::scope!("Queue::write_staging_buffer");
|
||||
let hub = A::hub(self);
|
||||
let root_token = &mut Token::root();
|
||||
|
||||
@@ -457,6 +457,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
buffer_offset: u64,
|
||||
buffer_size: u64,
|
||||
) -> Result<(), QueueWriteError> {
|
||||
profiling::scope!("Queue::validate_write_buffer");
|
||||
let hub = A::hub(self);
|
||||
let root_token = &mut Token::root();
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ optional = true
|
||||
arrayvec.workspace = true
|
||||
log.workspace = true
|
||||
parking_lot.workspace = true
|
||||
profiling.workspace = true
|
||||
raw-window-handle.workspace = true
|
||||
serde = { workspace = true, features = ["derive"], optional = true }
|
||||
smallvec.workspace = true
|
||||
|
||||
@@ -3853,6 +3853,7 @@ impl Queue {
|
||||
offset: BufferAddress,
|
||||
size: BufferSize,
|
||||
) -> Option<QueueWriteBufferView<'a>> {
|
||||
profiling::scope!("Queue::write_buffer_with");
|
||||
DynContext::queue_validate_write_buffer(
|
||||
&*self.context,
|
||||
&self.id,
|
||||
|
||||
Reference in New Issue
Block a user