[Mesa-dev] [PATCH 14/15] intel: Clarify intel_screen_make_configs

Chad Versace chad.versace at linux.intel.com
Tue Aug 7 08:19:26 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/06/2012 07:40 PM, Eric Anholt wrote:
> Chad Versace <chad.versace at linux.intel.com> writes:
> 
>> This function felt sloppy, so this patch cleans it up a little bit.
>> 
>> - Rename `color` to `i`. It is not a color value, only an iterator int.
> 
> I'm meh on this change.

A quick explanation of why I renamed it... The variable name `color` confused
me the first time I encountered this function. It's uncommon for integer
iterator variables to have colorful names so I suspected something special was
going on, but nothing was.

>> - Move `depth_bits[0] = 0` into the non-accum loop because that is where 
>> it used. The accum loop later overwrites depth_bits[0].
> 
> This makes sense -- move it next to the place that sets up the rest of the
> array.
> 
>> - Redefine `msaa_samples_array` as static const because it is never 
>> modified.
> 
> Maybe instead, singlesample_samples[] = {0} and multisample_samples[] = {4,
> 8}?  The array math in the next patch was not pretty.

Good idea. I don't want git blame to associate me with that array math. I
incorporated your suggestion into this and the next patch.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJQITH9AAoJEAIvNt057x8iNDMQAMH8sVoOLqA0LaDw1VJTVRn6
R/DpyLv1lGffBfMJylKJGylDe3Yv1yRin6h9pu6dWzAi5W2UOD3UI4tOUgi+RN2g
lwbDwK+hdWd/qYeQzZCPRsCq9O6E0mNZGMkFJ4DNTKLJJFGOQ3JKEBwSgZQDUOpE
evlreUvC3y4LsIolAFnBMMih2tU8+mwftb/Nai7rOQbu9fwyggW5TzNp5cqWUxkW
9lTtqg7S7syDEc/iUAmfapY39w0Jnn3bTOflKfuvjPcxiHot4qDhHmPO+TxsCIR6
l63q2uB4E7db07NyHky3YtBc5YQNe9VHL9UrT98+yVfqzkXoKX4xuNfuUl342PsO
YSeUOTEMVnocnIuXWHS1kfAUZNaCPHxTF6PRuB1v/zX7qUGSwGQvVKvkp1qKKIEz
0uTeFcBPJEQ4MGBz9+c5rrHLoXmQU481xcd61IXrqtohMoNkdT7wpc6yigiDXhrr
2H8KeMH45ptWDTdGinaxRaP76d09glGggucqEPQ4/hTlZptq8xGGi2TFc0zBElFw
snKCkx90lOtdsib6JNSJHd0DXGfL4R/qoMVFsxpu4d/qdw0tAdZVPbkmS0vlEXb0
5dD/mubBUIdoTD/Crgh6K+CY6HZG8PcCZm0Y38PelmpYCWk8p+vkDWLVt7A1XVv6
QkBirnpfwG8wt5EdS1el
=Zpbx
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list