if (brw_clip_have_vert_result(c, VERT_RESULT_COL0) &&
brw_clip_have_vert_result(c, VERT_RESULT_BFC0))
brw_MOV(p,
- byte_offset(c->reg.vertex[i], c->offset[VERT_RESULT_COL0]),
- byte_offset(c->reg.vertex[i], c->offset[VERT_RESULT_BFC0]));
+ byte_offset(c->reg.vertex[i],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_COL0)),
+ byte_offset(c->reg.vertex[i],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_BFC0)));
if (brw_clip_have_vert_result(c, VERT_RESULT_COL1) &&
brw_clip_have_vert_result(c, VERT_RESULT_BFC1))
brw_MOV(p,
- byte_offset(c->reg.vertex[i], c->offset[VERT_RESULT_COL1]),
- byte_offset(c->reg.vertex[i], c->offset[VERT_RESULT_BFC1]));
+ byte_offset(c->reg.vertex[i],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_COL1)),
+ byte_offset(c->reg.vertex[i],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_BFC1)));
}
}
brw_ENDIF(p);
{
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_MOV(p, byte_offset(c->reg.vertex[0], c->offset[VERT_RESULT_EDGE]), brw_imm_f(0));
+ brw_MOV(p, byte_offset(c->reg.vertex[0],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_EDGE)),
+ brw_imm_f(0));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
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_MOV(p, byte_offset(c->reg.vertex[2], c->offset[VERT_RESULT_EDGE]), brw_imm_f(0));
+ brw_MOV(p, byte_offset(c->reg.vertex[2],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_EDGE)),
+ brw_imm_f(0));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
}
brw_ENDIF(p);
/* draw edge if edgeflag != 0 */
brw_CMP(p,
vec1(brw_null_reg()), BRW_CONDITIONAL_NZ,
- deref_1f(v0, c->offset[VERT_RESULT_EDGE]),
+ deref_1f(v0, brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_EDGE)),
brw_imm_f(0));
brw_IF(p, BRW_EXECUTE_1);
{
*/
brw_CMP(p,
vec1(brw_null_reg()), BRW_CONDITIONAL_NZ,
- deref_1f(v0, c->offset[VERT_RESULT_EDGE]),
+ deref_1f(v0, brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_EDGE)),
brw_imm_f(0));
brw_IF(p, BRW_EXECUTE_1);
{
/* Iterate over each attribute (could be done in pairs?)
*/
for (slot = 2*c->header_regs; slot < c->vue_map.num_slots; slot++) {
- GLuint delta = ATTR_SIZE * slot;
+ GLuint delta = brw_vue_slot_to_offset(slot);
if (c->vue_map.slot_to_vert_result[slot] == VERT_RESULT_EDGE) {
if (force_edgeflag)
}
if (c->vue_map.num_slots % 2) {
- GLuint delta = c->vue_map.num_slots * ATTR_SIZE;
+ GLuint delta = brw_vue_slot_to_offset(c->vue_map.num_slots);
brw_MOV(p, deref_4f(dest_ptr, delta), brw_imm_f(0));
}
if (brw_clip_have_vert_result(c, VERT_RESULT_COL0))
brw_MOV(p,
- byte_offset(c->reg.vertex[to], c->offset[VERT_RESULT_COL0]),
- byte_offset(c->reg.vertex[from], c->offset[VERT_RESULT_COL0]));
+ byte_offset(c->reg.vertex[to],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_COL0)),
+ byte_offset(c->reg.vertex[from],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_COL0)));
if (brw_clip_have_vert_result(c, VERT_RESULT_COL1))
brw_MOV(p,
- byte_offset(c->reg.vertex[to], c->offset[VERT_RESULT_COL1]),
- byte_offset(c->reg.vertex[from], c->offset[VERT_RESULT_COL1]));
+ byte_offset(c->reg.vertex[to],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_COL1)),
+ byte_offset(c->reg.vertex[from],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_COL1)));
if (brw_clip_have_vert_result(c, VERT_RESULT_BFC0))
brw_MOV(p,
- byte_offset(c->reg.vertex[to], c->offset[VERT_RESULT_BFC0]),
- byte_offset(c->reg.vertex[from], c->offset[VERT_RESULT_BFC0]));
+ byte_offset(c->reg.vertex[to],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_BFC0)),
+ byte_offset(c->reg.vertex[from],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_BFC0)));
if (brw_clip_have_vert_result(c, VERT_RESULT_BFC1))
brw_MOV(p,
- byte_offset(c->reg.vertex[to], c->offset[VERT_RESULT_BFC1]),
- byte_offset(c->reg.vertex[from], c->offset[VERT_RESULT_BFC1]));
+ byte_offset(c->reg.vertex[to],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_BFC1)),
+ byte_offset(c->reg.vertex[from],
+ brw_vert_result_to_offset(&c->vue_map,
+ VERT_RESULT_BFC1)));
}