[Intel-gfx] [PATCH 14/16] intel: Add is_855ish for handling 855 and 865 specific lod clamping
Kristian Høgsberg
krh at bitplanet.net
Tue Jun 7 21:34:19 CEST 2011
---
include/pci_ids/i915_pci_ids.h | 4 ++--
src/mesa/drivers/dri/i915/i830_texstate.c | 3 +--
src/mesa/drivers/dri/intel/intel_screen.c | 4 ++++
src/mesa/drivers/dri/intel/intel_screen.h | 2 +-
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/include/pci_ids/i915_pci_ids.h b/include/pci_ids/i915_pci_ids.h
index 551c010..5b5d1f8 100644
--- a/include/pci_ids/i915_pci_ids.h
+++ b/include/pci_ids/i915_pci_ids.h
@@ -1,7 +1,7 @@
CHIPSET(0x3577, I830_M, i8xx)
CHIPSET(0x2562, 845_G, i8xx)
-CHIPSET(0x3582, I855_GM, i8xx)
-CHIPSET(0x2572, I865_G, i8xx)
+CHIPSET(0x3582, I855_GM, i855)
+CHIPSET(0x2572, I865_G, i855)
CHIPSET(0x2582, I915_G, i915)
CHIPSET(0x258A, E7221_G, i915)
CHIPSET(0x2592, I915_GM, i915)
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index 3298dbb..9100e32 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -263,8 +263,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
*/
minlod_fixed = U_FIXED(CLAMP(sampler->MinLod, 0.0, 11), 4);
maxlod = MIN2(sampler->MaxLod, tObj->_MaxLevel - tObj->BaseLevel);
- if (intel->intelScreen->deviceID == PCI_CHIP_I855_GM ||
- intel->intelScreen->deviceID == PCI_CHIP_I865_G) {
+ if (intel->intelScreen->chipset.is_855ish) {
maxlod_fixed = U_FIXED(CLAMP(maxlod, 0.0, 11.75), 2);
maxlod_fixed = MAX2(maxlod_fixed, (minlod_fixed + 3) >> 2);
state[I830_TEXREG_TM0S3] |= maxlod_fixed << TM0S3_MIN_MIP_SHIFT;
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index a8732a8..94c39fb 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -447,6 +447,10 @@ static const struct intel_chipset intel_chipset_i8xx = {
.gen = 2
};
+static const struct intel_chipset intel_chipset_i855 = {
+ .gen = 2, .is_855ish = GL_TRUE
+};
+
static const struct intel_chipset intel_chipset_i915 = {
.gen = 3
};
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h
index 3a3ef40..177f619 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.h
+++ b/src/mesa/drivers/dri/intel/intel_screen.h
@@ -36,7 +36,7 @@
struct intel_chipset {
int gen;
- GLboolean is_945, is_g4x;
+ GLboolean is_855ish, is_945, is_g4x;
/* WM maximum threads is number of EUs times number of threads per EU. */
int wm_max_threads;
--
1.7.4.4
More information about the Intel-gfx
mailing list