<p dir="ltr"><br>
On Aug 3, 2015 4:17 AM, "Eduardo Lima Mitev" <<a href="mailto:elima@igalia.com">elima@igalia.com</a>> wrote:<br>
><br>
> On 08/01/2015 02:59 PM, Eduardo Lima Mitev wrote:<br>
> > On 07/31/2015 10:48 AM, Eduardo Lima Mitev wrote:<br>
> >> On 07/30/2015 09:48 PM, Jason Ekstrand wrote:<br>
> >>><br>
> >>> On Jul 27, 2015 3:39 PM, "Jason Ekstrand" <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
> >>> <mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>>> wrote:<br>
> >>>><br>
> >>>> On Mon, Jul 27, 2015 at 2:07 PM, Eduardo Lima Mitev <<a href="mailto:elima@igalia.com">elima@igalia.com</a><br>
> >>> <mailto:<a href="mailto:elima@igalia.com">elima@igalia.com</a>>> wrote:<br>
> >>>>> On 07/25/2015 03:08 AM, Jason Ekstrand wrote:<br>
> >>>>>> Alright, I got through it again...<br>
> >>>>>><br>
> >>>>>> I asked for a few trivial changes on a few of the patches.  With those<br>
> >>>>>> fixed, everything except patch 65 and 66 are<br>
> >>>>>><br>
> >>>>><br>
> >>>>> Thanks! we have fixed most of the patches already.<br>
> >>>>><br>
> >>>>>> Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a><br>
> >>> <mailto:<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>>><br>
> >>>>>><br>
> >>>>>> While the requested changes on the texturing patches are not<br>
> >>>>>> complicated, I would like to see the updated version of those two<br>
> >>>>>> patches before I give a formal R-B.<br>
> >>>>>><br>
> >>>>><br>
> >>>>> Sure, we will send new versions of patch 65 and 66 as soon as we have<br>
> >>>>> them ready and tested.<br>
> >>>>><br>
> >>>>>> There is one caveat to the above review: Something is badly broken on<br>
> >>>>>> HSW.  I'm not sure what, but one of the patches badly breaks HSW even<br>
> >>>>>> in the non-NIR case.  We need to figure out what that is before<br>
> >>>>>> pushing anything.  That said, please don't re-send the full series;<br>
> >>>>>> just figure out where the bug is, fix it, and re-send the one patch.<br>
> >>>>>><br>
> >>>>><br>
> >>>>> We have done extensive testing today, trying to find something strange<br>
> >>>>> that explains this breakage you are experiencing. Most of us have HSW<br>
> >>>>> laptops so it is our normal development environments.<br>
> >>>>><br>
> >>>>> However, we have not been able to reproduce any fail that would suggest<br>
> >>>>> our branch breaks something. Using current master as baseline, I have<br>
> >>>>> tested both nir-vec4 and vec4_visitor against it (piglit and dEQP), and<br>
> >>>>> we see no regressions other that the one we described in the cover<br>
> >>> letter.<br>
> >>>>><br>
> >>>>> Please, could you be more specific about the symptoms of this breakage<br>
> >>>>> and give us any possible info that would help us reproduce it locally?<br>
> >>>>> Maybe details of your system, kernel and gcc version; anything that<br>
> >>>>> might be different to a standard linux system.<br>
> >>>><br>
> >>>> I'm not sure what happened there.  I may have had a bad rebase or<br>
> >>>> something.  I pulled your branch, rebased on master, and tried it<br>
> >>>> again.  Now it seems to be ok.  On Broadwell and Cherryview, however,<br>
> >>>> it's not so ok.  It looks like you may have accidentally broken scalar<br>
> >>>> VS or something like that.  I can't even run glxgears on BDW without<br>
> >>>> hitting an assert.  If your dev machine is a HSW, you can use<br>
> >>>> INTEL_DEVID_OVERRIDE to tell it to compile shaders as if it's a BDW<br>
> >>>> and figure out why it's crashing.  The patch titled "nir/nir_lower_io:<br>
> >>>> Add vec4 support" makes glxgears render black on BDW.  It seems like a<br>
> >>>> later patch is causing the crash.  In any case, you should be able to<br>
> >>>> use INTEL_DEVID_OVERRIDE and compare the shader results.<br>
> >>>><br>
> >>>> --Jason<br>
> >>><br>
> >>> Any progress on this?<br>
> >>><br>
> >><br>
> >> Yes, I think I found the issue and fixed it, (at least the only one I<br>
> >> was able to find so far); and it was indeed the one causing the assert<br>
> >> in glxgears.<br>
> >><br>
> >> Basically, it was a silly mistake in one of the patches I authored:<br>
> >> <a href="https://github.com/Igalia/mesa/commit/2d72ae5f9e26c3c11dce9e779407984ef9774a52">https://github.com/Igalia/mesa/commit/2d72ae5f9e26c3c11dce9e779407984ef9774a52</a><br>
> >><br>
> >> You can see that I passed 'false' in 'is_scalar' argument of<br>
> >> brw_create_nir() for ARB_vertex_programs, ignoring that in BDW those are<br>
> >> scalar too. The fix was to pass 'brw->intelScreen->compiler->scalar_vs'<br>
> >> instead of 'false' there.<br>
> >><br>
> >> Indirectly, this error was messing up the lowering passes in brw_nir,<br>
> >> assuming non-scalar when it was scalar. Specifically, the pass<br>
> >> nir_lower_alu_to_scalar() was not called because we disabled it on<br>
> >> non-scalar shaders.<br>
> >><br>
> >> I will send a new version of the patch I changed, in case you want to<br>
> >> have a look. I also updated the git-tree of the branch with the fix and<br>
> >> rebased against master:<br>
> >><br>
> ><br>
> > I sent new versions of patches 09/78 and 74/78, which are the ones<br>
> > modified to fix the issue in BDW. As I commented there, the changes are<br>
> > trivial, but I send the new versions for the sake of reference and<br>
> > completeness.<br>
> ><br>
> >> <a href="https://github.com/Igalia/mesa/tree/nir-vec4-v2">https://github.com/Igalia/mesa/tree/nir-vec4-v2</a><br>
> >><br>
> ><br>
> > This branch has also been updated with the changes. In general, it is<br>
> > safe to assume that this branch always contain the latest version of the<br>
> > series we have.<br>
> ><br>
> >> Please, let us know if you find more issues.<br>
> >><br>
> >><br>
> >> Right now we have ~8 new piglit regressions (in HSW) after rebasing<br>
> >> master. I'm currently analyzing them and hope to fix them soon. They are<br>
> >> under "arb_shader_atomic_counters" set, so that you know in case you see<br>
> >> them.<br>
> >><br>
> ><br>
> > I fixed this regressions already. Patch "i965: Lift the constness<br>
> > restriction on surface indices passed to untyped ops." broke our the<br>
> > atomics intrinsic code, but the fix was easy to trace.<br>
> ><br>
> > So now the branch is back at zero regressions at least in 6 <= gen < 8.<br>
> ><br>
><br>
> Hi Jason,<br>
><br>
> I think we are ready to merge the branch to master as soon as you can<br>
> confirm that the issues on BDW are gone. As far as we can tell, all the<br>
> patches in the series have R-b from you.<br>
><br>
> This morning I rebased master again and did another round of testing. No<br>
> regressions.</p>
<p dir="ltr">I'll run it on or CI system some time this morning.  Once I've verified that it at least doesn't break anything in the non-NIR case, feel free to push. If you'd like, I can push it once the tests come back. Either is fine with me.<br>
--Jason</p>
<p dir="ltr">> Thanks!<br>
><br>
> >> Thank you Jason!<br>
> >><br>
> >> Eduardo<br>
> >><br>
> >>>>> Thanks again for the review and patience.<br>
> >>>>><br>
> >>>>> Eduardo<br>
> >>>>><br>
> >>>>>> --Jason<br>
> >>>>>><br>
> >>>>>> On Thu, Jul 23, 2015 at 3:16 AM, Eduardo Lima Mitev<br>
> >>> <<a href="mailto:elima@igalia.com">elima@igalia.com</a> <mailto:<a href="mailto:elima@igalia.com">elima@igalia.com</a>>> wrote:<br>
> >>>>>>> Hi,<br>
> >>>>>>><br>
> >>>>>>> This is the second version of the series that adds a new vec4<br>
> >>> backend for i965 based on NIR. The first series was sent some weeks ago<br>
> >>> [1] and went through review by Jason and Kenneth (thanks a lot!). This<br>
> >>> series is a result of addressing issues detected during that feedback.<br>
> >>>>>>><br>
> >>>>>>> This series also adds support for the NIR->vec4 pass on geometry<br>
> >>> shaders and on ARB_vertex_programs. Both supports were work-in-progress<br>
> >>> by the time we sent the first version, and are now completed. The<br>
> >>> patch-sets for GS and ARB_vertex_program were added at the end of the<br>
> >>> series.<br>
> >>>>>>><br>
> >>>>>>> Like the first version, we tested the backend on gen6 and gen7<br>
> >>> (specifically, SNB, IVB and HSW); and with both piglit and dEQP. No<br>
> >>> regressions observed with piglit. The issues related with register<br>
> >>> spilling that we had in the first version have been fixed.<br>
> >>>>>>><br>
> >>>>>>> With dEQP, we observe a regression that is causing the following 3<br>
> >>> tests to fail:<br>
> >>>>>>><br>
> >>> dEQP-GLES3.functional.shaders.loops.for_dynamic_iterations.vector_counter_vertex<br>
> >>>>>>><br>
> >>> dEQP-GLES3.functional.shaders.loops.while_dynamic_iterations.vector_counter_vertex<br>
> >>>>>>><br>
> >>> dEQP-GLES3.functional.shaders.loops.do_while_dynamic_iterations.vector_counter_vertex<br>
> >>>>>>><br>
> >>>>>>> We have a patch that solves those specific cases, but we would<br>
> >>> like to discuss it independently, before including it in the series. We<br>
> >>> believe these regressions should not block the review of the series.<br>
> >>>>>>><br>
> >>>>>>> As usual, a git tree is available at<br>
> >>> <a href="https://github.com/Igalia/mesa/tree/nir-vec4-v2">https://github.com/Igalia/mesa/tree/nir-vec4-v2</a> to ease testing.<br>
> >>>>>>><br>
> >>>>>>> cheers,<br>
> >>>>>>> Eduardo<br>
> >>>>>>><br>
> >>>>>>> [1]<br>
> >>> <a href="http://lists.freedesktop.org/archives/mesa-dev/2015-June/087448.html">http://lists.freedesktop.org/archives/mesa-dev/2015-June/087448.html</a><br>
> >>>>>>><br>
> >>>>>>><br>
> >>>>>>> Alejandro Piñeiro (9):<br>
> >>>>>>>   i965/vec4: Redefine make_reg_for_system_value() to allow reuse in<br>
> >>>>>>>     NIR->vec4 pass<br>
> >>>>>>>   i965/nir/vec4: Add setup for system values<br>
> >>>>>>>   i965/nir/vec4: Implement intrinsics that load system values<br>
> >>>>>>>   i965/nir/vec4: Implement atomic counter intrinsics (read, inc<br>
> >>> and dec)<br>
> >>>>>>>   i965/nir: Disable alu_to_scalar pass on non-scalar shaders<br>
> >>>>>>>   i965/vec4: Change vec4_visitor::swizzle_result() method to allow<br>
> >>> reuse<br>
> >>>>>>>   i965/vec4: Add a new dst_reg constructor accepting a brw_reg_type<br>
> >>>>>>>   i965/ir/vec4: Refactor visit(ir_texture *ir)<br>
> >>>>>>>   i965/nir/vec4: Add implementation of nir_emit_texture()<br>
> >>>>>>><br>
> >>>>>>> Antia Puentes (36):<br>
> >>>>>>>   i965/nir/vec4: Implement loading values from an UBO<br>
> >>>>>>>   i965/nir/vec4: Prepare source and destination registers for ALU<br>
> >>>>>>>     operations<br>
> >>>>>>>   i965/nir/vec4: Implement single-element "mov" operations<br>
> >>>>>>>   i965/nir/vec4: Lower "vecN" instructions and mark them unreachable<br>
> >>>>>>>   i965/nir/vec4: Implement int<->float format conversion ops<br>
> >>>>>>>   i965/nir/vec4: Implement the addition operation<br>
> >>>>>>>   i965/nir/vec4: Implement multiplication<br>
> >>>>>>>   i965/vec4: Return the last emitted instruction in emit_math()<br>
> >>>>>>>   i965/nir/vec4: Implement more math operations<br>
> >>>>>>>   i965/nir/vec4: Implement carry/borrow for addition/subtraction<br>
> >>>>>>>   i965/nir/vec4: Implement various rounding functions<br>
> >>>>>>>   i965/vec4: Return the emitted instruction in emit_minmax()<br>
> >>>>>>>   i965/nir/vec4: Implement min/max operations<br>
> >>>>>>>   i965/nir/vec4: Derivatives are not allowed in VS<br>
> >>>>>>>   i965/nir: Add utility method for comparisons<br>
> >>>>>>>   i965/nir/vec4: Implement non-vector comparison ops<br>
> >>>>>>>   i965/nir/vec4: Implement equality ops on vectors<br>
> >>>>>>>   i965/nir/vec4: Implement non-equality ops on vectors<br>
> >>>>>>>   i965/nir/vec4: Implement logical operators<br>
> >>>>>>>   i965/nir/vec4: Implement "bool<->int,float" format conversion<br>
> >>>>>>>   i965/nir/vec4: "noise" ops should already be lowered<br>
> >>>>>>>   i965/nir/vec4: Implement pack/unpack operations<br>
> >>>>>>>   i965/nir/vec4: Implement bit operations<br>
> >>>>>>>   i965/nir/vec4: Implement the "sign" operation<br>
> >>>>>>>   i965/nir/vec4: Implement "shift" operations<br>
> >>>>>>>   i965/nir/vec4: Implement floating-point fused multiply-add<br>
> >>>>>>>   i965/vec4: Return the emitted instruction in emit_lrp()<br>
> >>>>>>>   i965/nir/vec4: Implement linear interpolation<br>
> >>>>>>>   i965/nir/vec4: Implement conditional select<br>
> >>>>>>>   i965/nir/vec4: Implement the dot product operation<br>
> >>>>>>>   i965/nir/vec4: Implement vector "any" operation<br>
> >>>>>>>   i965/nir/vec4: Mark as unreachable ops that should be already<br>
> >>> lowered<br>
> >>>>>>>   i965/vec4: Enable NIR-vec4 pass on ARB_vertex_programs<br>
> >>>>>>>   i965/vec4: Generate missing NIR for fixed-function vertex programs<br>
> >>>>>>>   i965/nir/vec4: Handle uniforms on vertex programs<br>
> >>>>>>>   i965/vec4: Handle uniform and GRF array access on vertex programs<br>
> >>>>>>>     (NIR)<br>
> >>>>>>><br>
> >>>>>>> Eduardo Lima Mitev (20):<br>
> >>>>>>>   i965/nir/vec4: Add implementation placeholders for a new NIR->vec4<br>
> >>>>>>>     pass<br>
> >>>>>>>   i965/nir/vec4: Select between new nir_vec4 or current vec4_visitor<br>
> >>>>>>>     code-paths<br>
> >>>>>>>   i965/vec4: Move type_size() method to brw_vec4_visitor class<br>
> >>>>>>>   i965/nir/vec4: Add setup of input variables in NIR->vec4 pass<br>
> >>>>>>>   i965/nir/vec4: Add shader function implementation<br>
> >>>>>>>   i965/nir: Pass a is_scalar boolean to brw_create_nir()<br>
> >>>>>>>   i965/nir/vec4: Implement load_const intrinsic<br>
> >>>>>>>   i965/nir: Move brw_type_for_nir_type() to brw_nir to allow reuse<br>
> >>>>>>>   i965/vec4: Add auxiliary func to build a writemask from a component<br>
> >>>>>>>     size<br>
> >>>>>>>   i965/nir/vec4: Add get_nir_dst() and get_nir_src() methods<br>
> >>>>>>>   i965/nir/vec4: Implement loop statements (nir_cf_node_loop)<br>
> >>>>>>>   i965/nir/vec4: Implement load_input intrinsic<br>
> >>>>>>>   i965/vec4: Make sure that register types always match during<br>
> >>>>>>>     emit_urb_slot()<br>
> >>>>>>>   nir-lower_io: Store data.location instead, in const_index[0] of<br>
> >>>>>>>     store_output<br>
> >>>>>>>   i965/nir/vec4: Implement store_output intrinsic<br>
> >>>>>>>   i965/nir/vec4: Implement nir_emit_jump<br>
> >>>>>>>   i965/nir: Add new utility method brw_glsl_base_type_for_nir_type()<br>
> >>>>>>>   i965/vec4: Move is_high_sample() method to vec4_visitor class<br>
> >>>>>>>   i965/vec4: Change vec4_visitor::emit_mcs_fetch() method to allow<br>
> >>> reuse<br>
> >>>>>>>   i965/vec4: Change vec4_visitor::gather_channel() method to allow<br>
> >>> reuse<br>
> >>>>>>><br>
> >>>>>>> Iago Toral Quiroga (11):<br>
> >>>>>>>   i965/nir/vec4: Add setup of uniform variables<br>
> >>>>>>>   nir/nir_lower_io: Add vec4 support<br>
> >>>>>>>   i965/nir: Dot not assign direct uniform locations first for<br>
> >>> vec4-based<br>
> >>>>>>>     shaders<br>
> >>>>>>>   i965/nir/vec4: Implement conditional statements (nir_cf_node_if)<br>
> >>>>>>>   i965/nir/vec4: Implement load_uniform intrinsic<br>
> >>>>>>>   i965/nir: Enable NIR-vec4 pass on geometry shaders<br>
> >>>>>>>   i965/gs: Refactor ir_emit_vertex and ir_end_primitive<br>
> >>>>>>>   i965/nir/gs: Handle geometry shaders inputs<br>
> >>>>>>>   i965/nir/gs: Implement EmitVertex and EndPrimitive<br>
> >>>>>>>   i965/nir/gs: Implement support for gl_InvocationID system value<br>
> >>>>>>>   i965/nir: Do not scalarize phis in non-scalar setups<br>
> >>>>>>><br>
> >>>>>>> Samuel Iglesias Gonsalvez (2):<br>
> >>>>>>>   nir: Fix output swizzle in get_mul_for_src<br>
> >>>>>>>   i965/gs/gen6: Refactor ir_emit_vertex and ir_end_primitive for gen6<br>
> >>>>>>><br>
> >>>>>>>  src/glsl/nir/nir.h                                |   18 +-<br>
> >>>>>>>  src/glsl/nir/nir_lower_io.c                       |   99 +-<br>
> >>>>>>>  src/glsl/nir/nir_opt_peephole_ffma.c              |   13 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/Makefile.sources        |    2 +<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp          |   34 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_ir_vec4.h           |    2 +<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_nir.c               |   93 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_nir.h               |    8 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_program.c           |    6 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_reg.h               |    6 +<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_shader.cpp          |   24 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vec4.cpp            |   53 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vec4.h              |   82 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp     |  118 ++<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp |   27 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h   |    9 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vec4_nir.cpp        | 1507<br>
> >>> +++++++++++++++++++++<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp    |  470 ++++---<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp |    5 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/brw_vs.h                |    3 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp     |   13 +-<br>
> >>>>>>>  src/mesa/drivers/dri/i965/gen6_gs_visitor.h       |    2 +<br>
> >>>>>>>  22 files changed, 2263 insertions(+), 331 deletions(-)<br>
> >>>>>>>  create mode 100644 src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp<br>
> >>>>>>>  create mode 100644 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp<br>
> >>>>>>><br>
> >>>>>>> --<br>
> >>>>>>> 2.1.4<br>
> >>>>>>><br>
> >>>>>>> _______________________________________________<br>
> >>>>>>> mesa-dev mailing list<br>
> >>>>>>> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a> <mailto:<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>><br>
> >>>>>>> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> >>>>>><br>
> >>>>><br>
> >>><br>
> >><br>
> >> _______________________________________________<br>
> >> mesa-dev mailing list<br>
> >> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> >> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> >><br>
> ><br>
> > _______________________________________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> ><br>
><br>
</p>