diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-04-22 18:00:32 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-05-14 09:23:31 +0100 |
commit | 979d2f8d0038aa621e1c75200b10a3819e024a66 (patch) | |
tree | d11e199affe2892272e9bdffa7c88ca4c784026b | |
parent | 7ba63307058337af5a120ad01c93b423a3e422eb (diff) |
sna/gen4: Tidy testing for an active vertex buffer id
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen4_render.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 8779b850..575cc6a5 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -586,7 +586,7 @@ static void gen4_emit_primitive(struct sna *sna) static bool gen4_rectangle_begin(struct sna *sna, const struct sna_composite_op *op) { - int id = op->u.gen4.ve_id; + unsigned int id = 1 << op->u.gen4.ve_id; int ndwords; if (sna_vertex_wait__locked(&sna->render) && sna->render.vertex_offset) @@ -594,13 +594,13 @@ static bool gen4_rectangle_begin(struct sna *sna, /* 7xpipelined pointers + 6xprimitive + 1xflush */ ndwords = op->need_magic_ca_pass? 20 : 6; - if ((sna->render.vb_id & (1 << id)) == 0) + if ((sna->render.vb_id & id) == 0) ndwords += 5; if (!kgem_check_batch(&sna->kgem, ndwords)) return false; - if ((sna->render.vb_id & (1 << id)) == 0) + if ((sna->render.vb_id & id) == 0) gen4_emit_vertex_buffer(sna, op); if (sna->render.vertex_offset == 0) gen4_emit_primitive(sna); |