mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
Improve InvalidScissorRect error message (#2713)
This commit is contained in:
parent
32af4f5607
commit
75db572bf7
@ -89,8 +89,8 @@ pub enum RenderCommandError {
|
||||
PushConstants(#[from] PushConstantUploadError),
|
||||
#[error("Invalid Viewport parameters")]
|
||||
InvalidViewport,
|
||||
#[error("Invalid ScissorRect parameters")]
|
||||
InvalidScissorRect,
|
||||
#[error("Scissor {0:?} is not contained in the render target {1:?}")]
|
||||
InvalidScissorRect(Rect<u32>, wgt::Extent3d),
|
||||
#[error("Support for {0} is not implemented yet")]
|
||||
Unimplemented(&'static str),
|
||||
}
|
||||
|
@ -1510,7 +1510,8 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
|| rect.x + rect.w > info.extent.width
|
||||
|| rect.y + rect.h > info.extent.height
|
||||
{
|
||||
return Err(RenderCommandError::InvalidScissorRect).map_pass_err(scope);
|
||||
return Err(RenderCommandError::InvalidScissorRect(*rect, info.extent))
|
||||
.map_pass_err(scope);
|
||||
}
|
||||
let r = hal::Rect {
|
||||
x: rect.x,
|
||||
|
Loading…
Reference in New Issue
Block a user