From fda5078324e0a940a2ddfdd1c63ffceb47c5a717 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 18 Mar 2010 15:35:05 -0700 Subject: Use bit-wise not instead of logical not. 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. --- src/mesa/drivers/dri/i915/intel_tris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/i915') diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index fb191fe346f..4b6d3b4c5be 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -251,7 +251,7 @@ void intel_flush_prim(struct intel_context *intel) BEGIN_BATCH(5); OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(0) | I1_LOAD_S(1) | 1); - assert((offset & !S0_VB_OFFSET_MASK) == 0); + assert((offset & ~S0_VB_OFFSET_MASK) == 0); OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0, offset); OUT_BATCH((intel->vertex_size << S1_VERTEX_WIDTH_SHIFT) | (intel->vertex_size << S1_VERTEX_PITCH_SHIFT)); -- cgit v1.2.3 From 062a208814ad65d330f403c46d4bed88648f334f Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 18 Mar 2010 17:30:15 -0700 Subject: 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. --- src/mesa/drivers/dri/i915/intel_tris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/i915') diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index 4b6d3b4c5be..81c4adeaf34 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -270,7 +270,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); -- cgit v1.2.3