Add IS_915(), simplify IS_9XX() a bit.
authorAdam Jackson <ajax@redhat.com>
Fri, 15 Feb 2008 19:52:58 +0000 (14:52 -0500)
committerAdam Jackson <ajax@redhat.com>
Fri, 15 Feb 2008 19:52:58 +0000 (14:52 -0500)
src/mesa/drivers/dri/intel/intel_chipset.h
src/mesa/drivers/dri/intel/intel_screen.c

index 168dc724db761802209efe893636e93b51d6f4ce..3c8fd2384e3ebc53ad5e2d5e0f681f59ad065d0b 100644 (file)
 
 #define IS_IGD(devid)  (devid == PCI_CHIP_IGD_GM)
 
+#define IS_915(devid)          (devid == PCI_CHIP_I915_G || \
+                                devid == PCI_CHIP_E7221_G || \
+                                devid == PCI_CHIP_I915_GM)
+
+#define IS_945(devid)          (devid == PCI_CHIP_I945_G || \
+                                devid == PCI_CHIP_I945_GM || \
+                                devid == PCI_CHIP_I945_GME || \
+                                devid == PCI_CHIP_G33_G || \
+                                devid == PCI_CHIP_Q33_G || \
+                                devid == PCI_CHIP_Q35_G)
+
 #define IS_965(devid)          (devid == PCI_CHIP_I965_G || \
                                 devid == PCI_CHIP_I965_Q || \
                                 devid == PCI_CHIP_I965_G_1 || \
                                 devid == PCI_CHIP_I946_GZ || \
                                 IS_IGD(devid))
 
-#define IS_9XX(devid)          (devid == PCI_CHIP_I915_G || \
-                                devid == PCI_CHIP_E7221_G || \
-                                devid == PCI_CHIP_I915_GM || \
-                                devid == PCI_CHIP_I945_G || \
-                                devid == PCI_CHIP_I945_GM || \
-                                devid == PCI_CHIP_I945_GME || \
-                                devid == PCI_CHIP_G33_G || \
-                                devid == PCI_CHIP_Q35_G || \
-                                devid == PCI_CHIP_Q33_G || \
+#define IS_9XX(devid)          (IS_915(devid) || \
+                                IS_945(devid) || \
                                 IS_965(devid))
-
-#define IS_945(devid)          (devid == PCI_CHIP_I945_G || \
-                                devid == PCI_CHIP_I945_GM || \
-                                devid == PCI_CHIP_I945_GME || \
-                                devid == PCI_CHIP_G33_G || \
-                                devid == PCI_CHIP_Q33_G || \
-                                devid == PCI_CHIP_Q35_G)
index 2392c2c49ccc0cecdca48e94003b673e09a3d647..d91bb38e30d038d959bc0a6f67b01eafe1706c1a 100644 (file)
@@ -645,11 +645,9 @@ intelCreateContext(const __GLcontextModes * mesaVis,
    intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private;
 
 #ifdef I915
-   if (IS_9XX(intelScreen->deviceID)) {
-      if (!IS_965(intelScreen->deviceID)) {
-        return i915CreateContext(mesaVis, driContextPriv,
+   if (IS_915(intelScreen->deviceID)) {
+      return i915CreateContext(mesaVis, driContextPriv,
                                  sharedContextPrivate);
-      }
    } else {
       return i830CreateContext(mesaVis, driContextPriv, sharedContextPrivate);
    }