/* -ve rhw workaround */
if (brw->has_negative_rhw_bug) {
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
brw_imm_ud(1<<20));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(0x3f));
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
{
/* if (planemask & 1)
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, v1_null_ud, c->reg.planemask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, v1_null_ud, c->reg.vertex_src_mask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
/* user clip distance: just fetch the correct float from each vertex */
/* while (planemask>>=1) != 0
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_SHR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_SHR(p, c->reg.vertex_src_mask, c->reg.vertex_src_mask, brw_imm_ud(1));
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_ADD(p, c->reg.clipdistance_offset, c->reg.clipdistance_offset, brw_imm_w(sizeof(float)));
struct brw_compile *p = &c->func;
dst = vec4(dst);
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, vec1(brw_null_reg()), c->reg.vertex_src_mask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
struct brw_indirect temp_ptr = brw_indirect(7, 0);
{
/* if (planemask & 1)
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, vec1(brw_null_reg()), c->reg.planemask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
/* while (--loopcount != 0)
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
}
brw_WHILE(p);
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
/* && (planemask>>=1) != 0
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_SHR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_SHR(p, c->reg.vertex_src_mask, c->reg.vertex_src_mask, brw_imm_ud(1));
brw_ADD(p, c->reg.clipdistance_offset, c->reg.clipdistance_offset, brw_imm_w(sizeof(float)));
}
/* for (loopcount = nr_verts-2; loopcount > 0; loopcount--)
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_G);
brw_ADD(p,
c->reg.loopcount,
c->reg.nr_verts,
brw_imm_d(-2));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_G;
brw_IF(p, BRW_EXECUTE_1);
{
brw_ADD(p, get_addr_reg(vptr), get_addr_reg(vptr), brw_imm_uw(2));
brw_MOV(p, get_addr_reg(v0), deref_1uw(vptr, 0));
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
}
brw_WHILE(p);
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_AND(p, t, t, t3);
brw_OR(p, tmp0, get_element(t, 0), get_element(t, 1));
brw_OR(p, tmp0, tmp0, get_element(t, 2));
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, brw_null_reg(), tmp0, brw_imm_ud(0x1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
brw_clip_kill_thread(c);
brw_AND(p, t, t, t3);
brw_OR(p, tmp0, get_element(t, 0), get_element(t, 1));
brw_OR(p, tmp0, tmp0, get_element(t, 2));
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, brw_null_reg(), tmp0, brw_imm_ud(0x1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
brw_clip_kill_thread(c);
/* if -ve rhw workaround bit is set,
do cliptest */
if (brw->has_negative_rhw_bug) {
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
brw_imm_ud(1<<20));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
brw_clip_test(c);
*/
brw_IF(p, BRW_EXECUTE_1);
{
- brw_set_conditionalmod(p, BRW_CONDITIONAL_EQ);
brw_AND(p, vec1(brw_null_reg()), get_element_ud(c->reg.R0, 2), brw_imm_ud(1<<8));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_EQ;
brw_MOV(p, byte_offset(c->reg.vertex[0],
brw_varying_to_offset(&c->vue_map,
VARYING_SLOT_EDGE)),
brw_imm_f(0));
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
- brw_set_conditionalmod(p, BRW_CONDITIONAL_EQ);
brw_AND(p, vec1(brw_null_reg()), get_element_ud(c->reg.R0, 2), brw_imm_ud(1<<9));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_EQ;
brw_MOV(p, byte_offset(c->reg.vertex[2],
brw_varying_to_offset(&c->vue_map,
VARYING_SLOT_EDGE)),
apply_one_offset(c, v0);
- brw_set_conditionalmod(p, BRW_CONDITIONAL_G);
brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_G;
}
brw_WHILE(p);
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
brw_ENDIF(p);
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
}
brw_WHILE(p);
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
brw_ENDIF(p);
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
}
brw_WHILE(p);
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
struct brw_context *brw = p->brw;
if (brw->gen == 5) {
- brw_set_conditionalmod(p, BRW_CONDITIONAL_Z);
brw_AND(p, brw_null_reg(), c->reg.ff_sync, brw_imm_ud(0x1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_Z;
brw_IF(p, BRW_EXECUTE_1);
{
brw_OR(p, c->reg.ff_sync, c->reg.ff_sync, brw_imm_ud(0x1));
/* Only emit vertices 0 and 1 if this is the first triangle of the
* polygon. Otherwise they are redundant.
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
get_element_ud(c->reg.R0, 2),
brw_imm_ud(BRW_GS_EDGE_INDICATOR_0));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
}
brw_ff_gs_offset_header_dw2(c, URB_WRITE_PRIM_START);
* of the polygon. Otherwise leave the primitive incomplete because
* there are more polygon vertices coming.
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
get_element_ud(c->reg.R0, 2),
brw_imm_ud(BRW_GS_EDGE_INDICATOR_1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_set_predicate_control(p, BRW_PREDICATE_NORMAL);
}
brw_ff_gs_offset_header_dw2(c, URB_WRITE_PRIM_END);
brw_MOV(p, primmask, brw_imm_ud(1));
brw_SHL(p, primmask, primmask, payload_prim);
- brw_set_conditionalmod(p, BRW_CONDITIONAL_Z);
brw_AND(p, v1_null_ud, primmask, brw_imm_ud((1<<_3DPRIM_TRILIST) |
(1<<_3DPRIM_TRISTRIP) |
(1<<_3DPRIM_TRIFAN) |
(1<<_3DPRIM_POLYGON) |
(1<<_3DPRIM_RECTLIST) |
(1<<_3DPRIM_TRIFAN_NOSTIPPLE)));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_Z;
jmp = brw_JMPI(p, brw_imm_d(0), BRW_PREDICATE_NORMAL) - p->store;
brw_emit_tri_setup(c, false);
brw_land_fwd_jump(p, jmp);
- brw_set_conditionalmod(p, BRW_CONDITIONAL_Z);
brw_AND(p, v1_null_ud, primmask, brw_imm_ud((1<<_3DPRIM_LINELIST) |
(1<<_3DPRIM_LINESTRIP) |
(1<<_3DPRIM_LINELOOP) |
(1<<_3DPRIM_LINESTRIP_CONT) |
(1<<_3DPRIM_LINESTRIP_BF) |
(1<<_3DPRIM_LINESTRIP_CONT_BF)));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_Z;
jmp = brw_JMPI(p, brw_imm_d(0), BRW_PREDICATE_NORMAL) - p->store;
brw_emit_line_setup(c, false);
brw_land_fwd_jump(p, jmp);
- brw_set_conditionalmod(p, BRW_CONDITIONAL_Z);
brw_AND(p, v1_null_ud, payload_attr, brw_imm_ud(1<<BRW_SPRITE_POINT_ENABLE));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_Z;
jmp = brw_JMPI(p, brw_imm_d(0), BRW_PREDICATE_NORMAL) - p->store;
brw_emit_point_sprite_setup(c, false);
brw_land_fwd_jump(p, jmp);