<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 26, 2018 at 5:59 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This series adds additional format support to BLORP. In particular,<br>
BLORP's blit and copy functions now handle:<br>
<br>
* Source and destination swizzles on all gens<br>
* Blitting to RGB formats (previously we only supported copying to RGB)<br>
* Blitting to RGBX even if it's not supported for rendering<br>
* Blitting to more exotic formats such as D24_UNORM and RGB9_E5<br>
* Copying to and from 10_10_10_2 and 11_11_10 formats with CCS_E<br></blockquote><div><br></div><div>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.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As a side-effect of this, BLORP should now be capable of doing basically<br>
all of OpenGL format conversion for texture upload. There are still a few<br>
edge-cases around packing and maybe luminance/alpha but most of it should<br>
be possible. I have no intentions of actually doing this but some<br>
enterprising person could pick it up.<br>
<br>
This series also does some refactoring and improving of ISL since that<br>
seemed better than just extending everything inside blorp. We also get a<br>
little format conversion library for NIR out of the deal. If we ever want<br>
to do image_load_store lowering in NIR, most of the format conversion code<br>
is now written.<br>
<br>
Happy Friday!<br>
<br>
<br>
Jason Ekstrand (29):<br>
blorp: Handle the RGB workaround more like other workarounds<br>
i965/surface_state: Use an identity swizzle pre-Haswell<br>
intel/isl: Add an isl_swizzle_supports_rendering helper<br>
intel/isl: Add a helper for composing swizzles<br>
intel/isl: Add a helper for inverting swizzles<br>
intel/blorp: Add swizzle support for all hardware<br>
nir: Add the start of a format conversion helper header<br>
nir/format_convert: Add linear <-> sRGB helpers<br>
nir/format_convert: Add pack/unpack for R11F_G11F_B10F<br>
nir/format_convert: Add a function to pack RGB9_E5 formats<br>
intel/blorp: Include nir_format_convert.h in blorp_blit.c<br>
intel/blorp: Handle more exotic destination formats<br>
intel/isl: Add some helpers for working with RGBX formats<br>
intel/blorp: Silently convert RGBX destination formats to RGBA<br>
intel/blorp: Support the RGB workaround on more formats<br>
anv: Allow blitting to/from any supported format<br>
i965/blorp: Remove a pile of blorp_blit restrictions<br>
util/srgb: Add a float sRGB -> linear helper<br>
intel/isl/format: Add a column for channel order to the table<br>
intel/isl/format: Add field locations informations to channel_layout<br>
intel/isl/format: Get rid of the ALPHA colorspace<br>
intel/isl: Add format conversion code<br>
intel/blorp: Use ISL instead of bitcast_color_value_to_uint<br>
nir/format_convert: Add code for bitcasting vectors<br>
intel/blorp: Use nir_format_bitcast_uint_vec_<wbr>unmasked<br>
intel/blorp: Add support for more format bitcasting<br>
intel/blorp: Allow CCS copies of 1010102 formats<br>
intel/blorp: Add blorp_copy support for ISL_FORMAT_R11G11B10_FLOAT<br>
intel/isl: Allow CCS_E on more formats<br>
<br>
src/compiler/Makefile.sources | 1 +<br>
src/compiler/nir/meson.build | 1 +<br>
src/compiler/nir/nir_format_<wbr>convert.h | 287 ++++++++++++<br>
src/intel/<a href="http://Makefile.compiler.am" rel="noreferrer" target="_blank">Makefile.compiler.am</a> | 2 +-<br>
src/intel/<a href="http://Makefile.isl.am" rel="noreferrer" target="_blank">Makefile.isl.am</a> | 1 +<br>
src/intel/blorp/blorp_blit.c | 502 ++++++++++++--------<br>
src/intel/blorp/blorp_priv.h | 23 +-<br>
src/intel/isl/gen_format_<wbr>layout.py | 21 +-<br>
src/intel/isl/isl.c | 118 +++++<br>
src/intel/isl/isl.h | 37 ++<br>
src/intel/isl/isl_format.c | 270 ++++++++++-<br>
src/intel/isl/isl_format_<wbr>layout.csv | 558 +++++++++++------------<br>
src/intel/isl/isl_surface_<wbr>state.c | 37 +-<br>
src/intel/isl/meson.build | 2 +-<br>
src/intel/vulkan/anv_blorp.c | 3 +-<br>
src/intel/vulkan/anv_formats.c | 10 +-<br>
src/mesa/drivers/dri/i965/brw_<wbr>blorp.c | 67 ++-<br>
src/mesa/drivers/dri/i965/brw_<wbr>wm_surface_state.c | 6 +<br>
src/util/format_srgb.h | 14 +<br>
19 files changed, 1390 insertions(+), 570 deletions(-)<br>
create mode 100644 src/compiler/nir/nir_format_<wbr>convert.h<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div></div>