intel/compiler: Add a INVALID_{,HW_}REG_TYPE macros
authorMatt Turner <mattst88@gmail.com>
Mon, 6 Jan 2020 21:17:49 +0000 (13:17 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 22 Jan 2020 00:19:20 +0000 (00:19 +0000)
commit0b70d46f7a614888e999bfda443636c9bc1d8d97
tree15b035b648a095eae9631fea108f6a8285477b38
parentab7c25b9aa241b2754a48fc04fd4752a511b7a2c
intel/compiler: Add a INVALID_{,HW_}REG_TYPE macros

Since the enum brw_reg_type is packed, comparisons with -1 don't work
directly, necessitating the cast. Add a macro to avoid this confusion.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2635>
src/intel/compiler/brw_eu_compact.c
src/intel/compiler/brw_reg_type.c
src/intel/compiler/brw_reg_type.h