[Mesa-dev] Coding or Table based approach for r600g? (was RFC: 0001-r600g-R700-can-do-more-than-8-tex-and-vtx-clauses.patch)

Ferry Huberts mailings at hupie.com
Wed Mar 9 04:06:38 PST 2011

On 03/09/2011 12:23 PM, Henri Verbeet wrote:
> 2011/3/9 Christian König <deathsimple at vodafone.de>:
>> So hey guys what do you think about it?
>> And to make my own opinion clear:
>> I also really prefer tables, but didn't used them in the past because I
>> wasn't 100% sure which feature depends on what and which approach we
>> really want.
> I don't think the issue is so much about using a table vs. a function
> to retrieve something, that's likely something that depends on the
> specific cases. The issue here is more about recalculating things that
> are never going to change after initialization.

yeah, that was my point.

the table is only _a_ solution.

a different solution I sometimes employ is to lazily determine the value
on first use and then keep it cached. that requires an extra state
variable however to determine whether the value was already determined.

Ferry Huberts

More information about the mesa-dev mailing list