nouveau: Use proper SIFM object on NV30
authorPatrice Mandin <patmandin@gmail.com>
Wed, 4 Mar 2009 19:34:54 +0000 (20:34 +0100)
committerPatrice Mandin <patmandin@gmail.com>
Wed, 4 Mar 2009 19:34:54 +0000 (20:34 +0100)
src/gallium/drivers/nv04/nv04_surface_2d.c

index e8fd3166ab8f1ee8482d70cc7140ca4567e3f81a..3c8257ad256041927da3377e35fefc8f4eff754c 100644 (file)
@@ -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);