mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
parent
246d1d2522
commit
505453a04e
3 changed files with 13 additions and 0 deletions
|
|
@ -240,6 +240,8 @@
|
|||
#define BRW_FRONTWINDING_CW 0
|
||||
#define BRW_FRONTWINDING_CCW 1
|
||||
|
||||
#define BRW_SPRITE_POINT_ENABLE 16
|
||||
|
||||
#define BRW_INDEX_BYTE 0
|
||||
#define BRW_INDEX_WORD 1
|
||||
#define BRW_INDEX_DWORD 2
|
||||
|
|
|
|||
|
|
@ -641,6 +641,7 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c )
|
|||
struct brw_compile *p = &c->func;
|
||||
struct brw_reg ip = brw_ip_reg();
|
||||
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;
|
||||
struct brw_instruction *jmp;
|
||||
struct brw_reg v1_null_ud = vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD));
|
||||
|
|
@ -681,6 +682,14 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c )
|
|||
}
|
||||
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));
|
||||
jmp = brw_JMPI(p, ip, ip, brw_imm_w(0));
|
||||
{
|
||||
brw_emit_point_sprite_setup( c );
|
||||
}
|
||||
brw_land_fwd_jump(p, jmp);
|
||||
|
||||
brw_emit_point_setup( c );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -185,6 +185,8 @@ static void upload_sf_unit( struct brw_context *brw )
|
|||
/* _NEW_POINT */
|
||||
sf.sf6.point_rast_rule = 1; /* opengl conventions */
|
||||
/* XXX clamp max depends on AA vs. non-AA */
|
||||
|
||||
sf.sf7.sprite_point = brw->attribs.Point->PointSprite;
|
||||
sf.sf7.point_size = CLAMP(brw->attribs.Point->Size, 1.0, 255.0) * (1<<3);
|
||||
sf.sf7.use_point_size_state = !brw->attribs.Point->_Attenuated;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue