summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/r600/drm/r600.c
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2010-09-20 11:58:00 -0400
committerJerome Glisse <[email protected]>2010-09-20 11:59:20 -0400
commit363dfb83f1ca7f1ab09eec30aeb89732c5ce3e02 (patch)
tree909be9a4766d6af3f5a22730a9595e8ed2a23921 /src/gallium/winsys/r600/drm/r600.c
parent6ea16b6c510ee7f0e68505838a99562f0852f8e4 (diff)
r600g: move chip class to radeon common structure
So texture code can be shared btw new state design & old one. Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/winsys/r600/drm/r600.c')
-rw-r--r--src/gallium/winsys/r600/drm/r600.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/gallium/winsys/r600/drm/r600.c b/src/gallium/winsys/r600/drm/r600.c
index af9b9187ab1..fdcadffc532 100644
--- a/src/gallium/winsys/r600/drm/r600.c
+++ b/src/gallium/winsys/r600/drm/r600.c
@@ -32,6 +32,11 @@ enum radeon_family r600_get_family(struct radeon *r600)
return r600->family;
}
+enum chip_class r600_get_family_class(struct radeon *radeon)
+{
+ return radeon->chip_class;
+}
+
static int r600_get_device(struct radeon *r600)
{
struct drm_radeon_info info;
@@ -117,6 +122,37 @@ struct radeon *r600_new(int fd, unsigned device)
R600_ERR("unknown or unsupported chipset 0x%04X\n", r600->device);
break;
}
+
+ /* setup class */
+ switch (r600->family) {
+ case CHIP_R600:
+ case CHIP_RV610:
+ case CHIP_RV630:
+ case CHIP_RV670:
+ case CHIP_RV620:
+ case CHIP_RV635:
+ case CHIP_RS780:
+ case CHIP_RS880:
+ r600->chip_class = R600;
+ break;
+ case CHIP_RV770:
+ case CHIP_RV730:
+ case CHIP_RV710:
+ case CHIP_RV740:
+ r600->chip_class = R700;
+ break;
+ case CHIP_CEDAR:
+ case CHIP_REDWOOD:
+ case CHIP_JUNIPER:
+ case CHIP_CYPRESS:
+ case CHIP_HEMLOCK:
+ r600->chip_class = EVERGREEN;
+ break;
+ default:
+ R600_ERR("unknown or unsupported chipset 0x%04X\n", r600->device);
+ break;
+ }
+
return r600;
}