[Mesa-dev] [PATCH 2/3] i965: Remove unused gen6+ code from brw_gs_emit.c.
Kenneth Graunke
kenneth at whitecape.org
Mon Nov 14 17:31:02 PST 2011
This code is for decomposing certain primitive types pre-Gen6; the VF
already does that on Gen6. So, this code isn't good for anything.
Plus, we'll want to use actual Gen6 geometry shader programs soon, so we
may as well just delete this red herring.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_gs_emit.c | 42 ++++++------------------------
1 files changed, 9 insertions(+), 33 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_gs_emit.c b/src/mesa/drivers/dri/i965/brw_gs_emit.c
index e9875cd..33ee21d 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_emit.c
@@ -75,13 +75,7 @@ static void brw_gs_emit_vue(struct brw_gs_compile *c,
bool allocate = !last;
struct brw_reg temp;
- if (intel->gen < 6)
- temp = c->reg.R0;
- else {
- temp = c->reg.temp;
- brw_MOV(p, retype(temp, BRW_REGISTER_TYPE_UD),
- retype(c->reg.R0, BRW_REGISTER_TYPE_UD));
- }
+ temp = c->reg.R0;
/* Overwrite PrimType and PrimStart in the message header, for
* each vertex in turn:
@@ -110,9 +104,6 @@ static void brw_gs_emit_vue(struct brw_gs_compile *c,
1, /* writes_complete */
0, /* urb offset */
BRW_URB_SWIZZLE_NONE);
-
- if (intel->gen >= 6 && allocate)
- brw_MOV(p, get_element_ud(c->reg.R0, 0), get_element_ud(temp, 0));
}
static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim)
@@ -120,29 +111,14 @@ static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim)
struct brw_compile *p = &c->func;
struct intel_context *intel = &c->func.brw->intel;
- if (intel->gen < 6) {
- brw_MOV(p, get_element_ud(c->reg.R0, 1), brw_imm_ud(num_prim));
- brw_ff_sync(p,
- c->reg.R0,
- 0,
- c->reg.R0,
- 1, /* allocate */
- 1, /* response length */
- 0 /* eot */);
- } else {
- brw_MOV(p, retype(c->reg.temp, BRW_REGISTER_TYPE_UD),
- retype(c->reg.R0, BRW_REGISTER_TYPE_UD));
- brw_MOV(p, get_element_ud(c->reg.temp, 1), brw_imm_ud(num_prim));
- brw_ff_sync(p,
- c->reg.temp,
- 0,
- c->reg.temp,
- 1, /* allocate */
- 1, /* response length */
- 0 /* eot */);
- brw_MOV(p, get_element_ud(c->reg.R0, 0),
- get_element_ud(c->reg.temp, 0));
- }
+ brw_MOV(p, get_element_ud(c->reg.R0, 1), brw_imm_ud(num_prim));
+ brw_ff_sync(p,
+ c->reg.R0,
+ 0,
+ c->reg.R0,
+ 1, /* allocate */
+ 1, /* response length */
+ 0 /* eot */);
}
--
1.7.7.2
More information about the mesa-dev
mailing list