summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2009-03-04 20:34:54 +0100
committerPatrice Mandin <[email protected]>2009-03-04 20:34:54 +0100
commit69e42ec4568e824bf16271830751436afb2e8ef9 (patch)
tree9a31251c984df4a615a9ab7ea45a6c708b4b35f1 /src/gallium/drivers
parent368ca83a3fdfbe8dfe591ab73d29c500d1a91c0a (diff)
nouveau: Use proper SIFM object on NV30
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv04/nv04_surface_2d.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/drivers/nv04/nv04_surface_2d.c b/src/gallium/drivers/nv04/nv04_surface_2d.c
index e8fd3166ab8..3c8257ad256 100644
--- a/src/gallium/drivers/nv04/nv04_surface_2d.c
+++ b/src/gallium/drivers/nv04/nv04_surface_2d.c
@@ -437,13 +437,17 @@ nv04_surface_2d_init(struct nouveau_winsys *nvws)
return NULL;
}
- if (chan->device->chipset < 0x10) {
- class = NV04_SCALED_IMAGE_FROM_MEMORY;
- } else
- if (chan->device->chipset < 0x40) {
- class = NV10_SCALED_IMAGE_FROM_MEMORY;
- } else {
+ switch (chan->device->chipset & 0xf0) {
+ case 0x30:
+ class = NV30_SCALED_IMAGE_FROM_MEMORY;
+ break;
+ case 0x40:
+ case 0x60:
class = NV40_SCALED_IMAGE_FROM_MEMORY;
+ break;
+ default:
+ class = NV04_SCALED_IMAGE_FROM_MEMORY;
+ break;
}
ret = nouveau_grobj_alloc(chan, handle++, class, &ctx->sifm);