diff --git a/src/render/rt64_framebuffer_renderer.cpp b/src/render/rt64_framebuffer_renderer.cpp index 5df1252..5fc39f9 100644 --- a/src/render/rt64_framebuffer_renderer.cpp +++ b/src/render/rt64_framebuffer_renderer.cpp @@ -544,8 +544,8 @@ namespace RT64 { const auto &triangles = drawCall.triangles; assert(triangles.pipeline != nullptr); - // Draw calls can sometimes end up with empty viewports and cause validation errors. We just skip them. - if (triangles.viewport.isEmpty()) { + // Draw calls can sometimes end up with empty viewports or scissors and cause validation errors. We just skip them. + if (triangles.viewport.isEmpty() || triangles.scissor.isEmpty()) { continue; } diff --git a/src/rhi/rt64_render_interface_types.h b/src/rhi/rt64_render_interface_types.h index 758ac0f..f2996ba 100644 --- a/src/rhi/rt64_render_interface_types.h +++ b/src/rhi/rt64_render_interface_types.h @@ -1485,6 +1485,10 @@ namespace RT64 { bool operator!=(const RenderRect &v) const { return (left != v.left) || (top != v.top) || (right != v.right) || (bottom != v.bottom); } + + bool isEmpty() const { + return (left >= right) || (top >= bottom); + } }; struct RenderBox {