Adds PARENTSRC of d3dcompiler_43 to eventually use the reflection functionality from it. Fixes conflicts of GUID declarations and functions with the same names.
Signed-off-by: Connor McAdams conmanx360@gmail.com --- dlls/d3d10/Makefile.in | 19 +++++++++++++++++++ dlls/d3d10/d3d10_private.h | 2 +- dlls/d3d10/effect.c | 12 ++++++------ dlls/d3d10/utils.c | 4 ++-- dlls/d3dcompiler_43/reflection.c | 3 ++- 5 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d10/Makefile.in b/dlls/d3d10/Makefile.in index e76f3c5f19..2d79dd53e0 100644 --- a/dlls/d3d10/Makefile.in +++ b/dlls/d3d10/Makefile.in @@ -1,14 +1,33 @@ MODULE = d3d10.dll IMPORTLIB = d3d10 IMPORTS = dxguid uuid d3d10core d3dcompiler dxgi +EXTRADEFS = -DD3D10REFLECT +PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ + asmparser.c \ + blob.c \ + bytecodewriter.c \ + compiler.c \ + preproc.c \ + reflection.c \ + ../d3dcompiler_43/utils.c \ d3d10_main.c \ effect.c \ shader.c \ stateblock.c \ utils.c
+LEX_SRCS = \ + asmshader.l \ + hlsl.l \ + ppl.l + +BISON_SRCS = \ + asmshader.y \ + hlsl.y \ + ppy.y + RC_SRCS = version.rc diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h index f3fce9c569..bd149f0b41 100644 --- a/dlls/d3d10/d3d10_private.h +++ b/dlls/d3d10/d3d10_private.h @@ -298,7 +298,7 @@ static inline BOOL require_space(size_t offset, size_t count, size_t size, size_ return !count || (data_size - offset) / count >= size; }
-void skip_dword_unknown(const char *location, const char **ptr, unsigned int count) DECLSPEC_HIDDEN; +void d3d10_skip_dword_unknown(const char *location, const char **ptr, unsigned int count) DECLSPEC_HIDDEN; void write_dword_unknown(char **ptr, DWORD d) DECLSPEC_HIDDEN;
#endif /* __WINE_D3D10_PRIVATE_H */ diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 439833485d..031b907955 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -343,7 +343,7 @@ static HRESULT shader_parse_signature(const char *data, DWORD data_size, struct read_dword(&ptr, &count); TRACE("%u elements\n", count);
- skip_dword_unknown("shader signature", &ptr, 1); + d3d10_skip_dword_unknown("shader signature", &ptr, 1);
if (!require_space(ptr - data, count, 6 * sizeof(DWORD), data_size)) { @@ -1063,7 +1063,7 @@ static HRESULT parse_fx10_annotation(const char *data, size_t data_size, if (FAILED(hr = parse_fx10_variable_head(data, data_size, ptr, a))) return hr;
- skip_dword_unknown("annotation", ptr, 1); + d3d10_skip_dword_unknown("annotation", ptr, 1);
/* mark the variable as annotation */ a->flag = D3D10_EFFECT_VARIABLE_ANNOTATION; @@ -1292,7 +1292,7 @@ static BOOL parse_fx10_state_group(const char *data, size_t data_size, { read_dword(ptr, &id); read_dword(ptr, &idx); - skip_dword_unknown("read property", ptr, 1); + d3d10_skip_dword_unknown("read property", ptr, 1); read_dword(ptr, &value_offset);
if (!(property_info = get_property_info(id))) @@ -1708,7 +1708,7 @@ static HRESULT parse_fx10_variable(const char *data, size_t data_size, read_dword(ptr, &v->buffer_offset); TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset);
- skip_dword_unknown("variable", ptr, 1); + d3d10_skip_dword_unknown("variable", ptr, 1);
read_dword(ptr, &v->flag); TRACE("Variable flag: %#x.\n", v->flag); @@ -1795,7 +1795,7 @@ static HRESULT parse_fx10_local_variable(const char *data, size_t data_size, } TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
- skip_dword_unknown("local variable", ptr, 1); + d3d10_skip_dword_unknown("local variable", ptr, 1);
switch (v->type->basetype) { @@ -1973,7 +1973,7 @@ static HRESULT parse_fx10_local_buffer(const char *data, size_t data_size, read_dword(ptr, &l->type->member_count); TRACE("Local buffer member count: %#x.\n", l->type->member_count);
- skip_dword_unknown("local buffer", ptr, 1); + d3d10_skip_dword_unknown("local buffer", ptr, 1);
read_dword(ptr, &l->annotation_count); TRACE("Local buffer has %u annotations.\n", l->annotation_count); diff --git a/dlls/d3d10/utils.c b/dlls/d3d10/utils.c index 3b51868488..3c9935a8ab 100644 --- a/dlls/d3d10/utils.c +++ b/dlls/d3d10/utils.c @@ -129,7 +129,7 @@ const char *debug_d3d10_device_state_types(D3D10_DEVICE_STATE_TYPES t)
#undef WINE_D3D10_TO_STR
-void skip_dword_unknown(const char *location, const char **ptr, unsigned int count) +void d3d10_skip_dword_unknown(const char *location, const char **ptr, unsigned int count) { unsigned int i; DWORD d; @@ -175,7 +175,7 @@ HRESULT parse_dxbc(const char *data, SIZE_T data_size, }
/* checksum? */ - skip_dword_unknown("DXBC header", &ptr, 4); + d3d10_skip_dword_unknown("DXBC header", &ptr, 4);
read_dword(&ptr, &version); TRACE("version: %#x.\n", version); diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index b163fca9e7..ce634ac95a 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -17,8 +17,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * */ - +#ifndef D3D10REFLECT #include "initguid.h" +#endif #include "d3dcompiler_private.h" #include "winternl.h"