diff options
author | Jerome Glisse <[email protected]> | 2013-01-04 16:34:52 -0500 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2013-01-07 11:06:07 -0500 |
commit | ca474f98f2cda5cb333e9f851c7e0e31c9a6f823 (patch) | |
tree | 8e046880ece999573bb7dae4b471156c96a06fcf /src/gallium/drivers/r600/r600_pipe.c | |
parent | d499ff98cd69c9ec6c43ad8ececa4c3b61889ab9 (diff) |
radeon/winsys: move radeon family/class identification to winsys
Upcoming async dma support rely on winsys knowing about GPU families.
Signed-off-by: Jerome Glisse <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 7a7a4315ec8..29ef988372b 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -917,17 +917,6 @@ static int r600_init_tiling(struct r600_screen *rscreen) } } -static unsigned radeon_family_from_device(unsigned device) -{ - switch (device) { -#define CHIPSET(pciid, name, family) case pciid: return CHIP_##family; -#include "pci_ids/r600_pci_ids.h" -#undef CHIPSET - default: - return CHIP_UNKNOWN; - } -} - static uint64_t r600_get_timestamp(struct pipe_screen *screen) { struct r600_screen *rscreen = (struct r600_screen*)screen; @@ -947,24 +936,14 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) rscreen->ws = ws; ws->query_info(ws, &rscreen->info); - rscreen->family = radeon_family_from_device(rscreen->info.pci_id); + rscreen->family = rscreen->info.family; + rscreen->chip_class = rscreen->info.chip_class; if (rscreen->family == CHIP_UNKNOWN) { fprintf(stderr, "r600: Unknown chipset 0x%04X\n", rscreen->info.pci_id); FREE(rscreen); return NULL; } - /* setup class */ - if (rscreen->family >= CHIP_CAYMAN) { - rscreen->chip_class = CAYMAN; - } else if (rscreen->family >= CHIP_CEDAR) { - rscreen->chip_class = EVERGREEN; - } else if (rscreen->family >= CHIP_RV770) { - rscreen->chip_class = R700; - } else { - rscreen->chip_class = R600; - } - /* Figure out streamout kernel support. */ switch (rscreen->chip_class) { case R600: @@ -981,6 +960,9 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) case CAYMAN: rscreen->has_streamout = rscreen->info.drm_minor >= 14; break; + default: + rscreen->has_streamout = FALSE; + break; } /* MSAA support. */ @@ -1001,6 +983,10 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) /* We should be able to read compressed MSAA textures, but it doesn't work. */ rscreen->msaa_texture_support = MSAA_TEXTURE_SAMPLE_ZERO; break; + default: + rscreen->has_msaa = FALSE; + rscreen->msaa_texture_support = 0; + break; } if (r600_init_tiling(rscreen)) { |