[Mesa-dev] [PATCH 0/6] Constants through builtins evaluation rewrite
Kenneth Graunke
kenneth at whitecape.org
Tue May 8 13:09:25 PDT 2012
On 05/02/2012 02:11 PM, Olivier Galibert wrote:
> Hello,
>
> Here is the second version of that patch series. It's fundamentally
> the same thing with a number of changes:
> - respect the coding style a little better
> - index the hash table on the variable object pointer and not the name
> - handle function call in function call (tested with atan(a))
> - handle if (tested with atan(a, b))
> - handle conditional assign (tested with mix)
> - fix the access to the body when the same builtin is used multiple times
>
> What's missing is a piglit run, which I currently have technical
> problems with[1].
>
> Thanks everybody for the reviews, I hope I haven't missed anything.
>
> OG.
These look great! I've gone ahead and pushed them with a few tiny changes:
1. I updated a comment in patch 2, which still said the hash_table
mapped using variable names/strings.
2. I changed the for (exec_node ...) loop in patch 4 to foreach_list, as
it's simpler.
This /does/ cause a regression in Piglit test glsl-const-folding-01, due
to atan(1.0) being slightly off from the value the test expects. But I
checked that, and it's off in the 5th digit, so it's just a precision
issue. I think the test is being a bit picky, so we may want to change
it. Or, make our built-ins more precise. We can do that in a follow-up
patch sometime.
Either way, it's definitely a plus that we're using the same code for
the CPU and GPU side. Much better to be consistent.
Thanks so much for doing this!
More information about the mesa-dev
mailing list