D3D shader assembler

Matteo Bruni matteo.mystral at gmail.com
Sun Jul 19 12:17:21 CDT 2009


Hi to everybody,
I'm sending here the main assembler patch for reviews and suggestions.
It is bzipped as it is quite a big patch, but I couldn't find a
meaningful way to split it.
A quick mile-high overview: the assembler is divided in a parser and a
bytecode writer. The parser is made by the flex (asmshader.l) and
bison (asmshader.y) source files and the asmparser.c file. The
bytecode writer is in bytecodewriter.c, btw, and asmutils.c contains
some utility functions used in the assembler.
With the asmshader.l SlAssembleShader function the parser processes
the shader and returns an intermediate representation of it into the
wine_shader struct. Then this struct is passed to the bytecode writer
with the SlWriteBytecode function, which produces the assembled shader
bytecode.
A "point of interest": in the bottom part of asmshader.h there are
some definitions borrowed from wined3d. They are used only internally,
so they should not be a problem, but I'd like to hear if you think
differently (ex. it is better to rename them?).

Thank you,
Matteo Bruni
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asmshader.txt.bz2
Type: application/x-bzip2
Size: 33165 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090719/91177a8f/attachment-0001.bin>


More information about the wine-devel mailing list