intel/compiler: implement is_zero, is_one, is_negative_one for 8-bit/16-bit
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 26 Oct 2018 11:40:27 +0000 (13:40 +0200)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 18 Apr 2019 09:05:18 +0000 (11:05 +0200)
commit44e1affaec3477d52c56cd2a10b20af48ae39854
tree3e5d1690986a9dd55082e2cf11988544a730bb8a
parente64be391dd065b6a0eabee17ada038db7a28c112
intel/compiler: implement is_zero, is_one, is_negative_one for 8-bit/16-bit

There are no 8-bit immediates, so assert in that case.
16-bit immediates are replicated in each word of a 32-bit immediate, so
we only need to check the lower 16-bits.

v2:
 - Fix is_zero with half-float to consider -0 as well (Jason).
 - Fix is_negative_one for word type.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_shader.cpp