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

--- Comment #9 from Ian Romanick <i...@freedesktop.org> 2011-11-15 11:54:48 PST 
---
(In reply to comment #5)
> The r300 compiler looks for the constants which are used and allocates new
> locations for them.

I think we could achieve most this pretty easily in the linker.  After linking
and before uniform location assignment, we'd need a pass that:

 - Records all constant-index accesses to each array.

 - Records whether or not there was a non-constant-idnex access to each array.

When assigning uniform locations, arrays that had only constant-index accesses
would have only those accesses count against the uniform components limit. 
During code generation the map of accessed elements could be used to
automatically compact the array and remap indexes.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to