[Mesa-dev] Mesa (d3d1x): d3d1x: add new Direct3D 10/11 COM state tracker for Gallium

Luca Barbieri luca at luca-barbieri.com
Tue Sep 21 04:13:39 PDT 2010

> Since this is derived from code in the DDK, this will prevent me or
The state tracker does not contain code derived from the DDK and
doesn't need any Microsoft code or tools except the Microsoft HLSL
compiler to compile shaders ahead of time (precompiled shaders are
Also, as far as I know, the DDK does not contain any "code"
implementing Direct3D (except possibly examples), but just the headers
normally used by Windows driver developers

Why are you claiming this?
I assume it's because of the comment in tpf.h, which states that it
has been written according to Microsoft's documentation, which is
available solely from reading the d3d11TokenizedProgramFormat.h header
in the DDK.
Using the header, which is documented in the DDK documentation as the
place to look for documentation of the format, as reference, doesn't
seem to me unusual or problematic.

tpf.h is not a derivative work of that header, and it is designed in a
completely different way: the Microsoft header uses accessor macros,
while tpf.h defines structs and unions with bitfields.
This has been done both for technical reasons (bitfields are much
better) and to reduce similarity as much as possible.

Obviously the underlying format and the enum values are the same,
since otherwise it would not be compatible.
The enum values are bitfields are named in a similar way, but this
makes sense to avoid confusion, and Wine seems to routinely does the

Could you please explain your concerns in more detail?

> any other (potential) Wine developer from contributing to Mesa in the
> future.

It does not seem to me that this code is more similar to Microsoft
headers than the existing code in Wine.

Also, unlike the Wine d3d10 implementation, this implementation only
cares about the documented API and doesn't attempt to implement
internal APIs as the Wine implementation appears to do, and hence
seems better in that regard.

> To the extent that my contributions matter

Your contributions would be greatly welcome and appreciated, both to
r600g and to this code, especially since you are one of the authors of
the existing D3D10 code in Wine.
I don't think there are serious concerns affecting that, and if there
were they could just be fixed.

More information about the mesa-dev mailing list