Mesa (lp-binning): llvmpipe: remove scissor cliprect derived state

Keith Whitwell keithw at kemper.freedesktop.org
Mon Jan 11 11:07:01 UTC 2010


Module: Mesa
Branch: lp-binning
Commit: 16c1ad54bc5f3dc47a8a17cbc3724d913f5da005
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=16c1ad54bc5f3dc47a8a17cbc3724d913f5da005

Author: Keith Whitwell <keithw at vmware.com>
Date:   Wed Jan  6 18:41:42 2010 +0000

llvmpipe: remove scissor cliprect derived state

Was previously calculating the intersection of the scissor rectangle
and the framebuffer dimensions.  Rendering is already restricted to
framebuffer dimensions by other means, so scissor testing (when
implemented) can just use the scissor state directly.

---

 src/gallium/drivers/llvmpipe/lp_context.h       |    3 --
 src/gallium/drivers/llvmpipe/lp_state_derived.c |   38 -----------------------
 2 files changed, 0 insertions(+), 41 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h
index 1ede6a6..5390a71 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_context.h
@@ -96,9 +96,6 @@ struct llvmpipe_context {
    /** Which vertex shader output slot contains point size */
    int psize_slot;
 
-   /** Derived from scissor and surface bounds: */
-   struct pipe_scissor_state cliprect;
-
    /** The tiling engine */
    struct setup_context *setup;
 
diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index 78d0469..af02fcf 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -136,39 +136,6 @@ compute_vertex_info(struct llvmpipe_context *llvmpipe)
 
 
 
-/**
- * Recompute cliprect from scissor bounds, scissor enable and surface size.
- */
-static void
-compute_cliprect(struct llvmpipe_context *lp)
-{
-   /* LP_NEW_FRAMEBUFFER
-    */
-   uint surfWidth = lp->framebuffer.width;
-   uint surfHeight = lp->framebuffer.height;
-
-   /* LP_NEW_RASTERIZER
-    */
-   if (lp->rasterizer->scissor) {
-
-      /* LP_NEW_SCISSOR
-       *
-       * clip to scissor rect:
-       */
-      lp->cliprect.minx = MAX2(lp->scissor.minx, 0);
-      lp->cliprect.miny = MAX2(lp->scissor.miny, 0);
-      lp->cliprect.maxx = MIN2(lp->scissor.maxx, surfWidth);
-      lp->cliprect.maxy = MIN2(lp->scissor.maxy, surfHeight);
-   }
-   else {
-      /* clip to surface bounds */
-      lp->cliprect.minx = 0;
-      lp->cliprect.miny = 0;
-      lp->cliprect.maxx = surfWidth;
-      lp->cliprect.maxy = surfHeight;
-   }
-}
-
 
 /* Hopefully this will remain quite simple, otherwise need to pull in
  * something like the state tracker mechanism.
@@ -189,11 +156,6 @@ void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
                           LP_NEW_VS))
       compute_vertex_info( llvmpipe );
 
-   if (llvmpipe->dirty & (LP_NEW_SCISSOR |
-                          LP_NEW_RASTERIZER |
-                          LP_NEW_FRAMEBUFFER))
-      compute_cliprect(llvmpipe);
-
    if (llvmpipe->dirty & (LP_NEW_FS |
                           LP_NEW_BLEND |
                           LP_NEW_DEPTH_STENCIL_ALPHA |




More information about the mesa-commit mailing list