From patchwork Tue Jun 7 19:34:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristian Hogsberg X-Patchwork-Id: 859402 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p57JhERs023277 for ; Tue, 7 Jun 2011 19:43:34 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A7649F7A0 for ; Tue, 7 Jun 2011 12:43:14 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id EEA439F67A for ; Tue, 7 Jun 2011 12:36:13 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 07 Jun 2011 12:36:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,333,1304319600"; d="scan'208";a="13132592" Received: from unknown (HELO intel.com) ([10.255.12.225]) by fmsmga002.fm.intel.com with ESMTP; 07 Jun 2011 12:36:13 -0700 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= To: intel-gfx@lists.freedesktop.org Date: Tue, 7 Jun 2011 15:34:19 -0400 Message-Id: <1307475261-32695-15-git-send-email-krh@bitplanet.net> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1307475261-32695-1-git-send-email-krh@bitplanet.net> References: <1307475261-32695-1-git-send-email-krh@bitplanet.net> Subject: [Intel-gfx] [PATCH 14/16] intel: Add is_855ish for handling 855 and 865 specific lod clamping X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Jun 2011 19:43:34 +0000 (UTC) --- 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;