i965: Initialize flags to 0 and |= in new flags.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 3 Aug 2017 00:39:56 +0000 (17:39 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 4 Aug 2017 17:26:37 +0000 (10:26 -0700)
This makes it a bit easier to add new unconditional flags.

src/mesa/drivers/dri/i965/intel_batchbuffer.c

index 666ea6afe3e0c21651a28bb9322e099d78be9b97..58482ecac9fc22bf3d1382215bbeba0f8ed730ff 100644 (file)
@@ -637,12 +637,12 @@ do_flush_locked(struct brw_context *brw, int in_fence_fd, int *out_fence_fd)
    }
 
    if (!brw->screen->no_hw) {
-      int flags;
+      int flags = 0;
 
       if (brw->gen >= 6 && batch->ring == BLT_RING) {
-         flags = I915_EXEC_BLT;
+         flags |= I915_EXEC_BLT;
       } else {
-         flags = I915_EXEC_RENDER;
+         flags |= I915_EXEC_RENDER;
       }
       if (batch->needs_sol_reset)
         flags |= I915_EXEC_GEN7_SOL_RESET;