* Sync with Wine 1.7.17.
CORE-8080
svn path=/trunk/; revision=62815
12 files changed:
* go through asmparser_instr).
*/
* 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;
struct instruction *instr;
unsigned int i;
BOOL firstreg = TRUE;
DWORD mod;
DWORD shift;
} modshift;
DWORD mod;
DWORD shift;
} modshift;
- BWRITER_COMPARISON_TYPE comptype;
+ enum bwriter_comparison_type comptype;
struct {
DWORD dclusage;
unsigned int regnum;
} declaration;
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;
struct rel_reg rel_reg;
struct src_regs sregs;
DWORD mod;
DWORD shift;
} modshift;
DWORD mod;
DWORD shift;
} modshift;
- BWRITER_COMPARISON_TYPE comptype;
+ enum bwriter_comparison_type comptype;
struct {
DWORD dclusage;
unsigned int regnum;
} declaration;
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;
struct rel_reg rel_reg;
struct src_regs sregs;
DWORD mod;
DWORD shift;
} modshift;
DWORD mod;
DWORD shift;
} modshift;
- BWRITER_COMPARISON_TYPE comptype;
+ enum bwriter_comparison_type comptype;
struct {
DWORD dclusage;
unsigned int regnum;
} declaration;
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;
}
struct rel_reg rel_reg;
struct src_regs sregs;
}
-#define asmshader_wrap() 1
+#define asmshader_wrap(n) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
+ TRACE("Looking for include %s.\n", debugstr_a(filename));
+
- if(parent_name[0] != '\0')
+ if (strcmp(parent_name, initial_filename))
{
for(i = 0; i < includes_size; i++)
{
{
for(i = 0; i < includes_size; i++)
{
}
if(parent_include == NULL)
{
}
if(parent_include == NULL)
{
- ERR("Parent include file missing\n");
+ ERR("Parent include %s missing.\n", debugstr_a(parent_name));
struct mem_file_desc *desc;
HRESULT hr;
struct mem_file_desc *desc;
HRESULT hr;
+ TRACE("Opening include %s.\n", debugstr_a(filename));
+
if(!strcmp(filename, initial_filename))
{
current_shader.pos = 0;
if(!strcmp(filename, initial_filename))
{
current_shader.pos = 0;
- 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;
{
HeapFree(GetProcessHeap(), 0, desc);
return NULL;
#include "d3dcompiler_private.h"
#include "d3dcompiler_private.h"
-BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
+BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
-typedef enum BWRITER_COMPARISON_TYPE {
+enum bwriter_comparison_type
+{
BWRITER_COMPARISON_NONE,
BWRITER_COMPARISON_GT,
BWRITER_COMPARISON_EQ,
BWRITER_COMPARISON_NONE,
BWRITER_COMPARISON_GT,
BWRITER_COMPARISON_EQ,
BWRITER_COMPARISON_LT,
BWRITER_COMPARISON_NE,
BWRITER_COMPARISON_LE
BWRITER_COMPARISON_LT,
BWRITER_COMPARISON_NE,
BWRITER_COMPARISON_LE
-} BWRITER_COMPARISON_TYPE;
struct constant {
DWORD regnum;
struct constant {
DWORD regnum;
DWORD opcode;
DWORD dstmod;
DWORD shift;
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;
BOOL has_dst;
struct shader_reg dst;
struct shader_reg *src;
void (*end)(struct asm_parser *This);
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;
};
struct instruction *alloc_instr(unsigned int srcs) DECLSPEC_HIDDEN;
/* Used to signal an incorrect swizzle/writemask */
#define SWIZZLE_ERR ~0U
/* 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,
BWRITERSIO_NOP,
BWRITERSIO_MOV,
BWRITERSIO_ADD,
BWRITERSIO_PHASE,
BWRITERSIO_COMMENT,
BWRITERSIO_END,
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,
BWRITERSPR_TEMP,
BWRITERSPR_INPUT,
BWRITERSPR_CONST,
BWRITERSPR_MISCTYPE,
BWRITERSPR_LABEL,
BWRITERSPR_PREDICATE
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
{
BWRITERSRO_POSITION,
BWRITERSRO_FOG,
BWRITERSRO_POINT_SIZE
-} BWRITERVS_RASTOUT_OFFSETS;
#define BWRITERSP_WRITEMASK_0 0x1 /* .x r */
#define BWRITERSP_WRITEMASK_1 0x2 /* .y g */
#define BWRITERSP_WRITEMASK_0 0x1 /* .x r */
#define BWRITERSP_WRITEMASK_1 0x2 /* .y g */
#define BWRITERSP_WRITEMASK_3 0x8 /* .w a */
#define BWRITERSP_WRITEMASK_ALL 0xf /* all */
#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,
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,
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
#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,
BWRITERSPSM_NONE = 0,
BWRITERSPSM_NEG,
BWRITERSPSM_BIAS,
BWRITERSPSM_ABS,
BWRITERSPSM_ABSNEG,
BWRITERSPSM_NOT,
BWRITERSPSM_ABS,
BWRITERSPSM_ABSNEG,
BWRITERSPSM_NOT,
-} BWRITERSHADER_PARAM_SRCMOD_TYPE;
#define BWRITER_SM1_VS 0xfffe
#define BWRITER_SM1_PS 0xffff
#define BWRITER_SM1_VS 0xfffe
#define BWRITER_SM1_PS 0xffff
#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)
#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,
BWRITERDECLUSAGE_POSITION,
BWRITERDECLUSAGE_BLENDWEIGHT,
BWRITERDECLUSAGE_BLENDINDICES,
BWRITERDECLUSAGE_FOG,
BWRITERDECLUSAGE_DEPTH,
BWRITERDECLUSAGE_SAMPLE
BWRITERDECLUSAGE_FOG,
BWRITERDECLUSAGE_DEPTH,
BWRITERDECLUSAGE_SAMPLE
/* ps 1.x texture registers mappings */
#define T0_REG 2
/* ps 1.x texture registers mappings */
#define T0_REG 2
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
UINT start_offset;
UINT size;
UINT flags;
UINT start_offset;
UINT size;
UINT flags;
};
struct d3dcompiler_shader_reflection_constant_buffer
};
struct d3dcompiler_shader_reflection_constant_buffer
*value = HeapAlloc(GetProcessHeap(), 0, size);
if (!*value)
{
*value = HeapAlloc(GetProcessHeap(), 0, size);
if (!*value)
{
- ERR("Failed to allocate vlaue memory.\n");
+ ERR("Failed to allocate value memory.\n");
}
static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByName(
}
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;
{
struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
unsigned int i;
}
static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetVariableByName(
}
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;
{
struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
unsigned int i, k;
}
static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDescByName(
}
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;
{
struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface);
unsigned int i;
{
FIXME("iface %p stub!\n", iface);
{
FIXME("iface %p stub!\n", iface);
}
static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetNumInterfaceSlots(
}
static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetNumInterfaceSlots(
}
static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByName(
}
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;
{
struct d3dcompiler_shader_reflection_constant_buffer *This = impl_from_ID3D11ShaderReflectionConstantBuffer(iface);
unsigned int i;
}
static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberTypeByName(
}
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;
{
struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface);
unsigned int i;
return &null_type.ID3D11ShaderReflectionType_iface;
}
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);
ID3D11ShaderReflectionType *iface, UINT index)
{
struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface);
static int compare_hlsl_types_rb(const void *key, const struct wine_rb_entry *entry)
{
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)
const struct hlsl_type *type = WINE_RB_ENTRY_VALUE(entry, const struct hlsl_type, scope_entry);
if (name == type->name)
static int compare_function_decl_rb(const void *key, const struct wine_rb_entry *entry)
{
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;
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;
static int compare_function_rb(const void *key, const struct wine_rb_entry *entry)
{
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);
const struct hlsl_ir_function *func = WINE_RB_ENTRY_VALUE(entry, const struct hlsl_ir_function,entry);
return strcmp(name, func->name);
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/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
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