[Mesa-dev] [PATCH 01/14] i965: Reduce scope of indirect draw flag
Topi Pohjolainen
topi.pohjolainen at intel.com
Thu Feb 25 09:46:06 UTC 2016
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_draw.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index c295d91..323253e 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -186,7 +186,6 @@ brw_emit_prim(struct brw_context *brw,
{
int verts_per_instance;
int vertex_access_type;
- int indirect_flag;
DBG("PRIM: %s %d %d\n", _mesa_enum_to_string(prim->mode),
prim->start, prim->count);
@@ -232,8 +231,6 @@ brw_emit_prim(struct brw_context *brw,
intel_buffer_object(indirect_buffer),
prim->indirect_offset, 5 * sizeof(GLuint));
- indirect_flag = GEN7_3DPRIM_INDIRECT_PARAMETER_ENABLE;
-
brw_load_register_mem(brw, GEN7_3DPRIM_VERTEX_COUNT, bo,
I915_GEM_DOMAIN_VERTEX, 0,
prim->indirect_offset + 0);
@@ -261,8 +258,6 @@ brw_emit_prim(struct brw_context *brw,
OUT_BATCH(0);
ADVANCE_BATCH();
}
- } else {
- indirect_flag = 0;
}
BEGIN_BATCH(brw->gen >= 7 ? 7 : 6);
@@ -271,6 +266,8 @@ brw_emit_prim(struct brw_context *brw,
const int predicate_enable =
(brw->predicate.state == BRW_PREDICATE_STATE_USE_BIT)
? GEN7_3DPRIM_PREDICATE_ENABLE : 0;
+ const int indirect_flag =
+ prim->is_indirect ? GEN7_3DPRIM_INDIRECT_PARAMETER_ENABLE : 0;
OUT_BATCH(CMD_3D_PRIM << 16 | (7 - 2) | indirect_flag | predicate_enable);
OUT_BATCH(hw_prim | vertex_access_type);
--
2.5.0
More information about the mesa-dev
mailing list