HLSL Compiler and d3dcompiler_xx.dll

Matijn Woudt tijnema at gmail.com
Wed Apr 14 08:31:16 CDT 2010

On Wed, Apr 14, 2010 at 3:07 PM, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> Am 14.04.2010 um 13:08 schrieb Matijn Woudt:
>> 2) Move the assembler to d3dcompiler_xx.dll and forward calls from
>> d3dx9. This is needed because the assembler and compiler can share the
>> same bytecode writer this way.
> When Mattheo implemented the assembler in the gsoc project we decided to put the assembler into d3dx9 because we assumed MS implements it there as well, and there are no assembler specific exports in d3dcompiler.dll. Using wine-internal exports is generally a bad idea and should only be used if there are clear advantages. (It e.g. makes it impossible to use the native d3dcompiler.dll with builtin d3dx9)

In the last two versions of d3dcompiler (41 & 42), there's an
undocumented export D3DAssemble, which makes me assume that MS has
moved the Assembler there too. We can define D3DAssemble just like
D3DXAssembleShader for now, and once Microsoft documents this function
(or defines in d3dcompiler.h), we can adjust the definition if needed.

> Before moving the assembler into d3dcompiler.dll we have to be sure that sharing the bytecode writer is possible and is worth the problems it introduces.

I'm not sure why sharing the bytecode writer wouldn't be possible. If
the shader assembler is moved along, there shouldn't be problems (or
am I missing something?).

>> 3) Implement the compiler in d3dcompiler_xx.
> I wrote a basic HLSL compiler as university project in 2008, this is where part of the assembler code came from. Do you have the sources, do you need them?

Matteo told me about it, and he was going to send your code to me
after he checked if it was ok with you. But if you can send them to me
directly, that's fine too, of course.

More information about the wine-devel mailing list