[Mesa-dev] [PATCH] glsl: remove redundant function inout assignments
Ilia Mirkin
imirkin at alum.mit.edu
Tue Nov 3 16:39:12 PST 2015
On Tue, Nov 3, 2015 at 7:31 PM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> On Tue, 2015-11-03 at 19:21 -0500, Ilia Mirkin wrote:
>> I'm still unclear what problem you're trying to solve here? What's
>> wrong with having b[1] = b[1]?
>
> There is nothing wrong with it, but nir seems to expect this type of
> assignment to be optimised out and hits an assert if its not. Its removed for
> non arrays in opt_copy_propagation.cpp see add_copy()
Sounds like a bugfix for nir might be in order then? What if you have,
say, b[1] = b[1] + 0 and then NIR optimizes away the + 0? Or +
some_var which happens to become 0 as a result of optimizations?
-ilia
More information about the mesa-dev
mailing list