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

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


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?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the mesa-dev mailing list