On Mon, Jun 8, 2020 at 11:50 PM Zebediah Figura <z.figura12(a)gmail.com> wrote:
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> --- dlls/d3dcompiler_43/compiler.c | 49 ++++++----------------- dlls/d3dcompiler_43/d3dcompiler_private.h | 4 +- dlls/d3dcompiler_43/hlsl.l | 14 +++---- dlls/d3dcompiler_43/hlsl.y | 10 +++-- dlls/d3dcompiler_43/tests/hlsl_d3d9.c | 2 +- 5 files changed, 29 insertions(+), 50 deletions(-)
diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index 9fc7c1d7734..78fb0c46cc0 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -752,12 +752,11 @@ static const struct target_info * get_target_info(const char *target) }
static HRESULT compile_shader(const char *preproc_shader, const char *target, const char *entrypoint, - ID3DBlob **shader_blob, ID3DBlob **error_messages) + ID3DBlob **shader, ID3DBlob **error_messages) { - struct bwriter_shader *shader; + DWORD size, major, minor; char *messages = NULL; HRESULT hr; - DWORD *res, size, major, minor; ID3DBlob *buffer; char *pos; enum shader_type shader_type; @@ -787,7 +786,7 @@ static HRESULT compile_shader(const char *preproc_shader, const char *target, co } }
- shader = parse_hlsl_shader(preproc_shader, shader_type, major, minor, entrypoint, &messages); + hr = parse_hlsl_shader(preproc_shader, shader_type, major, minor, entrypoint, shader, &messages);
Nothing really new, but it feels a bit awkward that parse_hlsl_shader() is supposed to generate the complete shader. I think it's just a matter of naming, replacing parse_hlsl_shader() and parse_hlsl() with e.g. compile_hlsl_shader() / compile_hlsl() is probably all there is to it.