i965/fs: Add brw_reg_type_from_bit_size utility method
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 24 Aug 2017 13:54:27 +0000 (15:54 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 25 Oct 2017 23:14:09 +0000 (16:14 -0700)
commit4723933b8ea62cb100c5f21b4b42f838c6e948b1
tree7c7a3873381a973e2f26b78d8dd3388d0e8c4fde
parent99778e7f9f874f132ec9ddace3e91714e42e690f
i965/fs: Add brw_reg_type_from_bit_size utility method

Returns the brw_type for a given ssa.bit_size, and a reference type.
So if bit_size is 64, and the reference type is BRW_REGISTER_TYPE_F,
it returns BRW_REGISTER_TYPE_DF. The same applies if bit_size is 32
and reference type is BRW_REGISTER_TYPE_HF it returns BRW_REGISTER_TYPE_F

v2 (Jason Ekstrand):
 - Use better unreachable() messages
 - Add Q types

Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs_nir.cpp