[3/4] d3dx9: Implement D3DXAssembleShader function, really basic shader assembler.

Matteo Bruni matteo.mystral at gmail.com
Tue Dec 29 09:43:44 CST 2009

2009/12/29 Henri Verbeet <hverbeet at gmail.com>:
> 2009/12/28 Matteo Bruni <matteo.mystral at gmail.com>:
> Why do you need the fake parser? Can't you just not support those
> shader versions yet? There's also (in general) not much of a point in
> adding structure fields that aren't used yet.

I added the fake parser for two reasons: because I have to initialize
an asm_parser structure anyway in the create_xxxx_parser functions
(and I prefer to use parser_fake for the unimplemented shader versions
instead of parser_vs_3) and I want to avoid having some tests for the
other shader versions pass "by chance" inside the todo_wine (this is
accomplished by the asmparser_end_fake function... probably this can
be seen as a hack).
Agreed on the structure fields.

>> +/* This file needs the original d3d9 definitions. The bwriter ones
>> + * aren't useable because they are wine-internal things. We're writing
>> + * d3d8/9 shaders here, so we need the d3d9 definitions (which are
>> + * equal to the d3d8 ones)
>> + */
> This doesn't seem to match what the code actually does.

That #include is only used from the next patch. I'll move the include
and the comment in the right place (maybe rephrasing it somewhat).

>> +/* Debug utility routines. Some are not reentrant, check asmutils.c */
> Same as above.

Yep, that's not true anymore, courtesy of wine_dbg_sprintf.

> As for splitting things up, I think it's ok to e.g. add the
> pre-processor first, and just return E_NOTIMPL from assemble_shader().

You mean a patch which adds only the first half of the
D3DXAssembleShader implementation (returning just after the
preprocessing)? That seems reasonable.
Btw, ok for your other points also.

More information about the wine-devel mailing list