[Mesa-dev] [PATCH 00/29] blorp: Add support for more formats

Jason Ekstrand jason at jlekstrand.net
Sat Jan 27 01:59:29 UTC 2018


This series adds additional format support to BLORP.  In particular,
BLORP's blit and copy functions now handle:

 * Source and destination swizzles on all gens
 * Blitting to RGB formats (previously we only supported copying to RGB)
 * Blitting to RGBX even if it's not supported for rendering
 * Blitting to more exotic formats such as D24_UNORM and RGB9_E5
 * Copying to and from 10_10_10_2 and 11_11_10 formats with CCS_E

As a side-effect of this, BLORP should now be capable of doing basically
all of OpenGL format conversion for texture upload.  There are still a few
edge-cases around packing and maybe luminance/alpha but most of it should
be possible.  I have no intentions of actually doing this but some
enterprising person could pick it up.

This series also does some refactoring and improving of ISL since that
seemed better than just extending everything inside blorp.  We also get a
little format conversion library for NIR out of the deal.  If we ever want
to do image_load_store lowering in NIR, most of the format conversion code
is now written.

Happy Friday!


Jason Ekstrand (29):
  blorp: Handle the RGB workaround more like other workarounds
  i965/surface_state: Use an identity swizzle pre-Haswell
  intel/isl: Add an isl_swizzle_supports_rendering helper
  intel/isl: Add a helper for composing swizzles
  intel/isl: Add a helper for inverting swizzles
  intel/blorp: Add swizzle support for all hardware
  nir: Add the start of a format conversion helper header
  nir/format_convert: Add linear <-> sRGB helpers
  nir/format_convert: Add pack/unpack for R11F_G11F_B10F
  nir/format_convert: Add a function to pack RGB9_E5 formats
  intel/blorp: Include nir_format_convert.h in blorp_blit.c
  intel/blorp: Handle more exotic destination formats
  intel/isl: Add some helpers for working with RGBX formats
  intel/blorp: Silently convert RGBX destination formats to RGBA
  intel/blorp: Support the RGB workaround on more formats
  anv: Allow blitting to/from any supported format
  i965/blorp: Remove a pile of blorp_blit restrictions
  util/srgb: Add a float sRGB -> linear helper
  intel/isl/format: Add a column for channel order to the table
  intel/isl/format: Add field locations informations to channel_layout
  intel/isl/format: Get rid of the ALPHA colorspace
  intel/isl: Add format conversion code
  intel/blorp: Use ISL instead of bitcast_color_value_to_uint
  nir/format_convert: Add code for bitcasting vectors
  intel/blorp: Use nir_format_bitcast_uint_vec_unmasked
  intel/blorp: Add support for more format bitcasting
  intel/blorp: Allow CCS copies of 1010102 formats
  intel/blorp: Add blorp_copy support for ISL_FORMAT_R11G11B10_FLOAT
  intel/isl: Allow CCS_E on more formats

 src/compiler/Makefile.sources                    |   1 +
 src/compiler/nir/meson.build                     |   1 +
 src/compiler/nir/nir_format_convert.h            | 287 ++++++++++++
 src/intel/Makefile.compiler.am                   |   2 +-
 src/intel/Makefile.isl.am                        |   1 +
 src/intel/blorp/blorp_blit.c                     | 502 ++++++++++++--------
 src/intel/blorp/blorp_priv.h                     |  23 +-
 src/intel/isl/gen_format_layout.py               |  21 +-
 src/intel/isl/isl.c                              | 118 +++++
 src/intel/isl/isl.h                              |  37 ++
 src/intel/isl/isl_format.c                       | 270 ++++++++++-
 src/intel/isl/isl_format_layout.csv              | 558 +++++++++++------------
 src/intel/isl/isl_surface_state.c                |  37 +-
 src/intel/isl/meson.build                        |   2 +-
 src/intel/vulkan/anv_blorp.c                     |   3 +-
 src/intel/vulkan/anv_formats.c                   |  10 +-
 src/mesa/drivers/dri/i965/brw_blorp.c            |  67 ++-
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |   6 +
 src/util/format_srgb.h                           |  14 +
 19 files changed, 1390 insertions(+), 570 deletions(-)
 create mode 100644 src/compiler/nir/nir_format_convert.h

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list