mirror of
https://github.com/rt64/rt64.git
synced 2024-12-26 03:15:44 +00:00
Handle empty scissors correctly.
This commit is contained in:
parent
c6e50be61a
commit
09f7ac21d0
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user