Skip to content

Commit

Permalink
Object name on wgpu information (labels)
Browse files Browse the repository at this point in the history
  • Loading branch information
UpsettingBoy committed Sep 24, 2021
1 parent 31e77f5 commit b00cfe6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/alloc/gpu_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ where
.fw
.device
.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("Buffer copy"),
label: Some("GpuBuffer::read_async"),
});
encoder.copy_buffer_to_buffer(&self.storage, 0, &staging, 0, self.size as u64);

Expand Down Expand Up @@ -64,7 +64,7 @@ where
.fw
.device
.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("Buffer copy"),
label: Some("GpuBuffer::read"),
});
encoder.copy_buffer_to_buffer(&self.storage, 0, &staging, 0, self.size as u64);

Expand Down Expand Up @@ -97,7 +97,7 @@ where
.fw
.device
.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("Buffer copy"),
label: Some("GpuBuffer::write_async"),
});
encoder.copy_buffer_to_buffer(&staging, 0, &self.storage, 0, self.size as u64);

Expand Down Expand Up @@ -127,7 +127,7 @@ where
.fw
.device
.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("Buffer write"),
label: Some("GpuBuffer::write"),
});

self.fw.queue.submit(Some(encoder.finish()));
Expand Down
5 changes: 2 additions & 3 deletions src/alloc/gpu_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl<'fw> GpuImage<'fw> {
.fw
.device
.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("Image copy"),
label: Some("GpuImage::read_async"),
});

let copy_texture = wgpu::ImageCopyTexture {
Expand Down Expand Up @@ -144,7 +144,7 @@ impl<'fw> GpuImage<'fw> {
.fw
.device
.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("Buffer write"),
label: Some("GpuImage::write"),
});

self.fw.queue.submit(Some(encoder.finish()));
Expand Down Expand Up @@ -206,7 +206,6 @@ impl<'fw> GpuImage<'fw> {
encoder.copy_buffer_to_texture(copy_buffer, copy_texture, self.size);

self.fw.queue.submit(Some(encoder.finish()));
self.fw.poll();

Ok(())
}
Expand Down

0 comments on commit b00cfe6

Please sign in to comment.