On Fri, Jan 26, 2018 at 5:59 PM, Jason Ekstrand <ja...@jlekstrand.net> wrote:
> 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 > I finally got around to running this series on CNL today and the 11_11_10 stuff doesn't quite work. There are some YcBcR tests in the Vulkan CTS which copy to/from 11_11_10 and they fail due to nan-flushing issues. In particular, the tests upload some pixels where one of the values is the 11-bit representation of infinity. Somewhere in the process of converting to/from float, the mantissa bits get lost (it's inf after all). I could spend a bunch of time trying to debug it or we could just leave CCS_E disabled on ISL_FORMAT_R11G11B10_FLOAT for now. In light of this, I've dropped patch 28 and left the R11G11B10_FLOAT restriction in place in patch 29. With that, this series passes the Vulkan CTS on CNL. > 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 > >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev