nir: Add a helper for getting binop identities

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
Jason Ekstrand
2017-08-29 20:36:55 -07:00
parent 82d493a939
commit 789221dcfa
2 changed files with 70 additions and 0 deletions

View File

@@ -2064,6 +2064,8 @@ bool nir_deref_foreach_leaf(nir_deref_var *deref,
nir_load_const_instr *
nir_deref_get_const_initializer_load(nir_shader *shader, nir_deref_var *deref);
nir_const_value nir_alu_binop_identity(nir_op binop, unsigned bit_size);
/**
* NIR Cursors and Instruction Insertion API
* @{