[Mesa-dev] [PATCH 00/13] Enable fp16 visuals and fbconfigs

Kevin Strasser kevin.strasser at intel.com
Mon Jan 28 18:42:43 UTC 2019


This series enables fp16 fbconfigs and visuals by leveraging existing
off-screen rendering support.

These formats can be used in conjunction with EXT_surface_SMPTE2086_metadata
(not yet implemented by any drivers) to support EXT_gl_colorspace_scrgb /
EXT_gl_colorspace_scrgb_linear, used in places like Android wide color
gamut.

I have submitted kernel patches to add the drm formats and implement them in
the i915 driver:
  https://patchwork.freedesktop.org/series/53213/

As an easy smoke test I have a modified version of kmscube:
  https://gitlab.freedesktop.org/strassek/kmscube/commits/fp16

The new wayland visuals require fp16 definitions to be provided by
libwayland headers:
  https://gitlab.freedesktop.org/strassek/wayland/commits/fp16

To help test the wayland bits, I have modified a couple of the test clients
in weston:
  https://gitlab.freedesktop.org/strassek/weston/commits/fp16

Kevin Strasser (13):
  egl/dri: Avoid out of bounds array access
  drm-uapi: Add fp16 formats to drm_fourcc.h
  dri: Add config attributes for color channel shift
  egl: Convert configs to use shifts instead of masks
  glx: Add fields for color shifts
  dri: Handle configs with floating point pixel data
  egl: Handle dri configs with floating point pixel data
  dri: Add fp16 formats
  dri: Define allow_fp16_configs and DRI_LOADER_CAP_FP16
  i965: Add handling for fp16 configs
  gallium: Add buffer and configs handling or fp16 formats
  gbm: Add buffer handling and visuals for fp16 formats
  wayland: Add buffer handling and visuals for fp16 formats

 include/GL/internal/dri_interface.h                | 11 ++-
 include/drm-uapi/drm_fourcc.h                      |  9 +++
 src/egl/drivers/dri2/egl_dri2.c                    | 72 +++++++++++++++---
 src/egl/drivers/dri2/egl_dri2.h                    |  8 +-
 src/egl/drivers/dri2/platform_android.c            | 12 +--
 src/egl/drivers/dri2/platform_drm.c                | 53 +++++++------
 src/egl/drivers/dri2/platform_surfaceless.c        | 10 +--
 src/egl/drivers/dri2/platform_wayland.c            | 87 +++++++++++++++++-----
 src/egl/drivers/dri2/platform_x11.c                | 20 ++---
 src/egl/wayland/wayland-drm/wayland-drm.c          |  6 ++
 src/egl/wayland/wayland-drm/wayland-drm.xml        |  2 +
 .../auxiliary/pipe-loader/driinfo_gallium.h        |  1 +
 src/gallium/state_trackers/dri/dri2.c              | 22 ++++++
 src/gallium/state_trackers/dri/dri_drawable.c      |  3 +
 src/gallium/state_trackers/dri/dri_screen.c        | 27 ++++++-
 src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c  |  2 +-
 src/gbm/backends/dri/gbm_dri.c                     | 62 +++++++++++----
 src/gbm/backends/dri/gbm_driint.h                  | 11 +--
 src/gbm/main/gbm.c                                 |  3 +
 src/gbm/main/gbm.h                                 |  9 +++
 src/glx/dri_common.c                               |  4 +
 src/glx/glxconfig.h                                |  1 +
 src/loader/loader_dri3_helper.c                    |  5 ++
 src/mesa/drivers/dri/common/dri_util.c             |  8 ++
 src/mesa/drivers/dri/common/utils.c                | 58 +++++++++++++++
 src/mesa/drivers/dri/i965/intel_screen.c           | 39 +++++++++-
 src/mesa/main/context.c                            |  6 +-
 src/mesa/main/mtypes.h                             |  1 +
 src/mesa/state_tracker/st_cb_fbo.c                 |  3 +
 src/util/xmlpool/t_options.h                       |  5 ++
 30 files changed, 462 insertions(+), 98 deletions(-)

-- 
2.7.4



More information about the mesa-dev mailing list