[PATCH] Moved wined3dformat <-> dxgi_format conversion functions into wined3d

Matteo Bruni matteo.mystral at gmail.com
Mon Sep 12 15:50:45 CDT 2016


2016-09-12 10:37 GMT+02:00 Henri Verbeet <hverbeet at gmail.com>:
> On 10 September 2016 at 18:47, Fabian Maurer <dark.shadow4 at web.de> wrote:
>> I mean, I
>> could make a copy from all the d3dx9 code for d3dx11, but it seems more
>> logical to not just duplicate code.
>> But where would I put the code to use it in both d3dx9 and d3dx11? A new
>> folder d3dx_shared for PARENTSRC?
>>
> It's largely up to Matteo and Alexandre, but I think there are a few
> options. We could for example use a single PARENTSRC for d3dx9/10/11.
> That would still require some thought, since while I'd expect many
> things to be similar or the same between d3dx9/10/11, there are also a
> considerable number of differences. Another option could be a static
> library like libwpp or libwine_port, although that's not a popular
> option. Maybe it's warranted for d3dx. Maybe there are other options
> as well.

I don't quite know what would be the best solution yet. Maybe a static
library for the code in common between d3dx9/10/11 + PARENTSRC for the
various _xx versions would be sensible, yes. It's going to be quite a
bit of work to make the common, d3dx version-agnostic helper functions
to put in the static lib though (including figuring out what they
should look like). On the upside, that can be done incrementally,
moving stuff there piece by piece as needed.

The single d3dx* PARENTSRC idea seems a bit more messy, while the
hypothetical multiple PARENTSRC route I mentioned for d3dcompiler
doesn't seem a good fit here.
I'm afraid this is one of those cases where it's going to be clear if
a certain route is practical only after the fact i.e. once someone
writes the patches or fails trying...

Fabian, if you want to send patches for
D3DX11CreateShaderResourceViewFromFileW "duplicating" the relevant
code for the time being, that is fine to me. It might even be easier
to decide how to share the code at that point.



More information about the wine-devel mailing list