mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
remove buffer id from set index/vertex buffer scopes
all relevant inner errors already print the label of the buffers
This commit is contained in:
parent
287d8ee414
commit
400372ff57
@ -438,7 +438,7 @@ impl RenderBundleEncoder {
|
||||
offset,
|
||||
size,
|
||||
} => {
|
||||
let scope = PassErrorScope::SetIndexBuffer(buffer_id);
|
||||
let scope = PassErrorScope::SetIndexBuffer;
|
||||
set_index_buffer(
|
||||
&mut state,
|
||||
&buffer_guard,
|
||||
@ -455,7 +455,7 @@ impl RenderBundleEncoder {
|
||||
offset,
|
||||
size,
|
||||
} => {
|
||||
let scope = PassErrorScope::SetVertexBuffer(buffer_id);
|
||||
let scope = PassErrorScope::SetVertexBuffer;
|
||||
set_vertex_buffer(&mut state, &buffer_guard, slot, buffer_id, offset, size)
|
||||
.map_pass_err(scope)?;
|
||||
}
|
||||
|
@ -875,9 +875,9 @@ pub enum PassErrorScope {
|
||||
#[error("In a set_push_constant command")]
|
||||
SetPushConstant,
|
||||
#[error("In a set_vertex_buffer command")]
|
||||
SetVertexBuffer(id::BufferId),
|
||||
SetVertexBuffer,
|
||||
#[error("In a set_index_buffer command")]
|
||||
SetIndexBuffer(id::BufferId),
|
||||
SetIndexBuffer,
|
||||
#[error("In a set_blend_constant command")]
|
||||
SetBlendConstant,
|
||||
#[error("In a set_stencil_reference command")]
|
||||
@ -931,12 +931,6 @@ impl PrettyError for PassErrorScope {
|
||||
Self::SetPipelineCompute(id) => {
|
||||
fmt.compute_pipeline_label(&id);
|
||||
}
|
||||
Self::SetVertexBuffer(id) => {
|
||||
fmt.buffer_label(&id);
|
||||
}
|
||||
Self::SetIndexBuffer(id) => {
|
||||
fmt.buffer_label(&id);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
@ -1551,7 +1551,7 @@ impl Global {
|
||||
offset,
|
||||
size,
|
||||
} => {
|
||||
let scope = PassErrorScope::SetIndexBuffer(buffer.as_info().id());
|
||||
let scope = PassErrorScope::SetIndexBuffer;
|
||||
set_index_buffer(&mut state, &cmd_buf, buffer, index_format, offset, size)
|
||||
.map_pass_err(scope)?;
|
||||
}
|
||||
@ -1561,7 +1561,7 @@ impl Global {
|
||||
offset,
|
||||
size,
|
||||
} => {
|
||||
let scope = PassErrorScope::SetVertexBuffer(buffer.as_info().id());
|
||||
let scope = PassErrorScope::SetVertexBuffer;
|
||||
set_vertex_buffer(&mut state, &cmd_buf, slot, buffer, offset, size)
|
||||
.map_pass_err(scope)?;
|
||||
}
|
||||
@ -2697,7 +2697,7 @@ impl Global {
|
||||
offset: BufferAddress,
|
||||
size: Option<BufferSize>,
|
||||
) -> Result<(), RenderPassError> {
|
||||
let scope = PassErrorScope::SetIndexBuffer(buffer_id);
|
||||
let scope = PassErrorScope::SetIndexBuffer;
|
||||
let base = pass.base_mut(scope)?;
|
||||
|
||||
base.commands.push(RenderCommand::SetIndexBuffer {
|
||||
@ -2718,7 +2718,7 @@ impl Global {
|
||||
offset: BufferAddress,
|
||||
size: Option<BufferSize>,
|
||||
) -> Result<(), RenderPassError> {
|
||||
let scope = PassErrorScope::SetVertexBuffer(buffer_id);
|
||||
let scope = PassErrorScope::SetVertexBuffer;
|
||||
let base = pass.base_mut(scope)?;
|
||||
|
||||
base.commands.push(RenderCommand::SetVertexBuffer {
|
||||
|
@ -228,7 +228,7 @@ impl RenderCommand {
|
||||
} => ArcRenderCommand::SetIndexBuffer {
|
||||
buffer: buffers_guard.get_owned(buffer_id).map_err(|_| {
|
||||
RenderPassError {
|
||||
scope: PassErrorScope::SetIndexBuffer(buffer_id),
|
||||
scope: PassErrorScope::SetIndexBuffer,
|
||||
inner: RenderCommandError::InvalidBufferId(buffer_id).into(),
|
||||
}
|
||||
})?,
|
||||
@ -246,7 +246,7 @@ impl RenderCommand {
|
||||
slot,
|
||||
buffer: buffers_guard.get_owned(buffer_id).map_err(|_| {
|
||||
RenderPassError {
|
||||
scope: PassErrorScope::SetVertexBuffer(buffer_id),
|
||||
scope: PassErrorScope::SetVertexBuffer,
|
||||
inner: RenderCommandError::InvalidBufferId(buffer_id).into(),
|
||||
}
|
||||
})?,
|
||||
|
Loading…
Reference in New Issue
Block a user