intel/fs: Implement support for NIR opcodes for INTEL_shader_integer_functions2
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 11 Sep 2018 23:49:51 +0000 (16:49 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jan 2020 00:18:57 +0000 (00:18 +0000)
commitde6c0f848797d26d28223bcad25da03654461874
tree57802cd7c0e36551c4477bb84e3d11105a28b3e9
parent58907568ec526df87fa87177441743fa0d1d0a66
intel/fs: Implement support for NIR opcodes for INTEL_shader_integer_functions2

v2: Remove smashing type to D for nir_op_irhadd.  Caio noticed it was
odd, and removing it fixes an assertion failure in the crucible
func.shader.averageRounded.int64_t test (because the source should be
W).

v3: Emit BRW_OPCODE_MUL directly for nir_op_umul_32x16 and
nir_op_imul_32x16.  Suggested by Curro.

v4: Smash types of MUL instruction generated for nir_op_umul_32x16 and
nir_op_imul_32x16.  With this change, I get the same assembly now as I
did with v2.

v5: Remove support for pre-Gen7.  The integer multiply path was
incorrect, and, since the extension isn't enabled pre-Gen7, there's no
way to test it.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>
src/intel/compiler/brw_fs_nir.cpp