Mesa (gallium-0.2): i915: fallback for cube map texture.

Alan Hourihane alanh at kemper.freedesktop.org
Fri Dec 12 23:02:25 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: c8b505d8260cccf289c947c629471df8f5c81c0d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8b505d8260cccf289c947c629471df8f5c81c0d

Author: Xiang, Haihao <haihao.xiang at intel.com>
Date:   Thu Dec 11 14:03:00 2008 +0800

i915: fallback for cube map texture.

The i915 (and related graphics cores) only support TEXCOORDMODE_CLAMP and
TEXCOORDMODE_CUBE when using cube map texture coordinates, so fall back to
software rendering for other modes to avoid potential gpu hang issue. This
fixes scorched3d issue on 945GM(see bug 14539).

---

 src/mesa/drivers/dri/i915/i915_texstate.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index d1b0dcd..d53e2cb 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -295,6 +295,13 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
            wt == GL_CLAMP_TO_BORDER || wr == GL_CLAMP_TO_BORDER))
          return GL_FALSE;
 
+      /* Only support TEXCOORDMODE_CLAMP_EDGE and TEXCOORDMODE_CUBE (not 
+       * used) when using cube map texture coordinates
+       */
+      if (tObj->Target == GL_TEXTURE_CUBE_MAP_ARB &&
+          (((ws != GL_CLAMP) && (ws != GL_CLAMP_TO_EDGE)) ||
+           ((wr != GL_CLAMP) && (wr != GL_CLAMP_TO_EDGE))))
+          return GL_FALSE;
 
       state[I915_TEXREG_SS3] = ss3;     /* SS3_NORMALIZED_COORDS */
 




More information about the mesa-commit mailing list