static void copy_bfc( struct brw_sf_compile *c,
struct brw_reg vert )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
for (i = 0; i < 2; i++) {
static void do_twoside_color( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint backface_conditional = c->key.frontface_ccw ? BRW_CONDITIONAL_G : BRW_CONDITIONAL_L;
/* Already done in clip program:
struct brw_reg dst,
struct brw_reg src)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
int i;
for (i = 0; i < c->vue_map.num_slots; i++) {
*/
static void do_flatshade_triangle( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
- struct brw_context *brw = p->brw;
+ struct brw_codegen *p = &c->func;
GLuint nr;
GLuint jmpi = 1;
if (c->key.primitive == SF_UNFILLED_TRIS)
return;
- if (brw->gen == 5)
+ if (p->devinfo->gen == 5)
jmpi = 2;
nr = count_flatshaded_attributes(c);
static void do_flatshade_line( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
- struct brw_context *brw = p->brw;
+ struct brw_codegen *p = &c->func;
GLuint nr;
GLuint jmpi = 1;
if (c->key.primitive == SF_UNFILLED_TRIS)
return;
- if (brw->gen == 5)
+ if (p->devinfo->gen == 5)
jmpi = 2;
nr = count_flatshaded_attributes(c);
static void copy_z_inv_w( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
/* Copy both scalars with a single MOV:
BRW_MATH_FUNCTION_INV,
0,
c->det,
- BRW_MATH_DATA_SCALAR,
BRW_MATH_PRECISION_FULL);
}
}
static void
-set_predicate_control_flag_value(struct brw_compile *p,
+set_predicate_control_flag_value(struct brw_codegen *p,
struct brw_sf_compile *c,
unsigned value)
{
void brw_emit_tri_setup(struct brw_sf_compile *c, bool allocate)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
c->flag_value = 0xff;
void brw_emit_line_setup(struct brw_sf_compile *c, bool allocate)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
c->flag_value = 0xff;
void brw_emit_point_sprite_setup(struct brw_sf_compile *c, bool allocate)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
c->flag_value = 0xff;
BRW_MATH_FUNCTION_INV,
0,
c->dx0,
- BRW_MATH_DATA_SCALAR,
BRW_MATH_PRECISION_FULL);
brw_set_default_access_mode(p, BRW_ALIGN_16);
*/
void brw_emit_point_setup(struct brw_sf_compile *c, bool allocate)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
c->flag_value = 0xff;
void brw_emit_anyprim_setup( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
- struct brw_context *brw = p->brw;
+ struct brw_codegen *p = &c->func;
struct brw_reg payload_prim = brw_uw1_reg(BRW_GENERAL_REGISTER_FILE, 1, 0);
struct brw_reg payload_attr = get_element_ud(brw_vec1_reg(BRW_GENERAL_REGISTER_FILE, 1, 0), 0);
struct brw_reg primmask;
(1<<_3DPRIM_POLYGON) |
(1<<_3DPRIM_RECTLIST) |
(1<<_3DPRIM_TRIFAN_NOSTIPPLE)));
- brw_inst_set_cond_modifier(brw, brw_last_inst, BRW_CONDITIONAL_Z);
+ brw_inst_set_cond_modifier(p->devinfo, brw_last_inst, 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);
(1<<_3DPRIM_LINESTRIP_CONT) |
(1<<_3DPRIM_LINESTRIP_BF) |
(1<<_3DPRIM_LINESTRIP_CONT_BF)));
- brw_inst_set_cond_modifier(brw, brw_last_inst, BRW_CONDITIONAL_Z);
+ brw_inst_set_cond_modifier(p->devinfo, brw_last_inst, 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_AND(p, v1_null_ud, payload_attr, brw_imm_ud(1<<BRW_SPRITE_POINT_ENABLE));
- brw_inst_set_cond_modifier(brw, brw_last_inst, BRW_CONDITIONAL_Z);
+ brw_inst_set_cond_modifier(p->devinfo, brw_last_inst, 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);