[Mesa-dev] [PATCH] mesa: Avoid format converversions for TexImage with unsized internalFormat

Chris Wilson chris at chris-wilson.co.uk
Fri Sep 4 01:37:37 PDT 2015


On Fri, Sep 04, 2015 at 09:00:39AM +0100, Chris Wilson wrote:
> On Fri, Sep 04, 2015 at 08:51:25AM +0100, Chris Wilson wrote:
> > +   /* We use the user's pixel format and type as a guide for the texture
> > +    * format preferrring to store the texels in a matching format to the
> > +    * incoming pixels. This ideally allows for a conversion free upload
> > +    * and download path - but only if the requested internalFormat
> > +    * requires no conversion.
> > +    */
> > +   if (_mesa_is_enum_format_unsized(internalFormat)) {
> > +      /* unsized also implies no preferred internal datatype */
> > +      mesa_format tex_format = _mesa_format_from_format_and_type(format, type);
> 
> The issue here is that _mesa_format_from_format_and_type() doesn't
> recognise all possible patterns and asserts. Is there a safe it could
> return?

A second issue is how to resolve the render-to-texture conflicts, e.g.
gl-3.2-layered-rendering-framebuffer-layer-complete. Is exchanging
texture formats at that point a tractable solution?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the mesa-dev mailing list