diff options
author | Matt Turner <[email protected]> | 2015-07-08 18:56:52 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-07-15 13:09:22 -0700 |
commit | fbf3aebf1f33fbec559c5b69bdf3b5dec6031612 (patch) | |
tree | cf990e54bea25806c826b10c2a3fa1cbb1aabeee /src/mesa/drivers | |
parent | 141e1eb29fe80ad341e718147a1277cc3b1b9c11 (diff) |
i965: Move BEGIN_BATCH() into same control flow as ADVANCE_BATCH().
BEGIN_BATCH() and ADVANCE_BATCH() will contain "do {" and "} while (0)"
respectively to allow declaring local variables used by intervening
OUT_BATCH macros. As such, BEGIN_BATCH() and ADVANCE_BATCH() need to be
in the same control flow.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 69ad4d444da..ec13473798c 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -261,17 +261,17 @@ static void brw_emit_prim(struct brw_context *brw, indirect_flag = 0; } + BEGIN_BATCH(brw->gen >= 7 ? 7 : 6); + if (brw->gen >= 7) { if (brw->predicate.state == BRW_PREDICATE_STATE_USE_BIT) predicate_enable = GEN7_3DPRIM_PREDICATE_ENABLE; else predicate_enable = 0; - BEGIN_BATCH(7); OUT_BATCH(CMD_3D_PRIM << 16 | (7 - 2) | indirect_flag | predicate_enable); OUT_BATCH(hw_prim | vertex_access_type); } else { - BEGIN_BATCH(6); OUT_BATCH(CMD_3D_PRIM << 16 | (6 - 2) | hw_prim << GEN4_3DPRIM_TOPOLOGY_TYPE_SHIFT | vertex_access_type); |