Module: Mesa
Branch: master
Commit: 3054921a8d410b3e3b82479f45a5d6f4cea2c098
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3054921a8d410b3e3b82479f45a5d6f4cea2c098

Author: Mike Blumenkrantz <[email protected]>
Date:   Mon Mar  1 16:57:35 2021 -0500

mesa/st: even better no-oping for clears

<imirkin> zmike: re 6a8c51dc5a4 -- couldn't minx be > maxx after the clamping? 
in nouveau i did >= for the bail condition

Reviewed-by: Ilia Mirkin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9350>

---

 src/mesa/state_tracker/st_cb_clear.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_clear.c 
b/src/mesa/state_tracker/st_cb_clear.c
index 87b664c201a..729e244ea91 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -542,8 +542,8 @@ st_Clear(struct gl_context *ctx, GLbitfield mask)
          const struct gl_framebuffer *fb = ctx->DrawBuffer;
          scissor_state.maxx = MIN2(scissor_state.maxx, fb->Width);
          scissor_state.maxy = MIN2(scissor_state.maxy, fb->Height);
-         if (scissor_state.minx == scissor_state.maxx ||
-             scissor_state.miny == scissor_state.maxy)
+         if (scissor_state.minx >= scissor_state.maxx ||
+             scissor_state.miny >= scissor_state.maxy)
             return;
       }
       /* We can't translate the clear color to the colorbuffer format,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to