2009-09-01 09:25:57 +04:00
# define R100_TRACK_MAX_TEXTURE 3
# define R200_TRACK_MAX_TEXTURE 6
# define R300_TRACK_MAX_TEXTURE 16
# define R100_MAX_CB 1
# define R300_MAX_CB 4
/*
* CS functions
*/
struct r100_cs_track_cb {
2009-11-20 16:29:23 +03:00
struct radeon_bo * robj ;
2009-09-01 09:25:57 +04:00
unsigned pitch ;
unsigned cpp ;
unsigned offset ;
} ;
struct r100_cs_track_array {
2009-11-20 16:29:23 +03:00
struct radeon_bo * robj ;
2009-09-01 09:25:57 +04:00
unsigned esize ;
} ;
struct r100_cs_cube_info {
2009-11-20 16:29:23 +03:00
struct radeon_bo * robj ;
unsigned offset ;
2009-09-01 09:25:57 +04:00
unsigned width ;
unsigned height ;
} ;
2009-12-07 06:16:06 +03:00
# define R100_TRACK_COMP_NONE 0
# define R100_TRACK_COMP_DXT1 1
# define R100_TRACK_COMP_DXT35 2
2009-09-01 09:25:57 +04:00
struct r100_cs_track_texture {
2009-11-20 16:29:23 +03:00
struct radeon_bo * robj ;
2009-09-01 09:25:57 +04:00
struct r100_cs_cube_info cube_info [ 5 ] ; /* info for 5 non-primary faces */
unsigned pitch ;
unsigned width ;
unsigned height ;
unsigned num_levels ;
unsigned cpp ;
unsigned tex_coord_type ;
unsigned txdepth ;
unsigned width_11 ;
unsigned height_11 ;
bool use_pitch ;
bool enabled ;
2010-10-27 09:02:35 +04:00
bool lookup_disable ;
2009-09-01 09:25:57 +04:00
bool roundup_w ;
bool roundup_h ;
2009-12-07 06:16:06 +03:00
unsigned compress_format ;
2009-09-01 09:25:57 +04:00
} ;
struct r100_cs_track {
unsigned num_cb ;
unsigned num_texture ;
unsigned maxy ;
unsigned vtx_size ;
unsigned vap_vf_cntl ;
2010-02-21 23:24:15 +03:00
unsigned vap_alt_nverts ;
2009-09-01 09:25:57 +04:00
unsigned immd_dwords ;
unsigned num_arrays ;
unsigned max_indx ;
2009-12-17 08:02:28 +03:00
unsigned color_channel_mask ;
2011-06-10 18:41:26 +04:00
struct r100_cs_track_array arrays [ 16 ] ;
2009-09-01 09:25:57 +04:00
struct r100_cs_track_cb cb [ R300_MAX_CB ] ;
struct r100_cs_track_cb zb ;
2011-02-14 03:01:10 +03:00
struct r100_cs_track_cb aa ;
2009-09-01 09:25:57 +04:00
struct r100_cs_track_texture textures [ R300_TRACK_MAX_TEXTURE ] ;
bool z_enabled ;
bool separate_cube ;
2010-04-13 04:33:36 +04:00
bool zb_cb_clear ;
2009-12-17 08:02:28 +03:00
bool blend_read_enable ;
2011-02-12 21:21:35 +03:00
bool cb_dirty ;
bool zb_dirty ;
bool tex_dirty ;
2011-02-14 03:01:10 +03:00
bool aa_dirty ;
bool aaresolve ;
2009-09-01 09:25:57 +04:00
} ;
int r100_cs_track_check ( struct radeon_device * rdev , struct r100_cs_track * track ) ;
void r100_cs_track_clear ( struct radeon_device * rdev , struct r100_cs_track * track ) ;
int r100_cs_packet_parse_vline ( struct radeon_cs_parser * p ) ;
int r200_packet0_check ( struct radeon_cs_parser * p ,
struct radeon_cs_packet * pkt ,
unsigned idx , unsigned reg ) ;
2011-10-14 03:08:46 +04:00
int r100_reloc_pitch_offset ( struct radeon_cs_parser * p ,
struct radeon_cs_packet * pkt ,
unsigned idx ,
unsigned reg ) ;
int r100_packet3_load_vbpntr ( struct radeon_cs_parser * p ,
struct radeon_cs_packet * pkt ,
int idx ) ;