Ooh! I bet this fixes our rendering problems on some of those benchmarks too! I was wondering why generating made was causing problems.
Reviewed-by: Jason Ekstrand <jason.ekstr...@intel.com> On Feb 3, 2015 1:18 AM, "Kenneth Graunke" <kenn...@whitecape.org> wrote: > Fixes misrendering in "Witcher 2" with INTEL_USE_NIR=1, and probably > many other programs. > > Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > This depends on Jason's 3 patch series that removes emit_percomp. > It's available in the 'nir-madfix' branch of my tree. > > This was caught by tests/spec/arb_fragment_program/lrp_sat.shader_test > with my in-progress Mesa IR -> NIR converter code, so I don't think we > need to write more Piglit tests. We just don't have a GLSL based one. > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > index fbb1622..153a1be 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > @@ -1070,12 +1070,14 @@ fs_visitor::nir_emit_alu(nir_alu_instr *instr) > break; > > case nir_op_ffma: > - emit(MAD(result, op[2], op[1], op[0])); > + inst = emit(MAD(result, op[2], op[1], op[0])); > + inst->saturate = instr->dest.saturate; > break; > > case nir_op_flrp: > /* TODO emulate for gen < 6 */ > - emit(LRP(result, op[2], op[1], op[0])); > + inst = emit(LRP(result, op[2], op[1], op[0])); > + inst->saturate = instr->dest.saturate; > break; > > case nir_op_bcsel: > -- > 2.2.2 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev