diff options
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_chipset.c | 57 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_chipset.h | 27 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_query.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_texture_desc.c | 12 |
5 files changed, 38 insertions, 64 deletions
diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c index beaa1f46e50..11061edc590 100644 --- a/src/gallium/drivers/r300/r300_chipset.c +++ b/src/gallium/drivers/r300/r300_chipset.c @@ -22,6 +22,7 @@ * USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "r300_chipset.h" +#include "../../winsys/radeon/drm/radeon_winsys.h" #include "util/u_debug.h" #include "util/u_memory.h" @@ -62,7 +63,7 @@ void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps) switch (pci_id) { #define CHIPSET(pci_id, name, chipfamily) \ case pci_id: \ - caps->family = CHIP_FAMILY_##chipfamily; \ + caps->family = CHIP_##chipfamily; \ break; #include "pci_ids/r300_pci_ids.h" #undef CHIPSET @@ -81,71 +82,71 @@ void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps) switch (caps->family) { - case CHIP_FAMILY_R300: - case CHIP_FAMILY_R350: + case CHIP_R300: + case CHIP_R350: caps->high_second_pipe = TRUE; caps->num_vert_fpus = 4; caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; - case CHIP_FAMILY_RV350: - case CHIP_FAMILY_RV370: + case CHIP_RV350: + case CHIP_RV370: caps->high_second_pipe = TRUE; caps->num_vert_fpus = 2; caps->zmask_ram = RV3xx_ZMASK_SIZE; break; - case CHIP_FAMILY_RV380: + case CHIP_RV380: caps->high_second_pipe = TRUE; caps->num_vert_fpus = 2; caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = RV3xx_ZMASK_SIZE; break; - case CHIP_FAMILY_RS400: - case CHIP_FAMILY_RS600: - case CHIP_FAMILY_RS690: - case CHIP_FAMILY_RS740: + case CHIP_RS400: + case CHIP_RS600: + case CHIP_RS690: + case CHIP_RS740: break; - case CHIP_FAMILY_RC410: - case CHIP_FAMILY_RS480: + case CHIP_RC410: + case CHIP_RS480: caps->zmask_ram = RV3xx_ZMASK_SIZE; break; - case CHIP_FAMILY_R420: - case CHIP_FAMILY_R423: - case CHIP_FAMILY_R430: - case CHIP_FAMILY_R480: - case CHIP_FAMILY_R481: - case CHIP_FAMILY_RV410: + case CHIP_R420: + case CHIP_R423: + case CHIP_R430: + case CHIP_R480: + case CHIP_R481: + case CHIP_RV410: caps->num_vert_fpus = 6; caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; - case CHIP_FAMILY_R520: + case CHIP_R520: caps->num_vert_fpus = 8; caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; - case CHIP_FAMILY_RV515: + case CHIP_RV515: caps->num_vert_fpus = 2; caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; - case CHIP_FAMILY_RV530: + case CHIP_RV530: caps->num_vert_fpus = 5; caps->hiz_ram = RV530_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; - case CHIP_FAMILY_R580: - case CHIP_FAMILY_RV560: - case CHIP_FAMILY_RV570: + case CHIP_R580: + case CHIP_RV560: + case CHIP_RV570: caps->num_vert_fpus = 8; caps->hiz_ram = RV530_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; @@ -153,12 +154,12 @@ void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps) } caps->num_tex_units = 16; - caps->is_r400 = caps->family >= CHIP_FAMILY_R420 && caps->family < CHIP_FAMILY_RV515; - caps->is_r500 = caps->family >= CHIP_FAMILY_RV515; - caps->is_rv350 = caps->family >= CHIP_FAMILY_RV350; + caps->is_r400 = caps->family >= CHIP_R420 && caps->family < CHIP_RV515; + caps->is_r500 = caps->family >= CHIP_RV515; + caps->is_rv350 = caps->family >= CHIP_RV350; caps->z_compress = caps->is_rv350 ? R300_ZCOMP_8X8 : R300_ZCOMP_4X4; caps->dxtc_swizzle = caps->is_r400 || caps->is_r500; - caps->has_us_format = caps->family == CHIP_FAMILY_R520; + caps->has_us_format = caps->family == CHIP_R520; caps->has_tcl = caps->num_vert_fpus > 0; if (caps->has_tcl) { diff --git a/src/gallium/drivers/r300/r300_chipset.h b/src/gallium/drivers/r300/r300_chipset.h index f96cdaf2580..f8b5d4e3d3e 100644 --- a/src/gallium/drivers/r300/r300_chipset.h +++ b/src/gallium/drivers/r300/r300_chipset.h @@ -88,33 +88,6 @@ struct r300_capabilities { boolean has_us_format; }; -/* Enumerations for legibility and telling which card we're running on. */ -enum { - CHIP_FAMILY_R300 = 0, /* R3xx-based cores. */ - CHIP_FAMILY_R350, - CHIP_FAMILY_RV350, - CHIP_FAMILY_RV370, - CHIP_FAMILY_RV380, - CHIP_FAMILY_RS400, - CHIP_FAMILY_RC410, - CHIP_FAMILY_RS480, - CHIP_FAMILY_R420, /* R4xx-based cores. */ - CHIP_FAMILY_R423, - CHIP_FAMILY_R430, - CHIP_FAMILY_R480, - CHIP_FAMILY_R481, - CHIP_FAMILY_RV410, - CHIP_FAMILY_RS600, - CHIP_FAMILY_RS690, - CHIP_FAMILY_RS740, - CHIP_FAMILY_RV515, /* R5xx-based cores. */ - CHIP_FAMILY_R520, - CHIP_FAMILY_RV530, - CHIP_FAMILY_R580, - CHIP_FAMILY_RV560, - CHIP_FAMILY_RV570 -}; - void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps); #endif /* R300_CHIPSET_H */ diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 1700cbb4667..3f61444abea 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -632,7 +632,7 @@ void r300_emit_query_start(struct r300_context *r300, unsigned size, void*state) return; BEGIN_CS(size); - if (r300->screen->caps.family == CHIP_FAMILY_RV530) { + if (r300->screen->caps.family == CHIP_RV530) { OUT_CS_REG(RV530_FG_ZBREG_DEST, RV530_FG_ZBREG_DEST_PIPE_SELECT_ALL); } else { OUT_CS_REG(R300_SU_REG_DEST, R300_RASTER_PIPE_SELECT_ALL); @@ -735,7 +735,7 @@ void r300_emit_query_end(struct r300_context* r300) if (query->begin_emitted == FALSE) return; - if (caps->family == CHIP_FAMILY_RV530) { + if (caps->family == CHIP_RV530) { if (r300->screen->info.r300_num_z_pipes == 2) rv530_emit_query_end_double_z(r300, query); else diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index 4443362d102..e338c57ed80 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -52,7 +52,7 @@ static struct pipe_query *r300_create_query(struct pipe_context *pipe, return (struct pipe_query*)q; } - if (r300screen->caps.family == CHIP_FAMILY_RV530) + if (r300screen->caps.family == CHIP_RV530) q->num_pipes = r300screen->info.r300_num_z_pipes; else q->num_pipes = r300screen->info.r300_num_gb_pipes; diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c index 9493eb19c28..590f6b9a467 100644 --- a/src/gallium/drivers/r300/r300_texture_desc.c +++ b/src/gallium/drivers/r300/r300_texture_desc.c @@ -115,9 +115,9 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen, unsigned level) { unsigned tile_width, width, stride; - boolean is_rs690 = (screen->caps.family == CHIP_FAMILY_RS600 || - screen->caps.family == CHIP_FAMILY_RS690 || - screen->caps.family == CHIP_FAMILY_RS740); + boolean is_rs690 = (screen->caps.family == CHIP_RS600 || + screen->caps.family == CHIP_RS690 || + screen->caps.family == CHIP_RS740); if (tex->tex.stride_in_bytes_override) return tex->tex.stride_in_bytes_override; @@ -214,7 +214,7 @@ static void r300_setup_miptree(struct r300_screen *screen, { struct pipe_resource *base = &tex->b.b; unsigned stride, size, layer_size, nblocksy, i; - boolean rv350_mode = screen->caps.family >= CHIP_FAMILY_R350; + boolean rv350_mode = screen->caps.family >= CHIP_R350; boolean aligned_for_cbzb; tex->tex.size_in_bytes = 0; @@ -353,7 +353,7 @@ static void r300_setup_hyperz_properties(struct r300_screen *screen, tex->tex.microtile) { unsigned i, pipes; - if (screen->caps.family == CHIP_FAMILY_RV530) { + if (screen->caps.family == CHIP_RV530) { pipes = screen->info.r300_num_z_pipes; } else { pipes = screen->info.r300_num_gb_pipes; @@ -414,7 +414,7 @@ static void r300_setup_tiling(struct r300_screen *screen, struct r300_resource *tex) { enum pipe_format format = tex->b.b.format; - boolean rv350_mode = screen->caps.family >= CHIP_FAMILY_R350; + boolean rv350_mode = screen->caps.family >= CHIP_R350; boolean is_zb = util_format_is_depth_or_stencil(format); boolean dbg_no_tiling = SCREEN_DBG_ON(screen, DBG_NO_TILING); |