[Piglit] [PATCH 2/2] shader_runner optimization

Chad Versace chad.versace at linux.intel.com
Mon Jan 21 14:40:28 PST 2013

On 01/21/2013 12:52 PM, Paul Berry wrote:
> On 21 January 2013 12:03, Tom Gall <tom.gall at linaro.org
> <mailto:tom.gall at linaro.org>> wrote:

> Once we've done that, however, I'm afraid I'm still not understanding the
> benefit of this patch.  Do you have evidence that this patch will produce a
> measurable performance improvement?  Or is there some reason other than a
> performance improvement why you think the code is better this way?

I've confirmed that this introduces no performance improvement. I have a 2MB
shader_test file with a 3-line [require] section at the top. With and without
this patch, shader_runner execution time was approx 1.03 sec. The cost of
scanning the shader_test is negligible compared to the cost of compilation.

However, I do think that this patch makes the function easier to understand. It
makes it clear that, after we have completed scanning the [require] section, the
task is complete and no further action takes place. I would be in favor
of this patch if the commit message conveyed that as the patch's purpose,
and if the -Wparentheses warning were fixed.

More information about the Piglit mailing list