[Mesa-dev] [PATCH v2] glsl: move uniform calculation to link_uniforms
Tapani Pälli
tapani.palli at intel.com
Wed Jan 20 01:22:34 PST 2016
On 01/20/2016 11:16 AM, Ilia Mirkin wrote:
> On Wed, Jan 20, 2016 at 4:09 AM, Tapani Pälli <tapani.palli at intel.com> wrote:
>> On 01/20/2016 10:26 AM, Ilia Mirkin wrote:
>>> On Tue, Jan 19, 2016 at 6:35 AM, Tapani Pälli <tapani.palli at intel.com>
>>> wrote:
>>>> On 01/19/2016 01:14 PM, Ilia Mirkin wrote:
>>>>> The data structure is a (memory) heap... there appears to be one in
>>>>> mesa/main/mm.h. There's also one in nouveau_heap.h which is quite
>>>>> simple and totally unreliant on nouveau, just happens to be there. How
>>>>> hard would it be to integrate something like that?
>>>>>
>>>>> The trouble with adding slow things is that you forget about them, and
>>>>> they're not _that_ slow, but this stuff adds up.
>>>>
>>>> The solution I had in mind is to build a list of empty slots when
>>>> allocating
>>>> remaptable or while finding slots (keep pushing unused empty slots to
>>>> list)
>>>> ... but if possible I would prefer optimization later. First of all, this
>>>> is
>>>> quite exotic path to hit with a real program (last words ... yes yes).
>>>> Secondly, and more importantly, we can apply for certification sooner,
>>>> there
>>>> are very few failures left.
>>> I see you pushed this patch without concluding this discussion.
>>> Certification may be something that you (personally, as a company,
>>> whatever) are striving for, but that doesn't mean that you get to
>>> ignore reviewer feedback.
>>
>> I'm sorry if you have that impression but I'm not ignoring review feedback.
>> I agree that the find function is not 'optimal' and have planned how to
>> optimize it and I'm happy with any changes if someone wants to optimize and
>> refactor it instead. However, I've noticed this to be not a bottleneck and
>> cold path so because of the schedule I'm asking to do this later.
>>
>>> Perhaps in the end you're actually right, I don't know, but we
>>> certainly didn't agree on anything. I'm inclined to push out a revert
>>> while this is being sorted out.
>>
>> I'm surprised to see this as such a big deal.
>>
>> // Tapani
>>
> The big deal is pushing the patch before concluding the discussion.
>
> Getting back to the matter at hand, what's the absolute worst case
> here? How big does the UniformRemapTable get? How many times can this
> function get called?
As example with Intel Haswell we have max as 98304, this is the biggest
size with HSW.
This function gets called only if the remaptable has 'holes' in it,
meaning that explicit uniforms locations get scattered in this available
space, I consider this very rare for anyone or some engine to do. It
could only really happen if you use both explicit locations (non
continuous locations) and implicit locations together.
> A common max uniform block size is 64KB, so 16K 32-bit-sized elements
> (which is what this is laying out). Anything that tries to do 16384^2
> things is going to be highly disappointed in its runtime.
>
> -ilia
// Tapani
More information about the mesa-dev
mailing list