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

Chad Versace chad.versace at linux.intel.com
Thu Jul 26 17:40:40 PDT 2012


On 07/25/2012 11:11 AM, Eric Anholt wrote:
> 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.

Agreed. After revisiting this patch, I no longer like it either.




More information about the mesa-dev mailing list