[Mesa-dev] [PATCH v2] mesa: Add _mesa_format_fallback_rgba_to_rgbx()

Chad Versace chadversary at chromium.org
Tue Jun 27 19:21:29 UTC 2017


On Tue 20 Jun 2017, Jason Ekstrand wrote:
> From: Chad Versace <chadversary at chromium.org>
> 
> The new function takes a mesa_format and, if the format is an alpha
> format with a non-alpha variant, returns the non-alpha format.
> Otherwise, it returns the original format.
> 
> Example:
>   input -> output
> 
>   // Fallback exists
>   MESA_FORMAT_R8G8B8X8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM
>   MESA_FORMAT_RGBX_UNORM16 -> MESA_FORMAT_RGBA_UNORM16
> 
>   // No fallback
>   MESA_FORMAT_R8G8B8A8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM
>   MESA_FORMAT_Z_FLOAT32 -> MESA_FORMAT_Z_FLOAT32
> 
> i965 will use this for EGLImages and DRIimages.
> 
> v2 (Jason Ekstrand):
>  - Use mako
>  - Rework to be easier to read
>  - Write directly to the output file
> ---

Today, I sent this in v2 of my i965-r8g8b8x8 patch series.


More information about the mesa-dev mailing list