diff options
author | Dave Airlie <[email protected]> | 2010-07-21 15:39:01 +1000 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-07-21 17:05:36 -0400 |
commit | 9433d0e8010bfe182762f8d2bd856a416a7f93bb (patch) | |
tree | 4dca8302ca2bd3c6af56b36195f654a596e3a682 /src/gallium | |
parent | 1a3fa3e91089d534b8219518a44ae8ada66be3e3 (diff) |
r600g: add family retrival
allow pipe driver to get the family of the gpu.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/r600_screen.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/r600/radeon.h | 2 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/radeon.c | 5 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_screen.c b/src/gallium/drivers/r600/r600_screen.c index 20758b049c5..dec6fa8d272 100644 --- a/src/gallium/drivers/r600/r600_screen.c +++ b/src/gallium/drivers/r600/r600_screen.c @@ -41,7 +41,13 @@ static const char* r600_get_vendor(struct pipe_screen* pscreen) static const char* r600_get_name(struct pipe_screen* pscreen) { - return "R600/R700 (HD2XXX,HD3XXX,HD4XXX)"; + struct r600_screen *screen = r600_screen(pscreen); + enum radeon_family family = radeon_get_family(screen->rw); + + if (family >= CHIP_R600 && family < CHIP_RV770) + return "R600 (HD2XXX,HD3XXX)"; + else + return "R700 (HD4XXX)"; } static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param) diff --git a/src/gallium/drivers/r600/radeon.h b/src/gallium/drivers/r600/radeon.h index 2a82aadd8ce..3a8405f9b40 100644 --- a/src/gallium/drivers/r600/radeon.h +++ b/src/gallium/drivers/r600/radeon.h @@ -77,6 +77,8 @@ enum radeon_family { CHIP_LAST, }; +enum radeon_family radeon_get_family(struct radeon *rw); + /* * radeon object functions */ diff --git a/src/gallium/winsys/r600/drm/radeon.c b/src/gallium/winsys/r600/drm/radeon.c index f2113c5807e..7e656698064 100644 --- a/src/gallium/winsys/r600/drm/radeon.c +++ b/src/gallium/winsys/r600/drm/radeon.c @@ -25,6 +25,11 @@ #include "radeon_drm.h" #include "r600d.h" +enum radeon_family radeon_get_family(struct radeon *radeon) +{ + return radeon->family; +} + static int radeon_get_device(struct radeon *radeon) { struct drm_radeon_info info; |