[Mesa-dev] [PATCH 12/13] mesa: rework texture completeness testing

Eric Anholt eric at anholt.net
Tue Mar 20 00:05:37 PDT 2012


On Sun, 18 Mar 2012 10:49:28 -0600, Brian Paul <brianp at vmware.com> wrote:
> -    * Do mipmap consistency checking
> +    * Do mipmap consistency checking.
> +    * Note: we don't care about the current texture sampler state here.
> +    * To determine texture completeness we'll either look at _BaseComplete
> +    * or _MipmapComplete depending on the current minification filter mode.
>      */
> -   if (t->Sampler.MinFilter != GL_NEAREST && t->Sampler.MinFilter != GL_LINEAR) {
> -      /*
> -       * Mipmapping: determine if we have a complete set of mipmaps
> -       */
> +   {
>        GLint i;
>        const GLint minLevel = baseLevel;
>        const GLint maxLevel = t->_MaxLevel;
>        GLuint width, height, depth, face, numFaces = 1;
>  
>        if (minLevel > maxLevel) {
> -         incomplete(t, "minLevel > maxLevel");
> +         incomplete(t, 0, "minLevel > maxLevel");
>           return;
>        }

s/0/BASE/ here?

> diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
> index ea59ccf..f9c190a 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -1243,7 +1243,7 @@ st_finalize_texture(struct gl_context *ctx,
>     enum pipe_format firstImageFormat;
>     GLuint ptWidth, ptHeight, ptDepth, ptLayers;
>  
> -   if (stObj->base._Complete) {
> +   if (_mesa_is_texture_complete(tObj, &tObj->Sampler)) {
>        /* The texture is complete and we know exactly how many mipmap levels
>         * are present/needed.  This is conditional because we may be called
>         * from the st_generate_mipmap() function when the texture object is

Shouldn't this have conditionally used the sampler object from the unit,
like the other blocks?

Also, I think the change to the intel driver for _Complete replacement was missed.
-------------- 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/20120320/7c24480b/attachment.pgp>


More information about the mesa-dev mailing list