[Mesa-dev] [PATCH 2/2] i915: fallback for NPOT cubemap texture

Eric Anholt eric at anholt.net
Wed Feb 29 11:44:59 PST 2012


On Wed, 29 Feb 2012 15:11:06 +0800, Yuanhan Liu <yuanhan.liu at linux.intel.com> wrote:
> According to 3DSTATE_MAP_STATE at page of 104 in Bspec
> vol3d 3D Instructions:
>   [DevGDG and DevAlv]: Must be a power of 2 for cube maps
> 
> Well, it turned out to be that we need do this for other
> platforms as well, like pineview.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46666
> 
> NOTE: This is a candidate for stable release branches.
> 
> Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> ---
>  src/mesa/drivers/dri/i915/i915_texstate.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
> index 0e500e2..e3ab50e 100644
> --- a/src/mesa/drivers/dri/i915/i915_texstate.c
> +++ b/src/mesa/drivers/dri/i915/i915_texstate.c
> @@ -319,6 +319,18 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
>             ((wt != GL_CLAMP) && (wt != GL_CLAMP_TO_EDGE))))
>            return false;
>  
> +      /*
> +       * According to 3DSTATE_MAP_STATE at page of 104 in Bspec
> +       * Vol3d 3D Instructions:
> +       *   [DevGDG and DevAlv]: Must be a power of 2 for cube maps.
> +       *
> +       * Well, it turned out to be that we need do this for other
> +       * platforms as well, like pineview.
> +       */
> +      if (tObj->Target == GL_TEXTURE_CUBE_MAP_ARB &&
> +          !is_power_of_two(firstImage->Height))
> +         return false;
> +

Pineview should be DevBLB derived, which doens't have so that
requirement, so this doesn't really make sense to me.  Have you looked
at the rendering to see what's going on?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120229/b7a63b70/attachment.pgp>


More information about the mesa-dev mailing list