From: Kenneth Graunke Date: Thu, 3 Aug 2017 00:39:56 +0000 (-0700) Subject: i965: Initialize flags to 0 and |= in new flags. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12a77f391f80e2c35fd4676a9c9f882003221712;p=mesa.git i965: Initialize flags to 0 and |= in new flags. This makes it a bit easier to add new unconditional flags. --- diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 666ea6afe3e..58482ecac9f 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -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;