Mesa (mesa_7_7_branch): intel: Use bit-wise not instead of logical not ( i830 path)

Ian Romanick idr at kemper.freedesktop.org
Thu Mar 18 18:24:19 PDT 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 3a3ef3d6c9a9f0fbea0674bd2c275be2be2f6519
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a3ef3d6c9a9f0fbea0674bd2c275be2be2f6519

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Mar 18 17:30:15 2010 -0700

intel: Use bit-wise not instead of logical not (i830 path)

The assertion is checking that the low-order bits of offset are not
set.  It does this by anding the inverted offset mask with the
offset.  This is clearly intended to be a bit-wise "invert".

Fixes bug #25984.
(cherry picked from commit 062a208814ad65d330f403c46d4bed88648f334f)

---

 src/mesa/drivers/dri/i915/intel_tris.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index b1195da..5aefe45 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -273,7 +273,7 @@ void intel_flush_prim(struct intel_context *intel)
       OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
 		I1_LOAD_S(0) | I1_LOAD_S(2) | 1);
       /* S0 */
-      assert((offset & !S0_VB_OFFSET_MASK_830) == 0);
+      assert((offset & ~S0_VB_OFFSET_MASK_830) == 0);
       OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0,
 		offset | (intel->vertex_size << S0_VB_PITCH_SHIFT_830) |
 		S0_VB_ENABLE_830);



More information about the mesa-commit mailing list