[Mesa-dev] [PATCH 09/11] i965/fs: Don't emit a header on gen5+ sample messages unless required.

Kenneth Graunke kenneth at whitecape.org
Fri May 13 16:30:59 PDT 2011


On 05/12/2011 09:05 PM, Eric Anholt wrote:
> Improves glbenchmark egypt performance 0.6% +/- 0.4% (n=6).
...
> +   bool header_present = false;
...
>      if (ir->shadow_comparitor) {
> -      mlen = MAX2(mlen, 1 + 4 * reg_width);
> +      mlen = MAX2(mlen, header_present + 4 * reg_width);

Relying on boolean "true" being automatically promoted to 1 (and not 
some other non-zero value) always makes me nervous for some reason...but 
I looked it up, and it does always work that way.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list