Module: Mesa
Branch: main
Commit: 3c19ab4a7b5bf49628d6c9e0bac5da6e8e8f5ec2
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c19ab4a7b5bf49628d6c9e0bac5da6e8e8f5ec2

Author: Andreas Baierl <[email protected]>
Date:   Mon Sep 20 17:07:00 2021 +0200

lima: Remove depth near/far workaround

because this is fixed now.

Reviewed-by: Erico Nunes <[email protected]>
Signed-off-by: Andreas Baierl <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12804>

---

 src/gallium/drivers/lima/lima_draw.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/gallium/drivers/lima/lima_draw.c 
b/src/gallium/drivers/lima/lima_draw.c
index c0a0ba6dd70..120148a9e2c 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -656,15 +656,6 @@ lima_pack_render_state(struct lima_context *ctx, const 
struct pipe_draw_info *in
    near = float_to_ushort(ctx->viewport.near);
    far = float_to_ushort(ctx->viewport.far);
 
-   /* Insert a small 'epsilon' difference between 'near' and 'far' when
-    * they are equal, to avoid application bugs. */
-   if (far == near) {
-      if (near > 0)
-         near--;
-      if (far < USHRT_MAX)
-         far++;
-   }
-
    /* overlap with plbu? any place can remove one? */
    render->depth_range = near | (far << 16);
 

Reply via email to