[Intel-gfx] [PATCH 06/16] intel: Add a is_945 bit to chipinfo and use that instead of IS_945
Kristian Høgsberg
krh at bitplanet.net
Tue Jun 7 21:34:11 CEST 2011
---
src/mesa/drivers/dri/intel/intel_chipset.h | 7 -------
src/mesa/drivers/dri/intel/intel_context.c | 8 +++-----
src/mesa/drivers/dri/intel/intel_screen.c | 2 +-
src/mesa/drivers/dri/intel/intel_screen.h | 1 +
4 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h
index 5d4aaab..66f14fd 100644
--- a/src/mesa/drivers/dri/intel/intel_chipset.h
+++ b/src/mesa/drivers/dri/intel/intel_chipset.h
@@ -109,13 +109,6 @@
#define IS_ILM(devid) (devid == PCI_CHIP_ILM_G)
#define IS_GEN5(devid) (IS_ILD(devid) || IS_ILM(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 || IS_IGD(devid))
-
#define IS_GEN4(devid) (devid == PCI_CHIP_I965_G || \
devid == PCI_CHIP_I965_Q || \
devid == PCI_CHIP_I965_G_1 || \
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 9765086..453292c 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -730,17 +730,15 @@ intelInitContext(struct intel_context *intel,
intel->has_luminance_srgb = GL_TRUE;
intel->is_g4x = GL_TRUE;
}
- } else if (intel->gen >= 3) {
- if (IS_945(intel->intelScreen->deviceID)) {
- intel->is_945 = GL_TRUE;
- }
- } else {
+ } else if (intel->gen == 2) {
if (intel->intelScreen->deviceID == PCI_CHIP_I830_M ||
intel->intelScreen->deviceID == PCI_CHIP_845_G) {
intel->has_xrgb_textures = GL_FALSE;
}
}
+ intel->is_945 = intelScreen->chipset.is_945;
+
intel_override_hiz(intel);
intel_override_separate_stencil(intel);
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index bce5a17..86b4000 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -452,7 +452,7 @@ static const struct intel_chipset intel_chipset_i915 = {
};
static const struct intel_chipset intel_chipset_i945 = {
- .gen = 3
+ .gen = 3, .is_945 = 1
};
static const struct intel_chipset_map chipset_map[] = {
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h
index 3d001aa..bfcc20d 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.h
+++ b/src/mesa/drivers/dri/intel/intel_screen.h
@@ -36,6 +36,7 @@
struct intel_chipset {
int gen;
+ GLboolean is_945;
};
struct intel_screen
--
1.7.4.4
More information about the Intel-gfx
mailing list