From: Adam Jackson Date: Fri, 15 Feb 2008 19:52:58 +0000 (-0500) Subject: Add IS_915(), simplify IS_9XX() a bit. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf0d91ae1d627381b632de63e5cb85494b277eb4;p=mesa.git Add IS_915(), simplify IS_9XX() a bit. --- diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h index 168dc724db7..3c8fd2384e3 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 2392c2c49cc..d91bb38e30d 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); }