[Intel-gfx] [PATCH 03/16] intel: IS_9XX is just gen >= 3
Kristian Høgsberg
krh at bitplanet.net
Tue Jun 7 21:34:08 CEST 2011
---
src/mesa/drivers/dri/intel/intel_chipset.h | 4 ----
src/mesa/drivers/dri/intel/intel_context.c | 2 +-
src/mesa/drivers/dri/intel/intel_screen.c | 10 ++++------
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h
index 2e4b11e..6c82e4d 100644
--- a/src/mesa/drivers/dri/intel/intel_chipset.h
+++ b/src/mesa/drivers/dri/intel/intel_chipset.h
@@ -155,7 +155,3 @@
IS_GEN5(devid) || \
IS_GEN6(devid) || \
IS_GEN7(devid))
-
-#define IS_9XX(devid) (IS_915(devid) || \
- IS_945(devid) || \
- IS_965(devid))
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 2ea52c2..01231ee 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -730,7 +730,7 @@ intelInitContext(struct intel_context *intel,
intel->has_luminance_srgb = GL_TRUE;
intel->is_g4x = GL_TRUE;
}
- } else if (IS_9XX(intel->intelScreen->deviceID)) {
+ } else if (intel->gen >= 3) {
if (IS_945(intel->intelScreen->deviceID)) {
intel->is_945 = GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 9939b4d..ee842a5 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -523,11 +523,9 @@ intelCreateContext(gl_api api,
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
struct intel_screen *intelScreen = sPriv->private;
- if (IS_9XX(intelScreen->deviceID)) {
- if (!IS_965(intelScreen->deviceID)) {
- return i915CreateContext(api, mesaVis, driContextPriv,
- sharedContextPrivate);
- }
+ if (intelScreen->gen == 3) {
+ return i915CreateContext(api, mesaVis, driContextPriv,
+ sharedContextPrivate);
} else {
intelScreen->no_vbo = GL_TRUE;
return i830CreateContext(mesaVis, driContextPriv, sharedContextPrivate);
@@ -638,7 +636,7 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
api_mask |= (1 << __DRI_API_GLES2);
#endif
- if (IS_9XX(intelScreen->deviceID) || IS_965(intelScreen->deviceID))
+ if (intelScreen->gen >= 3)
psp->api_mask = api_mask;
if (!intel_init_bufmgr(intelScreen))
--
1.7.4.4
More information about the Intel-gfx
mailing list