mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 18:14:18 +01:00
Allow empty scissor rects (#3863)
This commit is contained in:
1 parent
dcad7dfba9
commit
acb7712c5a
3 files changed
+10
-3
No files matched your search
@@ -54,6 +54,10 @@ Bottom level categories:
|
||||
|
||||
- Work around [Vulkan-ValidationLayers#5671](https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5671) by ignoring reports of violations of [VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912](https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912). By @jimblandy in [#3809](https://github.com/gfx-rs/wgpu/pull/3809).
|
||||
|
||||
### Added/New Features
|
||||
|
||||
- Empty scissor rects are allowed now, matching the specification. by @PJB3005 in [#3863](https://github.com/gfx-rs/wgpu/pull/3863).
|
||||
|
||||
### Documentation
|
||||
|
||||
#### General
|
||||
|
||||
@@ -1685,9 +1685,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
}
|
||||
RenderCommand::SetScissor(ref rect) => {
|
||||
let scope = PassErrorScope::SetScissorRect;
|
||||
if rect.w == 0
|
||||
|| rect.h == 0
|
||||
|| rect.x + rect.w > info.extent.width
|
||||
if rect.x + rect.w > info.extent.width
|
||||
|| rect.y + rect.h > info.extent.height
|
||||
{
|
||||
return Err(RenderCommandError::InvalidScissorRect(*rect, info.extent))
|
||||
|
||||
@@ -87,6 +87,11 @@ unsafe extern "system" fn output_debug_string_handler(
|
||||
return excpt::EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
if level == log::Level::Warn && message.contains("DRAW_EMPTY_SCISSOR_RECTANGLE") {
|
||||
// This is normal, WebGPU allows passing empty scissor rectangles.
|
||||
return excpt::EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
let _ = std::panic::catch_unwind(|| {
|
||||
log::log!(level, "{}", message);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user