i965/nir: fix check to resolve booleans to work with sized nir_alu_type
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 24 Feb 2016 09:51:22 +0000 (10:51 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Thu, 17 Mar 2016 10:16:33 +0000 (11:16 +0100)
As nir_alu_type has now embedded the data size, the check for the
instruction's output type (to see if a boolean resolve is required)
should ignore the data size part.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/drivers/dri/i965/brw_nir_analyze_boolean_resolves.c

index 56e15ef935f1f608db00dfa8c651a52a613bba80..12ac853478a647b82af269c74ff2a0d555c6c482 100644 (file)
@@ -165,7 +165,7 @@ analyze_boolean_resolves_block(nir_block *block, void *void_state)
          }
 
          default:
-            if (nir_op_infos[alu->op].output_type == nir_type_bool) {
+            if (nir_alu_type_get_base_type(nir_op_infos[alu->op].output_type) == nir_type_bool) {
                /* This instructions will turn into a CMP when we actually emit
                 * them so the result will have to be resolved before it can be
                 * used.