OSDN Git Service

intel/fs: Fix nir_op_b2[fi] with 64-bit result on Gen8 LP and Gen9 LP
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 10 Oct 2018 22:17:11 +0000 (15:17 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 11 Oct 2018 20:21:19 +0000 (15:21 -0500)
commit497675c21ee34dfe1e8f9dfe62f6a3011f8062e5
tree83ec10c2d1492833448bf973bbe9c85bf129b5a5
parent4ece6aa5524ac5acf57c3fdbe4c0fa028eaa2802
intel/fs: Fix nir_op_b2[fi] with 64-bit result on Gen8 LP and Gen9 LP

Several of the Atom GPUs have additional restrictions on alignment when
moving < 64-bit source to a 64-bit destination.  All of the nir_op_*2*64
code generation paths respected this, but nir_op_b2[fi] did not.

Previous to commit a68dd47b911 it was not possible to generate such an
instruction from the GLSL path.  It may have been possible from SPIR-V,
but it's not clear.  The aforementioned patch converts a 64-bit
nir_op_fsign into a sequence of operations including a nir_op_b2f with a
64-bit result.  This "just works" everywhere except these Atom parts.

This problem was not detected during normal CI testing because the Atom
parts are not included in developer builds.

v2 (idr): Make the patch compile, and make some cosmetic changes.  Add a
commit message.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108319
Fixes: a68dd47b911 "nir/algebraic: Simplify fsat of fsign"
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/intel/compiler/brw_fs_nir.cpp