From cf0d91ae1d627381b632de63e5cb85494b277eb4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 15 Feb 2008 14:52:58 -0500 Subject: Add IS_915(), simplify IS_9XX() a bit. --- src/mesa/drivers/dri/intel/intel_chipset.h | 29 +++++++++++++---------------- src/mesa/drivers/dri/intel/intel_screen.c | 6 ++---- 2 files changed, 15 insertions(+), 20 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h index 168dc724db..3c8fd2384e 100644 --- a/src/mesa/drivers/dri/intel/intel_chipset.h +++ b/src/mesa/drivers/dri/intel/intel_chipset.h @@ -65,6 +65,17 @@ #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 || \ @@ -73,20 +84,6 @@ 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) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 2392c2c49c..d91bb38e30 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -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); } -- cgit v1.2.3