[PATCH 2/4] wined3d: Let d3dfmt_get_conv return a wined3d_format_desc. This required some code shuffling mostly in the SRGB area.

Roderick Colenbrander thunderbird2k at gmail.com
Thu Apr 8 05:16:30 CDT 2010

On Thu, Apr 8, 2010 at 11:59 AM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 7 April 2010 23:12, Roderick Colenbrander <thunderbird2k at gmail.com> wrote:
>> ---
>>  dlls/wined3d/device.c          |    5 +-
>>  dlls/wined3d/surface.c         |  169 +++++++++++++++++++++++-----------------
>>  dlls/wined3d/utils.c           |    1 +
>>  dlls/wined3d/wined3d_private.h |    5 +-
>>  4 files changed, 102 insertions(+), 78 deletions(-)
> I'm not so convinced by the idea of having mutable format
> descriptions. What problem are you solving, and why is this the best
> solution? At the very least the patch looks like it could be split
> though.

The ultimate goals are to reduce the use of d3dfmt_get_conv (some
places can just use the format table) and to clean up d3dfmt_get_conv.
I don't like a mutable format descriptor either but it is temporarily.
The texture format fixups can all be moved over to the formats table
(see patch 3). In a next step the color keying part could be cleaned
up. The switch statement there could for instance be turned into a
small wined3d_format_desc table.


More information about the wine-devel mailing list