<div dir="ltr">I believe I've now reviewed everything except some of the validator patches and the is_partial_write() patch.  The validator patches I'm hoping Matt or Curro can look at.  For the is_partial_write() patch, I just need to convince myself that it doesn't make the compiler significantly more bogus than it already is today.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 12, 2019 at 5:57 AM Iago Toral Quiroga <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The changes in this version address review feedback to v3. The most significant<br>
changes include:<br>
<br>
1. A more generic constant combining pass that can handle more<br>
constant types (not just F and HF) requested by Jason.<br>
<br>
2. The addition of assembly validation for half-float restrictions, and also<br>
for mixed float mode, requested by Curro. It should be noted that this<br>
implementation of VK_KHR_shader_float16_int8 does not emit any mixed mode float<br>
instructions at this moment so I have not empirically validated the restictions<br>
implemented here.<br>
<br>
As always, a branch with these patches is available for testing in the<br>
itoral/VK_KHR_shader_float16_int8 branch of the Igalia Mesa repository at<br>
<a href="https://github.com/Igalia/mesa" rel="noreferrer" target="_blank">https://github.com/Igalia/mesa</a>.<br>
<br>
Iago Toral Quiroga (40):<br>
  compiler/nir: add an is_conversion field to nir_op_info<br>
  intel/compiler: add a NIR pass to lower conversions<br>
  intel/compiler: split float to 64-bit opcodes from int to 64-bit<br>
  intel/compiler: handle b2i/b2f with other integer conversion opcodes<br>
  intel/compiler: assert restrictions on conversions to half-float<br>
  intel/compiler: lower some 16-bit float operations to 32-bit<br>
  intel/compiler: handle extended math restrictions for half-float<br>
  intel/compiler: implement 16-bit fsign<br>
  intel/compiler: drop unnecessary temporary from 32-bit fsign<br>
    implementation<br>
  compiler/nir: add lowering option for 16-bit fmod<br>
  compiler/nir: add lowering for 16-bit flrp<br>
  compiler/nir: add lowering for 16-bit ldexp<br>
  intel/compiler: add instruction setters for Src1Type and Src2Type.<br>
  intel/compiler: add new half-float register type for 3-src<br>
    instructions<br>
  intel/compiler: don't compact 3-src instructions with Src1Type or<br>
    Src2Type bits<br>
  intel/compiler: allow half-float on 3-source instructions since gen8<br>
  intel/compiler: set correct precision fields for 3-source float<br>
    instructions<br>
  intel/compiler: fix ddx and ddy for 16-bit float<br>
  intel/compiler: fix ddy for half-float in Broadwell<br>
  intel/compiler: workaround for SIMD8 half-float MAD in gen8<br>
  intel/compiler: split is_partial_write() into two variants<br>
  intel/compiler: activate 16-bit bit-size lowerings also for 8-bit<br>
  intel/compiler: rework conversion opcodes<br>
  intel/compiler: implement isign for int8<br>
  intel/compiler: ask for an integer type if requesting an 8-bit type<br>
  intel/eu: force stride of 2 on NULL register for Byte instructions<br>
  intel/compiler: generalize the combine constants pass<br>
  intel/compiler: implement is_zero, is_one, is_negative_one for<br>
    8-bit/16-bit<br>
  intel/compiler: add a brw_reg_type_is_integer helper<br>
  intel/compiler: fix cmod propagation for non 32-bit types<br>
  intel/compiler: remove inexact algebraic optimizations from the<br>
    backend<br>
  intel/compiler: skip MAD algebraic optimization for half-float or<br>
    mixed mode<br>
  intel/compiler: also set F execution type for mixed float mode in BDW<br>
  intel/compiler: validate region restrictions for half-float<br>
    conversions<br>
  intel/compiler: validate conversions between 64-bit and 8-bit types<br>
  intel/compiler: skip validating restrictions on operand types for<br>
    mixed float<br>
  intel/compiler: validate region restrictions for mixed float mode<br>
  compiler/spirv: move the check for Int8 capability<br>
  anv/pipeline: support Float16 and Int8 SPIR-V capabilities in gen8+<br>
  anv/device: expose VK_KHR_shader_float16_int8 in gen8+<br>
<br>
 src/compiler/nir/nir.h                        |   5 +<br>
 src/compiler/nir/nir_opcodes.py               |  73 +-<br>
 src/compiler/nir/nir_opcodes_c.py             |   1 +<br>
 src/compiler/nir/nir_opt_algebraic.py         |  11 +-<br>
 src/compiler/shader_info.h                    |   1 +<br>
 src/compiler/spirv/spirv_to_nir.c             |  11 +-<br>
 src/intel/Makefile.sources                    |   1 +<br>
 src/intel/compiler/brw_compiler.c             |   2 +<br>
 src/intel/compiler/brw_eu_compact.c           |   5 +-<br>
 src/intel/compiler/brw_eu_emit.c              |  36 +-<br>
 src/intel/compiler/brw_eu_validate.c          | 396 ++++++++-<br>
 src/intel/compiler/brw_fs.cpp                 | 101 ++-<br>
 .../compiler/brw_fs_cmod_propagation.cpp      |  34 +-<br>
 .../compiler/brw_fs_combine_constants.cpp     | 202 ++++-<br>
 .../compiler/brw_fs_copy_propagation.cpp      |   8 +-<br>
 src/intel/compiler/brw_fs_cse.cpp             |   3 +-<br>
 .../compiler/brw_fs_dead_code_eliminate.cpp   |   2 +-<br>
 src/intel/compiler/brw_fs_generator.cpp       |  54 +-<br>
 src/intel/compiler/brw_fs_live_variables.cpp  |   2 +-<br>
 src/intel/compiler/brw_fs_lower_regioning.cpp |  39 +-<br>
 src/intel/compiler/brw_fs_nir.cpp             |  87 +-<br>
 src/intel/compiler/brw_fs_reg_allocate.cpp    |   2 +-<br>
 .../compiler/brw_fs_register_coalesce.cpp     |   2 +-<br>
 .../compiler/brw_fs_saturate_propagation.cpp  |   7 +-<br>
 src/intel/compiler/brw_fs_sel_peephole.cpp    |   4 +-<br>
 src/intel/compiler/brw_inst.h                 |   2 +<br>
 src/intel/compiler/brw_ir_fs.h                |   3 +-<br>
 src/intel/compiler/brw_nir.c                  |  22 +-<br>
 src/intel/compiler/brw_nir.h                  |   2 +<br>
 .../compiler/brw_nir_lower_conversions.c      | 158 ++++<br>
 src/intel/compiler/brw_reg_type.c             |   4 +<br>
 src/intel/compiler/brw_reg_type.h             |  18 +<br>
 src/intel/compiler/brw_shader.cpp             |  26 +<br>
 src/intel/compiler/meson.build                |   1 +<br>
 src/intel/compiler/test_eu_validate.cpp       | 786 ++++++++++++++++++<br>
 src/intel/vulkan/anv_device.c                 |   9 +<br>
 src/intel/vulkan/anv_extensions.py            |   1 +<br>
 src/intel/vulkan/anv_pipeline.c               |   2 +<br>
 38 files changed, 1907 insertions(+), 216 deletions(-)<br>
 create mode 100644 src/intel/compiler/brw_nir_lower_conversions.c<br>
<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></blockquote></div>