Add labels to iced_wgpu internals
This commit is contained in:
parent
07880c392c
commit
44118263b5
6 changed files with 46 additions and 38 deletions
|
|
@ -56,7 +56,7 @@ impl Pipeline {
|
|||
|
||||
let constant_layout =
|
||||
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image constants layout"),
|
||||
entries: &[
|
||||
wgpu::BindGroupLayoutEntry {
|
||||
binding: 0,
|
||||
|
|
@ -79,7 +79,7 @@ impl Pipeline {
|
|||
});
|
||||
|
||||
let uniforms_buffer = device.create_buffer(&wgpu::BufferDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image uniforms buffer"),
|
||||
size: mem::size_of::<Uniforms>() as u64,
|
||||
usage: wgpu::BufferUsage::UNIFORM | wgpu::BufferUsage::COPY_DST,
|
||||
mapped_at_creation: false,
|
||||
|
|
@ -87,7 +87,7 @@ impl Pipeline {
|
|||
|
||||
let constant_bind_group =
|
||||
device.create_bind_group(&wgpu::BindGroupDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image constants bind group"),
|
||||
layout: &constant_layout,
|
||||
entries: &[
|
||||
wgpu::BindGroupEntry {
|
||||
|
|
@ -105,7 +105,7 @@ impl Pipeline {
|
|||
|
||||
let texture_layout =
|
||||
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image texture atlas layout"),
|
||||
entries: &[wgpu::BindGroupLayoutEntry {
|
||||
binding: 0,
|
||||
visibility: wgpu::ShaderStage::FRAGMENT,
|
||||
|
|
@ -120,7 +120,7 @@ impl Pipeline {
|
|||
|
||||
let layout =
|
||||
device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image pipeline layout"),
|
||||
push_constant_ranges: &[],
|
||||
bind_group_layouts: &[&constant_layout, &texture_layout],
|
||||
});
|
||||
|
|
@ -135,7 +135,7 @@ impl Pipeline {
|
|||
|
||||
let pipeline =
|
||||
device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image pipeline"),
|
||||
layout: Some(&layout),
|
||||
vertex_stage: wgpu::ProgrammableStageDescriptor {
|
||||
module: &vs_module,
|
||||
|
|
@ -218,20 +218,20 @@ impl Pipeline {
|
|||
|
||||
let vertices =
|
||||
device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image vertex buffer"),
|
||||
contents: QUAD_VERTS.as_bytes(),
|
||||
usage: wgpu::BufferUsage::VERTEX,
|
||||
});
|
||||
|
||||
let indices =
|
||||
device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image index buffer"),
|
||||
contents: QUAD_INDICES.as_bytes(),
|
||||
usage: wgpu::BufferUsage::INDEX,
|
||||
});
|
||||
|
||||
let instances = device.create_buffer(&wgpu::BufferDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image instance buffer"),
|
||||
size: mem::size_of::<Instance>() as u64 * Instance::MAX as u64,
|
||||
usage: wgpu::BufferUsage::VERTEX | wgpu::BufferUsage::COPY_DST,
|
||||
mapped_at_creation: false,
|
||||
|
|
@ -240,7 +240,7 @@ impl Pipeline {
|
|||
let texture_atlas = Atlas::new(device);
|
||||
|
||||
let texture = device.create_bind_group(&wgpu::BindGroupDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image texture atlas bind group"),
|
||||
layout: &texture_layout,
|
||||
entries: &[wgpu::BindGroupEntry {
|
||||
binding: 0,
|
||||
|
|
@ -362,7 +362,7 @@ impl Pipeline {
|
|||
|
||||
self.texture =
|
||||
device.create_bind_group(&wgpu::BindGroupDescriptor {
|
||||
label: None,
|
||||
label: Some("iced_wgpu::image texture atlas bind group"),
|
||||
layout: &self.texture_layout,
|
||||
entries: &[wgpu::BindGroupEntry {
|
||||
binding: 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue