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

Eric Anholt eric at anholt.net
Wed Jul 25 11:11:11 PDT 2012

Chad Versace <chad.versace at linux.intel.com> writes:

> Transform the code from clever, obfuscated, and imperative to
> straight-forward and table-driven.

I don't like this change.  It increases the amount of code, and to
change any single option, you need to change more code.

If we were to change back_buffer_modes (and I think we need to, since we
potentially pageflip instead of blitting, so we don't adhere to
GLX_SWAP_COPY_OML), we would need to hit each struct's count instead of
just the shared list.  And MSAA was incoherent with single sample in
those bits for reasons I don't understand.

If we were to expose 16 and 24 depth on both 16 and 32 color, we would
need to duplicate it across all the color setup, instead of just
removing the if/else in the previous code and bumping the count.

If we were to choose whether to expose non-stencil depth configs based
on whether the hardware requires separate stencil or not... I don't know
what we would do.

If I was to go cleaning up config creation code, I would change
driCreateConfigs to have sentinels terminating the arrays instead of
separate counts.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120725/566e5009/attachment.pgp>

More information about the mesa-dev mailing list