[Mesa-dev] [PATCH 0/3 v2] i965: Add RGBX, RGBA configs, even on gen9

Chad Versace chadversary at chromium.org
Tue Jun 27 18:00:45 UTC 2017


The Android framework requires support for EGLConfigs with
HAL_PIXEL_FORMAT_RGBX_8888 and HAL_PIXEL_FORMAT_RGBA_8888. This prevents
Chrome OS from updating its Android drivers, because earlier this year
Intel disabled all rgbx formats for gen >=9 in brw_surface_formats.c.
This patch series safely (hopefully?) fixes that problem.


v2:
  - Use Jason's rewrite of patch for _mesa_format_fallback_rgbx_to_rgba.
  - Rebase on master.

I previously discussed using ctx->dd.ChooseTextureFormat for the
rfbx->rgba fallback in glEGLImageTextureTarget2D(), but decided against
it after investigating it more closely. The problem is that
ctx->dd.ChooseTextureFormat is not aware of channel order, and so
may choose the wrong format.

Testing:
    - I did all testing on Skylake.
    - Confirmed glxgears have correct colors.
    - Confirmed Amarok has correct colors.
    - Tested with dEQP, master at 7bff163e7f on Wayland and X11:

      > deqp-egl --deqp-case='dEQP-EGL.functional.image.modify.*'
      Test run totals:
        Passed:        24/37 (64.9%)
        Failed:        0/37 (0.0%)
        Not supported: 13/37 (35.1%)
        Warnings:      0/37 (0.0%)

This patch series lives on the tag
    http://git.kiwitree.net/cgit/~chadv/mesa/tag/?h=chadv/review/i965-r8g8b8x8-config-v02

Chad Versace (3):
  mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]
  i965: Add a RGBX->RGBA fallback for glEGLImageTextureTarget2D()
  i965/dri: Support R8G8B8A8 and R8G8B8X8 configs

 src/mesa/Android.gen.mk                     |  12 ++++
 src/mesa/Makefile.am                        |   7 ++
 src/mesa/Makefile.sources                   |   1 +
 src/mesa/drivers/dri/i965/intel_fbo.c       |  23 +++++-
 src/mesa/drivers/dri/i965/intel_screen.c    |  23 +++++-
 src/mesa/drivers/dri/i965/intel_tex_image.c |  18 ++++-
 src/mesa/main/.gitignore                    |   1 +
 src/mesa/main/format_fallback.py            | 104 ++++++++++++++++++++++++++++
 src/mesa/main/formats.h                     |   6 ++
 9 files changed, 190 insertions(+), 5 deletions(-)
 create mode 100644 src/mesa/main/format_fallback.py

--
2.13.0



More information about the mesa-dev mailing list