I'm pretty happy with how it turned out. What I'm not sure on is that I've got a couple of places where I replicated another transformation, like fsat(fsat(a)) -> fsat(a) but with a lowered fsat. I could see potentially having only the canonical form appear in nir_opt_algebraic, and I'd have two optimization loops in my driver: one in canonical form, and one in the driver's lowered form, with different nir_shader_compiler_options in the two loops. I worry a bit, that down this road lies having at least 3 loops (canonical, then lowered-to-driver uniform indexing math, then lowered-to-driver operations), and then maybe I just don't have the creativity right now to see when we're going to need 4 loops, and this seems nuts.
(Note: my goal with a bunch of this series is to rely less on my driver's internal optimization code, since I'm going to have to more or less throw it out if I go to doing control flow) _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev