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