[Mesa-dev] [PATCH] i965: Remove redundant gen check

Ben Widawsky benjamin.widawsky at intel.com
Thu Apr 9 19:46:34 PDT 2015


The blit ring doesn't exist until Gen6, therefore we don't need to actually
check it. Keep an assert to make sure old code doesn't do stupid stuff.

(Only compile tested)

Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
 src/mesa/drivers/dri/i965/intel_batchbuffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index e522e4e..ada5573 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -702,7 +702,8 @@ intel_emit_post_sync_nonzero_flush(struct brw_context *brw)
 void
 intel_batchbuffer_emit_mi_flush(struct brw_context *brw)
 {
-   if (brw->batch.ring == BLT_RING && brw->gen >= 6) {
+   if (brw->batch.ring == BLT_RING) {
+      assert(brw->gen >= 6);
       BEGIN_BATCH_BLT(4);
       OUT_BATCH(MI_FLUSH_DW);
       OUT_BATCH(0);
-- 
2.3.5



More information about the mesa-dev mailing list