On Mon, Jul 11, 2016 at 7:55 PM, Ilia Mirkin <[email protected]> wrote: > On Mon, Jul 11, 2016 at 1:48 PM, Marek Olšák <[email protected]> wrote: >> On Mon, Jul 11, 2016 at 7:31 PM, Ilia Mirkin <[email protected]> wrote: >>> On Mon, Jul 11, 2016 at 1:28 PM, Marek Olšák <[email protected]> wrote: >>>> From: Marek Olšák <[email protected]> >>>> >>>> This bug is uncovered by glsl/lower_if_to_cond_assign. >>>> I don't know if it can be reproduced in any other way. >>>> >>>> Cc: <[email protected]> >>>> --- >>>> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 +++++++----- >>>> 1 file changed, 7 insertions(+), 5 deletions(-) >>>> >>>> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >>>> b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >>>> index 76656f5..0b7feb7 100644 >>>> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >>>> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >>>> @@ -1958,12 +1958,14 @@ >>>> glsl_to_tgsi_visitor::visit_expression(ir_expression* ir, st_src_reg *op) >>>> emit_asm(ir, TGSI_OPCODE_TRUNC, result_dst, op[0]); >>>> break; >>>> case ir_unop_bitcast_f2i: >>>> - result_src = op[0]; >>>> - result_src.type = GLSL_TYPE_INT; >>>> - break; >>>> case ir_unop_bitcast_f2u: >>>> - result_src = op[0]; >>>> - result_src.type = GLSL_TYPE_UINT; >>>> + /* Make sure we don't propagate the negate modifier to integer >>>> opcodes. */ >>>> + if (op[0].negate) >>> >>> Or abs or saturate, presumably? >> >> glsl_to_tgsi doesn't use ureg_abs. > > I'd rather not rely on that... it's pretty cheap to throw in there.
I can't throw abs in there because st_src_reg doesn't have abs. :) > >> >> saturate is a dst modifier and this patch operates on src operands. > > Er, right, of course. Ignore that. > > With abs thrown into the condition, > > Reviewed-by: Ilia Mirkin <[email protected]> Thanks. Marek _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
