I recently experimented with performing rasterizer discard in the SOL
unit instead of the clipper, and as far as I can tell, it's basically
the same performance.  The clipper comes directly after SOL anyway,
and setting the clipper to REJECT_ALL should be pretty darn cheap.

Keep the perf_debug on Sandybridge, where the GS actually does work.

Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
---
 src/mesa/drivers/dri/i965/gen6_clip_state.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c 
b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index 8ae19c8..7bcae9f 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -163,9 +163,11 @@ upload_clip_state(struct brw_context *brw)
    /* BRW_NEW_RASTERIZER_DISCARD */
    if (ctx->RasterDiscard) {
       dw2 |= GEN6_CLIP_MODE_REJECT_ALL;
-      perf_debug("Rasterizer discard is currently implemented via the clipper; 
"
-                 "%s be faster.\n", brw->gen >= 7 ? "using the SOL unit may" :
-                 "having the GS not write primitives would likely");
+      if (brw->gen == 6) {
+         perf_debug("Rasterizer discard is currently implemented via the "
+                    "clipper; having the GS not write primitives would "
+                    "likely be faster.\n");
+      }
    }
 
    uint32_t enable;
-- 
2.8.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to