Author: akhaldi
Date: Sat Apr 19 18:26:34 2014
New Revision: 62815
URL:
http://svn.reactos.org/svn/reactos?rev=62815&view=rev
Log:
[D3DCOMPILER_43]
* Sync with Wine 1.7.17.
CORE-8080
Modified:
trunk/reactos/dll/directx/wine/d3dcompiler_43/asmparser.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.tab.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.tab.h
trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.y
trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.yy.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/compiler.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h
trunk/reactos/dll/directx/wine/d3dcompiler_43/hlsl.yy.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/reflection.c
trunk/reactos/dll/directx/wine/d3dcompiler_43/utils.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/asmparser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/asmparser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/asmparser.c [iso-8859-1] Sat Apr 19
18:26:34 2014
@@ -497,11 +497,10 @@
* go through asmparser_instr).
*/
-static void asmparser_instr(struct asm_parser *This, DWORD opcode,
- DWORD mod, DWORD shift,
- BWRITER_COMPARISON_TYPE comp,
- const struct shader_reg *dst,
- const struct src_regs *srcs, int expectednsrcs) {
+static void asmparser_instr(struct asm_parser *This, DWORD opcode, DWORD mod, DWORD
shift,
+ enum bwriter_comparison_type comp, const struct shader_reg *dst,
+ const struct src_regs *srcs, int expectednsrcs)
+{
struct instruction *instr;
unsigned int i;
BOOL firstreg = TRUE;
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.tab.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.tab.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.tab.c [iso-8859-1] Sat Apr 19
18:26:34 2014
@@ -343,12 +343,12 @@
DWORD mod;
DWORD shift;
} modshift;
- BWRITER_COMPARISON_TYPE comptype;
+ enum bwriter_comparison_type comptype;
struct {
DWORD dclusage;
unsigned int regnum;
} declaration;
- BWRITERSAMPLER_TEXTURE_TYPE samplertype;
+ enum bwritersampler_texture_type samplertype;
struct rel_reg rel_reg;
struct src_regs sregs;
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.tab.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.tab.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.tab.h [iso-8859-1] Sat Apr 19
18:26:34 2014
@@ -233,12 +233,12 @@
DWORD mod;
DWORD shift;
} modshift;
- BWRITER_COMPARISON_TYPE comptype;
+ enum bwriter_comparison_type comptype;
struct {
DWORD dclusage;
unsigned int regnum;
} declaration;
- BWRITERSAMPLER_TEXTURE_TYPE samplertype;
+ enum bwritersampler_texture_type samplertype;
struct rel_reg rel_reg;
struct src_regs sregs;
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.y
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.y [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.y [iso-8859-1] Sat Apr 19
18:26:34 2014
@@ -92,12 +92,12 @@
DWORD mod;
DWORD shift;
} modshift;
- BWRITER_COMPARISON_TYPE comptype;
+ enum bwriter_comparison_type comptype;
struct {
DWORD dclusage;
unsigned int regnum;
} declaration;
- BWRITERSAMPLER_TEXTURE_TYPE samplertype;
+ enum bwritersampler_texture_type samplertype;
struct rel_reg rel_reg;
struct src_regs sregs;
}
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.yy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.yy.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/asmshader.yy.c [iso-8859-1] Sat Apr 19
18:26:34 2014
@@ -360,7 +360,7 @@
/* Begin user sect3 */
-#define asmshader_wrap() 1
+#define asmshader_wrap(n) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/compiler.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/compiler.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/compiler.c [iso-8859-1] Sat Apr 19
18:26:34 2014
@@ -144,8 +144,10 @@
char *path;
int i;
+ TRACE("Looking for include %s.\n", debugstr_a(filename));
+
parent_include = NULL;
- if(parent_name[0] != '\0')
+ if (strcmp(parent_name, initial_filename))
{
for(i = 0; i < includes_size; i++)
{
@@ -157,7 +159,7 @@
}
if(parent_include == NULL)
{
- ERR("Parent include file missing\n");
+ ERR("Parent include %s missing.\n", debugstr_a(parent_name));
return NULL;
}
}
@@ -173,6 +175,8 @@
struct mem_file_desc *desc;
HRESULT hr;
+ TRACE("Opening include %s.\n", debugstr_a(filename));
+
if(!strcmp(filename, initial_filename))
{
current_shader.pos = 0;
@@ -184,11 +188,8 @@
if(!desc)
return NULL;
- hr = ID3DInclude_Open(current_include,
- type ? D3D_INCLUDE_LOCAL : D3D_INCLUDE_SYSTEM,
- filename, parent_include, (LPCVOID *)&desc->buffer,
- &desc->size);
- if(FAILED(hr))
+ if (FAILED(hr = ID3DInclude_Open(current_include, type ? D3D_INCLUDE_LOCAL :
D3D_INCLUDE_SYSTEM,
+ filename, parent_include, (const void **)&desc->buffer,
&desc->size)))
{
HeapFree(GetProcessHeap(), 0, desc);
return NULL;
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c [iso-8859-1]
(original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c [iso-8859-1] Sat
Apr 19 18:26:34 2014
@@ -21,7 +21,7 @@
#include "d3dcompiler_private.h"
-BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
+BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
{
switch (reason)
{
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h [iso-8859-1]
(original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h [iso-8859-1] Sat
Apr 19 18:26:34 2014
@@ -57,7 +57,8 @@
ST_PIXEL
};
-typedef enum BWRITER_COMPARISON_TYPE {
+enum bwriter_comparison_type
+{
BWRITER_COMPARISON_NONE,
BWRITER_COMPARISON_GT,
BWRITER_COMPARISON_EQ,
@@ -65,7 +66,7 @@
BWRITER_COMPARISON_LT,
BWRITER_COMPARISON_NE,
BWRITER_COMPARISON_LE
-} BWRITER_COMPARISON_TYPE;
+};
struct constant {
DWORD regnum;
@@ -92,7 +93,7 @@
DWORD opcode;
DWORD dstmod;
DWORD shift;
- BWRITER_COMPARISON_TYPE comptype;
+ enum bwriter_comparison_type comptype;
BOOL has_dst;
struct shader_reg dst;
struct shader_reg *src;
@@ -218,9 +219,9 @@
void (*end)(struct asm_parser *This);
- void (*instr)(struct asm_parser *This, DWORD opcode, DWORD mod, DWORD shift,
- BWRITER_COMPARISON_TYPE comp, const struct shader_reg *dst,
- const struct src_regs *srcs, int expectednsrcs);
+ void (*instr)(struct asm_parser *parser, DWORD opcode, DWORD mod, DWORD shift,
+ enum bwriter_comparison_type comp, const struct shader_reg *dst,
+ const struct src_regs *srcs, int expectednsrcs);
};
struct instruction *alloc_instr(unsigned int srcs) DECLSPEC_HIDDEN;
@@ -367,11 +368,10 @@
/* Used to signal an incorrect swizzle/writemask */
#define SWIZZLE_ERR ~0U
-/*
- Enumerations and defines used in the bytecode writer
- intermediate representation
-*/
-typedef enum _BWRITERSHADER_INSTRUCTION_OPCODE_TYPE {
+/* Enumerations and defines used in the bytecode writer intermediate
+ * representation. */
+enum bwritershader_instruction_opcode_type
+{
BWRITERSIO_NOP,
BWRITERSIO_MOV,
BWRITERSIO_ADD,
@@ -460,9 +460,10 @@
BWRITERSIO_PHASE,
BWRITERSIO_COMMENT,
BWRITERSIO_END,
-} BWRITERSHADER_INSTRUCTION_OPCODE_TYPE;
-
-typedef enum _BWRITERSHADER_PARAM_REGISTER_TYPE {
+};
+
+enum bwritershader_param_register_type
+{
BWRITERSPR_TEMP,
BWRITERSPR_INPUT,
BWRITERSPR_CONST,
@@ -481,14 +482,14 @@
BWRITERSPR_MISCTYPE,
BWRITERSPR_LABEL,
BWRITERSPR_PREDICATE
-} BWRITERSHADER_PARAM_REGISTER_TYPE;
-
-typedef enum _BWRITERVS_RASTOUT_OFFSETS
+};
+
+enum bwritervs_rastout_offsets
{
BWRITERSRO_POSITION,
BWRITERSRO_FOG,
BWRITERSRO_POINT_SIZE
-} BWRITERVS_RASTOUT_OFFSETS;
+};
#define BWRITERSP_WRITEMASK_0 0x1 /* .x r */
#define BWRITERSP_WRITEMASK_1 0x2 /* .y g */
@@ -496,25 +497,28 @@
#define BWRITERSP_WRITEMASK_3 0x8 /* .w a */
#define BWRITERSP_WRITEMASK_ALL 0xf /* all */
-typedef enum _BWRITERSHADER_PARAM_DSTMOD_TYPE {
+enum bwritershader_param_dstmod_type
+{
BWRITERSPDM_NONE = 0,
BWRITERSPDM_SATURATE = 1,
BWRITERSPDM_PARTIALPRECISION = 2,
BWRITERSPDM_MSAMPCENTROID = 4,
-} BWRITERSHADER_PARAM_DSTMOD_TYPE;
-
-typedef enum _BWRITERSAMPLER_TEXTURE_TYPE {
+};
+
+enum bwritersampler_texture_type
+{
BWRITERSTT_UNKNOWN = 0,
BWRITERSTT_1D = 1,
BWRITERSTT_2D = 2,
BWRITERSTT_CUBE = 3,
BWRITERSTT_VOLUME = 4,
-} BWRITERSAMPLER_TEXTURE_TYPE;
+};
#define BWRITERSI_TEXLD_PROJECT 1
#define BWRITERSI_TEXLD_BIAS 2
-typedef enum _BWRITERSHADER_PARAM_SRCMOD_TYPE {
+enum bwritershader_param_srcmod_type
+{
BWRITERSPSM_NONE = 0,
BWRITERSPSM_NEG,
BWRITERSPSM_BIAS,
@@ -529,7 +533,7 @@
BWRITERSPSM_ABS,
BWRITERSPSM_ABSNEG,
BWRITERSPSM_NOT,
-} BWRITERSHADER_PARAM_SRCMOD_TYPE;
+};
#define BWRITER_SM1_VS 0xfffe
#define BWRITER_SM1_PS 0xffff
@@ -567,7 +571,8 @@
#define BWRITERVS_SWIZZLE_Z (BWRITERVS_X_Z | BWRITERVS_Y_Z | BWRITERVS_Z_Z |
BWRITERVS_W_Z)
#define BWRITERVS_SWIZZLE_W (BWRITERVS_X_W | BWRITERVS_Y_W | BWRITERVS_Z_W |
BWRITERVS_W_W)
-typedef enum _BWRITERDECLUSAGE {
+enum bwriterdeclusage
+{
BWRITERDECLUSAGE_POSITION,
BWRITERDECLUSAGE_BLENDWEIGHT,
BWRITERDECLUSAGE_BLENDINDICES,
@@ -582,7 +587,7 @@
BWRITERDECLUSAGE_FOG,
BWRITERDECLUSAGE_DEPTH,
BWRITERDECLUSAGE_SAMPLE
-} BWRITERDECLUSAGE;
+};
/* ps 1.x texture registers mappings */
#define T0_REG 2
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/hlsl.yy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/hlsl.yy.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/hlsl.yy.c [iso-8859-1] Sat Apr 19
18:26:34 2014
@@ -360,7 +360,7 @@
/* Begin user sect3 */
-#define hlsl_wrap() 1
+#define hlsl_wrap(n) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/reflection.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/reflection.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/reflection.c [iso-8859-1] Sat Apr 19
18:26:34 2014
@@ -69,7 +69,7 @@
UINT start_offset;
UINT size;
UINT flags;
- LPVOID default_value;
+ void *default_value;
};
struct d3dcompiler_shader_reflection_constant_buffer
@@ -179,7 +179,7 @@
*value = HeapAlloc(GetProcessHeap(), 0, size);
if (!*value)
{
- ERR("Failed to allocate vlaue memory.\n");
+ ERR("Failed to allocate value memory.\n");
return FALSE;
}
@@ -442,7 +442,7 @@
}
static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE
d3dcompiler_shader_reflection_GetConstantBufferByName(
- ID3D11ShaderReflection *iface, LPCSTR name)
+ ID3D11ShaderReflection *iface, const char *name)
{
struct d3dcompiler_shader_reflection *This =
impl_from_ID3D11ShaderReflection(iface);
unsigned int i;
@@ -544,7 +544,7 @@
}
static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE
d3dcompiler_shader_reflection_GetVariableByName(
- ID3D11ShaderReflection *iface, LPCSTR name)
+ ID3D11ShaderReflection *iface, const char *name)
{
struct d3dcompiler_shader_reflection *This =
impl_from_ID3D11ShaderReflection(iface);
unsigned int i, k;
@@ -579,7 +579,7 @@
}
static HRESULT STDMETHODCALLTYPE
d3dcompiler_shader_reflection_GetResourceBindingDescByName(
- ID3D11ShaderReflection *iface, LPCSTR name, D3D11_SHADER_INPUT_BIND_DESC *desc)
+ ID3D11ShaderReflection *iface, const char *name, D3D11_SHADER_INPUT_BIND_DESC
*desc)
{
struct d3dcompiler_shader_reflection *This =
impl_from_ID3D11ShaderReflection(iface);
unsigned int i;
@@ -658,7 +658,7 @@
{
FIXME("iface %p stub!\n", iface);
- return 0;
+ return FALSE;
}
static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetNumInterfaceSlots(
@@ -764,7 +764,7 @@
}
static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE
d3dcompiler_shader_reflection_constant_buffer_GetVariableByName(
- ID3D11ShaderReflectionConstantBuffer *iface, LPCSTR name)
+ ID3D11ShaderReflectionConstantBuffer *iface, const char *name)
{
struct d3dcompiler_shader_reflection_constant_buffer *This =
impl_from_ID3D11ShaderReflectionConstantBuffer(iface);
unsigned int i;
@@ -921,7 +921,7 @@
}
static ID3D11ShaderReflectionType * STDMETHODCALLTYPE
d3dcompiler_shader_reflection_type_GetMemberTypeByName(
- ID3D11ShaderReflectionType *iface, LPCSTR name)
+ ID3D11ShaderReflectionType *iface, const char *name)
{
struct d3dcompiler_shader_reflection_type *This =
impl_from_ID3D11ShaderReflectionType(iface);
unsigned int i;
@@ -950,7 +950,7 @@
return &null_type.ID3D11ShaderReflectionType_iface;
}
-static LPCSTR STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberTypeName(
+static const char * STDMETHODCALLTYPE
d3dcompiler_shader_reflection_type_GetMemberTypeName(
ID3D11ShaderReflectionType *iface, UINT index)
{
struct d3dcompiler_shader_reflection_type *This =
impl_from_ID3D11ShaderReflectionType(iface);
Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
==============================================================================
--- trunk/reactos/dll/directx/wine/d3dcompiler_43/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/d3dcompiler_43/utils.c [iso-8859-1] Sat Apr 19 18:26:34
2014
@@ -1683,7 +1683,7 @@
static int compare_hlsl_types_rb(const void *key, const struct wine_rb_entry *entry)
{
- const char *name = (const char *)key;
+ const char *name = key;
const struct hlsl_type *type = WINE_RB_ENTRY_VALUE(entry, const struct hlsl_type,
scope_entry);
if (name == type->name)
@@ -1820,7 +1820,7 @@
static int compare_function_decl_rb(const void *key, const struct wine_rb_entry *entry)
{
- const struct list *params = (const struct list *)key;
+ const struct list *params = key;
const struct hlsl_ir_function_decl *decl = WINE_RB_ENTRY_VALUE(entry, const struct
hlsl_ir_function_decl, entry);
int params_count = params ? list_count(params) : 0;
int decl_params_count = decl->parameters ? list_count(decl->parameters) : 0;
@@ -1855,7 +1855,7 @@
static int compare_function_rb(const void *key, const struct wine_rb_entry *entry)
{
- const char *name = (const char *)key;
+ const char *name = key;
const struct hlsl_ir_function *func = WINE_RB_ENTRY_VALUE(entry, const struct
hlsl_ir_function,entry);
return strcmp(name, func->name);
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Apr 19 18:26:34 2014
@@ -30,7 +30,7 @@
reactos/dll/directx/wine/amstream # Synced to Wine-1.7.17
reactos/dll/directx/wine/d3d8 # Synced to Wine-1.7.17
reactos/dll/directx/wine/d3d9 # Synced to Wine-1.7.17
-reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-1.7.1
+reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-1.7.17
reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-1.7.1
reactos/dll/directx/wine/d3dxof # Synced to Wine-1.7.1
reactos/dll/directx/wine/ddraw # Synced to Wine-1.7.17