{
struct brw_compile *p = &c->func;
struct brw_context *brw = p->brw;
+ struct brw_instruction *inst;
struct brw_indirect vtx0 = brw_indirect(0, 0);
struct brw_indirect vtx1 = brw_indirect(1, 0);
struct brw_indirect newvtx0 = brw_indirect(2, 0);
brw_MUL(p, c->reg.t, c->reg.t, c->reg.dp1);
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_G, c->reg.t, c->reg.t1 );
- brw_MOV(p, c->reg.t1, c->reg.t);
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_MOV(p, c->reg.t1, c->reg.t);
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
brw_ELSE(p);
{
brw_MUL(p, c->reg.t, c->reg.t, c->reg.dp0);
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_G, c->reg.t, c->reg.t0 );
- brw_MOV(p, c->reg.t0, c->reg.t);
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_MOV(p, c->reg.t0, c->reg.t);
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
if (brw->has_negative_rhw_bug) {
void brw_clip_tri( struct brw_clip_compile *c )
{
struct brw_compile *p = &c->func;
+ struct brw_instruction *inst;
struct brw_indirect vtx = brw_indirect(0, 0);
struct brw_indirect vtxPrev = brw_indirect(1, 0);
struct brw_indirect vtxOut = brw_indirect(2, 0);
/* If (vtxOut == 0) vtxOut = vtxPrev
*/
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_EQ, get_addr_reg(vtxOut), brw_imm_uw(0) );
- brw_MOV(p, get_addr_reg(vtxOut), get_addr_reg(vtxPrev) );
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_MOV(p, get_addr_reg(vtxOut), get_addr_reg(vtxPrev));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_clip_interp_vertex(c, vtxOut, vtxPrev, vtx, c->reg.t, false);
/* If (vtxOut == 0) vtxOut = vtx
*/
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_EQ, get_addr_reg(vtxOut), brw_imm_uw(0) );
- brw_MOV(p, get_addr_reg(vtxOut), get_addr_reg(vtx) );
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_MOV(p, get_addr_reg(vtxOut), get_addr_reg(vtx));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_clip_interp_vertex(c, vtxOut, vtx, vtxPrev, c->reg.t, true);
BRW_CONDITIONAL_GE,
c->reg.nr_verts,
brw_imm_ud(3));
+ brw_set_predicate_control(p, BRW_PREDICATE_NORMAL);
/* && (planemask>>=1) != 0
*/
static void brw_clip_test( struct brw_clip_compile *c )
{
+ struct brw_instruction *inst;
struct brw_reg t = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
struct brw_reg t1 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
struct brw_reg t2 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
brw_AND(p, t, t, brw_imm_ud(0x1));
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
get_element(t, 0), brw_imm_ud(0));
- brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<5)));
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<5)));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
get_element(t, 1), brw_imm_ud(0));
- brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<3)));
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<3)));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
get_element(t, 2), brw_imm_ud(0));
- brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<1)));
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<1)));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
/* test farz, xmax, ymax plane */
/* clip.xyz > clip.w */
brw_AND(p, t, t, brw_imm_ud(0x1));
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
get_element(t, 0), brw_imm_ud(0));
- brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<4)));
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<4)));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
get_element(t, 1), brw_imm_ud(0));
- brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<2)));
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<2)));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_NZ,
get_element(t, 2), brw_imm_ud(0));
- brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<0)));
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud((1<<0)));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
release_tmps(c);
}
struct brw_compile *p = &c->func;
struct brw_reg off = c->reg.offset;
struct brw_reg dir = c->reg.dir;
+ struct brw_instruction *inst;
brw_math_invert(p, get_element(off, 2), get_element(dir, 2));
brw_MUL(p, vec2(off), dir, get_element(off, 2));
brw_abs(get_element(off, 0)),
brw_abs(get_element(off, 1)));
- brw_SEL(p, vec1(off), brw_abs(get_element(off, 0)), brw_abs(get_element(off, 1)));
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_SEL(p, vec1(off),
+ brw_abs(get_element(off, 0)), brw_abs(get_element(off, 1)));
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_MUL(p, vec1(off), off, brw_imm_f(c->key.offset_factor));
brw_ADD(p, vec1(off), off, brw_imm_f(c->key.offset_units));
unsigned num_verts, bool check_edge_flags)
{
struct brw_compile *p = &c->func;
+ struct brw_instruction *inst;
c->prog_data.svbi_postincrement_value = num_verts;
brw_ff_gs_alloc_regs(c, num_verts, true);
/* If so, then overwrite destination_indices_uw with the appropriate
* reordering.
*/
- brw_MOV(p, destination_indices_uw,
- brw_imm_v(key->pv_first ? 0x00010200 /* (0, 2, 1) */
- : 0x00020001)); /* (1, 0, 2) */
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ inst = brw_MOV(p, destination_indices_uw,
+ brw_imm_v(key->pv_first ? 0x00010200 /* (0, 2, 1) */
+ : 0x00020001)); /* (1, 0, 2) */
+ inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
brw_ADD(p, c->reg.destination_indices,
c->reg.destination_indices, get_element_ud(c->reg.SVBI, 0));