struct brw_reg temp;
if (intel->gen < 6)
- temp = c->reg.R0;
+ 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.temp;
+ brw_MOV(p, retype(temp, BRW_REGISTER_TYPE_UD),
+ retype(c->reg.R0, BRW_REGISTER_TYPE_UD));
}
/* Overwrite PrimType and PrimStart in the message header, for
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));
- }
+ 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));
+ }
}
* is the PV for quads, but vertex 0 for polygons:
*/
if (intel->needs_ff_sync)
- brw_gs_ff_sync(c, 1);
+ brw_gs_ff_sync(c, 1);
if (key->pv_first) {
brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_POLYGON << 2));
brw_gs_alloc_regs(c, 4);
if (intel->needs_ff_sync)
- brw_gs_ff_sync(c, 1);
+ brw_gs_ff_sync(c, 1);
if (key->pv_first) {
brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_POLYGON << 2));
brw_gs_alloc_regs(c, 2);
if (intel->needs_ff_sync)
- brw_gs_ff_sync(c, 1);
+ brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_LINESTRIP << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[1], 1, ((_3DPRIM_LINESTRIP << 2) | R02_PRIM_END));
}