[Mesa-dev] [PATCH 1/3] mesa: Fold gallium's texture border

Eric Anholt eric at anholt.net
Tue Oct 25 14:58:51 PDT 2011


On Mon, 24 Oct 2011 19:23:53 -0600, Brian Paul <brian.e.paul at gmail.com> wrote:
> On Mon, Oct 24, 2011 at 5:15 PM, Eric Anholt <eric at anholt.net> wrote:
> > @@ -2322,6 +2363,16 @@ teximage(struct gl_context *ctx, GLuint dims,
> >          return;   /* error was recorded */
> >       }
> >
> > +      /* Allow a hardware driver to just strip out the border, to provide
> > +       * reliable but slightly incorrect hardware rendering instead of
> > +       * rarely-tested software fallback rendering.
> > +       */
> > +      if (border && ctx->Texture.StripTextureBorder) {
> > +        strip_texture_border(&border, &width, &height, &depth, unpack,
> > +                             &unpack_no_border);
> > +        unpack = &unpack_no_border;
> > +      }
> > +
> 
> I think we also need this code in the glCopyTexImage() path.
> 
> -Brian

Good point.  I made the fix for that, then made a testcase, then fixed
the fix.

I also ended up deleting a bit more Intel code, which caught some
silliness where we do mappings to store data for 0-sized textures,
which made the driver now assert in an ES2 conformance case after
deleting more Border code.  I think this is a good fix for the
problem, by just bailing out of texstore instead of making the caller
avoid texstore in these cases.



More information about the mesa-dev mailing list