On Fri, Aug 21, 2015 at 6:42 AM, Boyan Ding <[email protected]> wrote: > Signed-off-by: Boyan Ding <[email protected]> > --- > src/glsl/nir/nir_opt_undef.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/glsl/nir/nir_opt_undef.c b/src/glsl/nir/nir_opt_undef.c > index 4ab27a8..fb9c6bb 100644 > --- a/src/glsl/nir/nir_opt_undef.c > +++ b/src/glsl/nir/nir_opt_undef.c > @@ -63,7 +63,7 @@ opt_undef_alu(nir_alu_instr *instr) > memset(&empty_src, 0, sizeof(empty_src)); > nir_instr_rewrite_src(&instr->instr, &instr->src[1].src, empty_src); > nir_instr_rewrite_src(&instr->instr, &instr->src[2].src, empty_src); > - instr->op = nir_op_imov; > + instr->op = instr->op == nir_op_bcsel ? nir_op_imov : nir_op_fmov; > > return true; > } > --
I don't think this is right (or was a problem). The b in bcsel simply means that the condition in a boolean, whereas fcsel means that the condition is a float (i.e., it performs the operation (src0 != 0.0f) ? src1 : src2). So you cannot determine the types of src1 or src2 from this. _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
