[Mesa-dev] [Bug 53256] opt_dead_code_local removing assignments to array elements

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Aug 9 08:41:30 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=53256

Chris Wolfe <cwolfe at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|idr at freedesktop.org         |mesa-dev at lists.freedesktop.
                   |                            |org

--- Comment #1 from Chris Wolfe <cwolfe at chromium.org> 2012-08-09 15:41:30 UTC ---
Re-aiming at the list, guess the CC isn't automatic. Please see the bug for
context.

Summary: GLSL optimizer mangles "vec4 tmp; tmp[3] = 1.0; tmp.xyz =
some_3d_vector;"

Walked through the optimization behavior in opt_dead_local_code (and friends)
again. Feels like the best fix is to consider assignment to a deference_array
of a vector as a write to an unknown component.

That way the assignment will get removed only if there is an overriding
whole_variable_written to the vector. If the array index is constant it will
get converted to a swizzle (vec_index_to_swizzle), and hopefully become a
deference_variable for the next pass (haven't found the code for that yet).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list