mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Add a missing condition to viewport validation (#8040)
This commit is contained in:
parent
45e96e593f
commit
f25a79595a
@ -29,6 +29,7 @@ webgpu:api,validation,encoding,cmds,index_access:*
|
|||||||
//FAIL: webgpu:api,validation,encoding,cmds,render,draw:*
|
//FAIL: webgpu:api,validation,encoding,cmds,render,draw:*
|
||||||
webgpu:api,validation,encoding,cmds,render,draw:index_buffer_OOB:*
|
webgpu:api,validation,encoding,cmds,render,draw:index_buffer_OOB:*
|
||||||
webgpu:api,validation,encoding,cmds,render,draw:unused_buffer_bound:*
|
webgpu:api,validation,encoding,cmds,render,draw:unused_buffer_bound:*
|
||||||
|
webgpu:api,validation,encoding,cmds,render,dynamic_state:*
|
||||||
webgpu:api,validation,encoding,cmds,render,setIndexBuffer:*
|
webgpu:api,validation,encoding,cmds,render,setIndexBuffer:*
|
||||||
webgpu:api,validation,encoding,cmds,render,setVertexBuffer:*
|
webgpu:api,validation,encoding,cmds,render,setVertexBuffer:*
|
||||||
webgpu:api,validation,encoding,encoder_state:*
|
webgpu:api,validation,encoding,encoder_state:*
|
||||||
|
|||||||
@ -2520,7 +2520,10 @@ fn set_viewport(
|
|||||||
}
|
}
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
if !(0.0..=1.0).contains(&depth_min) || !(0.0..=1.0).contains(&depth_max) {
|
if !(0.0..=1.0).contains(&depth_min)
|
||||||
|
|| !(0.0..=1.0).contains(&depth_max)
|
||||||
|
|| depth_min > depth_max
|
||||||
|
{
|
||||||
return Err(RenderCommandError::InvalidViewportDepth(depth_min, depth_max).into());
|
return Err(RenderCommandError::InvalidViewportDepth(depth_min, depth_max).into());
|
||||||
}
|
}
|
||||||
let r = hal::Rect {
|
let r = hal::Rect {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user