[Mesa-dev] [PATCH 2/9] nir: Conditionalize the POW reconstruction on shader compiler options.
eric at anholt.net
Mon Feb 2 16:31:26 PST 2015
Connor Abbott <cwabbott0 at gmail.com> writes:
> A few comments here...
> 1. We should really split this up into a patch that adds
> nir_shader_compiler_options (which would be empty at this point) and
> the nir_algebraic infrastructure for conditionalizing transforms
> (actually, maybe we should split these up into two patches) and a
> patch which adds lower_pow with the same name as the current patch.
Split version sent.
> 2. While I see the performance reasons for pre-computing all the
> conditions up-front before running the pass, I'm not sure that's the
> best approach long-term. Soon, we'll have to support the precise and
> invariant keywords, which are essentially per-instruction and affect
> which algebraic optimizations we can do. We may have to do something
> more clever for those, but in the meantime I'm not sure we'll want
> this optimization down the road... so it's probably better to wait
> until we get to that point and do the simple thing for now.
The expression has to appear in the code somewhere, and the places I
consume the precomputed expression flag are each looping over an array
of structures with different flags used. Where are you proposing I put
the expression, instead?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 818 bytes
Desc: not available
More information about the mesa-dev