[PATCH 5/5] d3dcompiler: Partially implement D3DCompile function.

Matteo Bruni matteo.mystral at gmail.com
Tue May 8 10:25:23 CDT 2012


2012/5/8 Henri Verbeet <hverbeet at gmail.com>:
> I realize compile_shader() is mostly a copy of assemble_shader(), but
> nevertheless:
>
> On 8 May 2012 16:17, Matteo Bruni <mbruni at codeweavers.com> wrote:
>> +struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD version,
> If this isn't called outside of compiler.c it should be static.
>

This is going to change in the following patches, but yeah, right now
it can be static.

>> +    LPD3DBLOB buffer;
> "ID3DBlob *"
>
>> +                CopyMemory(pos, preproc_messages, strlen(preproc_messages) + 1);
> memcpy() should do fine.
>
>> +    hr = SlWriteBytecode(shader, 9, &res);
> ...
>> +        size = HeapSize(GetProcessHeap(), 0, res);
>> +        hr = D3DCreateBlob(size, &buffer);
> That's not very pretty, SlWriteBytecode() should probably just return
> the size as well.
>
>

True. I'll change that in assemble_shader() too, while I'm at it.



More information about the wine-devel mailing list