2012/5/8 Henri Verbeet :
> I realize compile_shader() is mostly a copy of assemble_shader(), but
> nevertheless:
>
> On 8 May 2012 16:17, Matteo Bruni 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.