[Mesa-dev] [PATCH v2] glsl: move uniform calculation to link_uniforms

Tapani Pälli tapani.palli at intel.com
Wed Jan 20 03:35:12 PST 2016


On 01/20/2016 01:11 PM, Ilia Mirkin wrote:
> On Wed, Jan 20, 2016 at 6:02 AM, Tapani Pälli <tapani.palli at intel.com> wrote:
>>> Unfortunately putting such a shader together is a bit of a pain, since
>>> all the uniforms have to be used. I still really think you need to
>>> build a heap. Or at least store a "first empty slot" so that you don't
>>> repeat the iteration *every* time.
>>
>> Yeah, I agree "first empty slot" would be good addition and will already
>> help a lot in problematic cases.
> Actually it's still not so great, since you can have stupid situations
> which won't fit into the first empty position. e.g. one empty
> location, and a bunch of foo[2] things. That's why I like using a heap
> :)

Sure, I'll send a fix to the loop bug and will work on some shader tests 
so that this will continue to work when any optimizations/refactoring is 
done.

// Tapani



More information about the mesa-dev mailing list