[D3DCOMPILER_43]

* Sync with Wine 1.7.27.
CORE-8540

svn path=/trunk/; revision=64285
This commit is contained in:
Amine Khaldi 2014-09-25 19:38:09 +00:00
parent 2b48c4a4b1
commit b5a2ac0266
10 changed files with 2906 additions and 3686 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */ /* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -30,184 +30,190 @@
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
#ifndef YY_ASMSHADER_ASMSHADER_TAB_H_INCLUDED
/* Tokens. */ # define YY_ASMSHADER_ASMSHADER_TAB_H_INCLUDED
#ifndef YYTOKENTYPE /* Debug traces. */
# define YYTOKENTYPE #ifndef YYDEBUG
/* Put the tokens into the symbol table, so that GDB and other debuggers # define YYDEBUG 0
know about them. */ #endif
enum yytokentype { #if YYDEBUG
INSTR_ADD = 258, extern int asmshader_debug;
INSTR_NOP = 259,
INSTR_MOV = 260,
INSTR_SUB = 261,
INSTR_MAD = 262,
INSTR_MUL = 263,
INSTR_RCP = 264,
INSTR_RSQ = 265,
INSTR_DP3 = 266,
INSTR_DP4 = 267,
INSTR_MIN = 268,
INSTR_MAX = 269,
INSTR_SLT = 270,
INSTR_SGE = 271,
INSTR_ABS = 272,
INSTR_EXP = 273,
INSTR_LOG = 274,
INSTR_EXPP = 275,
INSTR_LOGP = 276,
INSTR_DST = 277,
INSTR_LRP = 278,
INSTR_FRC = 279,
INSTR_POW = 280,
INSTR_CRS = 281,
INSTR_SGN = 282,
INSTR_NRM = 283,
INSTR_SINCOS = 284,
INSTR_M4x4 = 285,
INSTR_M4x3 = 286,
INSTR_M3x4 = 287,
INSTR_M3x3 = 288,
INSTR_M3x2 = 289,
INSTR_DCL = 290,
INSTR_DEF = 291,
INSTR_DEFB = 292,
INSTR_DEFI = 293,
INSTR_REP = 294,
INSTR_ENDREP = 295,
INSTR_IF = 296,
INSTR_ELSE = 297,
INSTR_ENDIF = 298,
INSTR_BREAK = 299,
INSTR_BREAKP = 300,
INSTR_CALL = 301,
INSTR_CALLNZ = 302,
INSTR_LOOP = 303,
INSTR_RET = 304,
INSTR_ENDLOOP = 305,
INSTR_LABEL = 306,
INSTR_SETP = 307,
INSTR_TEXLDL = 308,
INSTR_LIT = 309,
INSTR_MOVA = 310,
INSTR_CND = 311,
INSTR_CMP = 312,
INSTR_DP2ADD = 313,
INSTR_TEXCOORD = 314,
INSTR_TEXCRD = 315,
INSTR_TEXKILL = 316,
INSTR_TEX = 317,
INSTR_TEXLD = 318,
INSTR_TEXBEM = 319,
INSTR_TEXBEML = 320,
INSTR_TEXREG2AR = 321,
INSTR_TEXREG2GB = 322,
INSTR_TEXREG2RGB = 323,
INSTR_TEXM3x2PAD = 324,
INSTR_TEXM3x2TEX = 325,
INSTR_TEXM3x3PAD = 326,
INSTR_TEXM3x3SPEC = 327,
INSTR_TEXM3x3VSPEC = 328,
INSTR_TEXM3x3TEX = 329,
INSTR_TEXDP3TEX = 330,
INSTR_TEXM3x2DEPTH = 331,
INSTR_TEXDP3 = 332,
INSTR_TEXM3x3 = 333,
INSTR_TEXDEPTH = 334,
INSTR_BEM = 335,
INSTR_DSX = 336,
INSTR_DSY = 337,
INSTR_TEXLDP = 338,
INSTR_TEXLDB = 339,
INSTR_TEXLDD = 340,
INSTR_PHASE = 341,
REG_TEMP = 342,
REG_OUTPUT = 343,
REG_INPUT = 344,
REG_CONSTFLOAT = 345,
REG_CONSTINT = 346,
REG_CONSTBOOL = 347,
REG_TEXTURE = 348,
REG_SAMPLER = 349,
REG_TEXCRDOUT = 350,
REG_OPOS = 351,
REG_OFOG = 352,
REG_OPTS = 353,
REG_VERTEXCOLOR = 354,
REG_FRAGCOLOR = 355,
REG_FRAGDEPTH = 356,
REG_VPOS = 357,
REG_VFACE = 358,
REG_ADDRESS = 359,
REG_LOOP = 360,
REG_PREDICATE = 361,
REG_LABEL = 362,
VER_VS10 = 363,
VER_VS11 = 364,
VER_VS20 = 365,
VER_VS2X = 366,
VER_VS30 = 367,
VER_PS10 = 368,
VER_PS11 = 369,
VER_PS12 = 370,
VER_PS13 = 371,
VER_PS14 = 372,
VER_PS20 = 373,
VER_PS2X = 374,
VER_PS30 = 375,
SHIFT_X2 = 376,
SHIFT_X4 = 377,
SHIFT_X8 = 378,
SHIFT_D2 = 379,
SHIFT_D4 = 380,
SHIFT_D8 = 381,
MOD_SAT = 382,
MOD_PP = 383,
MOD_CENTROID = 384,
COMP_GT = 385,
COMP_LT = 386,
COMP_GE = 387,
COMP_LE = 388,
COMP_EQ = 389,
COMP_NE = 390,
SMOD_BIAS = 391,
SMOD_SCALEBIAS = 392,
SMOD_DZ = 393,
SMOD_DW = 394,
SMOD_ABS = 395,
SMOD_NOT = 396,
SAMPTYPE_1D = 397,
SAMPTYPE_2D = 398,
SAMPTYPE_CUBE = 399,
SAMPTYPE_VOLUME = 400,
USAGE_POSITION = 401,
USAGE_BLENDWEIGHT = 402,
USAGE_BLENDINDICES = 403,
USAGE_NORMAL = 404,
USAGE_PSIZE = 405,
USAGE_TEXCOORD = 406,
USAGE_TANGENT = 407,
USAGE_BINORMAL = 408,
USAGE_TESSFACTOR = 409,
USAGE_POSITIONT = 410,
USAGE_COLOR = 411,
USAGE_FOG = 412,
USAGE_DEPTH = 413,
USAGE_SAMPLE = 414,
COMPONENT = 415,
IMMVAL = 416,
IMMBOOL = 417
};
#endif #endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
INSTR_ADD = 258,
INSTR_NOP = 259,
INSTR_MOV = 260,
INSTR_SUB = 261,
INSTR_MAD = 262,
INSTR_MUL = 263,
INSTR_RCP = 264,
INSTR_RSQ = 265,
INSTR_DP3 = 266,
INSTR_DP4 = 267,
INSTR_MIN = 268,
INSTR_MAX = 269,
INSTR_SLT = 270,
INSTR_SGE = 271,
INSTR_ABS = 272,
INSTR_EXP = 273,
INSTR_LOG = 274,
INSTR_EXPP = 275,
INSTR_LOGP = 276,
INSTR_DST = 277,
INSTR_LRP = 278,
INSTR_FRC = 279,
INSTR_POW = 280,
INSTR_CRS = 281,
INSTR_SGN = 282,
INSTR_NRM = 283,
INSTR_SINCOS = 284,
INSTR_M4x4 = 285,
INSTR_M4x3 = 286,
INSTR_M3x4 = 287,
INSTR_M3x3 = 288,
INSTR_M3x2 = 289,
INSTR_DCL = 290,
INSTR_DEF = 291,
INSTR_DEFB = 292,
INSTR_DEFI = 293,
INSTR_REP = 294,
INSTR_ENDREP = 295,
INSTR_IF = 296,
INSTR_ELSE = 297,
INSTR_ENDIF = 298,
INSTR_BREAK = 299,
INSTR_BREAKP = 300,
INSTR_CALL = 301,
INSTR_CALLNZ = 302,
INSTR_LOOP = 303,
INSTR_RET = 304,
INSTR_ENDLOOP = 305,
INSTR_LABEL = 306,
INSTR_SETP = 307,
INSTR_TEXLDL = 308,
INSTR_LIT = 309,
INSTR_MOVA = 310,
INSTR_CND = 311,
INSTR_CMP = 312,
INSTR_DP2ADD = 313,
INSTR_TEXCOORD = 314,
INSTR_TEXCRD = 315,
INSTR_TEXKILL = 316,
INSTR_TEX = 317,
INSTR_TEXLD = 318,
INSTR_TEXBEM = 319,
INSTR_TEXBEML = 320,
INSTR_TEXREG2AR = 321,
INSTR_TEXREG2GB = 322,
INSTR_TEXREG2RGB = 323,
INSTR_TEXM3x2PAD = 324,
INSTR_TEXM3x2TEX = 325,
INSTR_TEXM3x3PAD = 326,
INSTR_TEXM3x3SPEC = 327,
INSTR_TEXM3x3VSPEC = 328,
INSTR_TEXM3x3TEX = 329,
INSTR_TEXDP3TEX = 330,
INSTR_TEXM3x2DEPTH = 331,
INSTR_TEXDP3 = 332,
INSTR_TEXM3x3 = 333,
INSTR_TEXDEPTH = 334,
INSTR_BEM = 335,
INSTR_DSX = 336,
INSTR_DSY = 337,
INSTR_TEXLDP = 338,
INSTR_TEXLDB = 339,
INSTR_TEXLDD = 340,
INSTR_PHASE = 341,
REG_TEMP = 342,
REG_OUTPUT = 343,
REG_INPUT = 344,
REG_CONSTFLOAT = 345,
REG_CONSTINT = 346,
REG_CONSTBOOL = 347,
REG_TEXTURE = 348,
REG_SAMPLER = 349,
REG_TEXCRDOUT = 350,
REG_OPOS = 351,
REG_OFOG = 352,
REG_OPTS = 353,
REG_VERTEXCOLOR = 354,
REG_FRAGCOLOR = 355,
REG_FRAGDEPTH = 356,
REG_VPOS = 357,
REG_VFACE = 358,
REG_ADDRESS = 359,
REG_LOOP = 360,
REG_PREDICATE = 361,
REG_LABEL = 362,
VER_VS10 = 363,
VER_VS11 = 364,
VER_VS20 = 365,
VER_VS2X = 366,
VER_VS30 = 367,
VER_PS10 = 368,
VER_PS11 = 369,
VER_PS12 = 370,
VER_PS13 = 371,
VER_PS14 = 372,
VER_PS20 = 373,
VER_PS2X = 374,
VER_PS30 = 375,
SHIFT_X2 = 376,
SHIFT_X4 = 377,
SHIFT_X8 = 378,
SHIFT_D2 = 379,
SHIFT_D4 = 380,
SHIFT_D8 = 381,
MOD_SAT = 382,
MOD_PP = 383,
MOD_CENTROID = 384,
COMP_GT = 385,
COMP_LT = 386,
COMP_GE = 387,
COMP_LE = 388,
COMP_EQ = 389,
COMP_NE = 390,
SMOD_BIAS = 391,
SMOD_SCALEBIAS = 392,
SMOD_DZ = 393,
SMOD_DW = 394,
SMOD_ABS = 395,
SMOD_NOT = 396,
SAMPTYPE_1D = 397,
SAMPTYPE_2D = 398,
SAMPTYPE_CUBE = 399,
SAMPTYPE_VOLUME = 400,
USAGE_POSITION = 401,
USAGE_BLENDWEIGHT = 402,
USAGE_BLENDINDICES = 403,
USAGE_NORMAL = 404,
USAGE_PSIZE = 405,
USAGE_TEXCOORD = 406,
USAGE_TANGENT = 407,
USAGE_BINORMAL = 408,
USAGE_TESSFACTOR = 409,
USAGE_POSITIONT = 410,
USAGE_COLOR = 411,
USAGE_FOG = 412,
USAGE_DEPTH = 413,
USAGE_SAMPLE = 414,
COMPONENT = 415,
IMMVAL = 416,
IMMBOOL = 417
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{ {
#line 70 "asmshader.y" /* yacc.c:1909 */
/* Line 2068 of yacc.c */
#line 70 "asmshader.y"
struct { struct {
float val; float val;
@ -242,16 +248,15 @@ typedef union YYSTYPE
struct rel_reg rel_reg; struct rel_reg rel_reg;
struct src_regs sregs; struct src_regs sregs;
#line 252 "asmshader.tab.h" /* yacc.c:1909 */
};
/* Line 2068 of yacc.c */
#line 249 "asmshader.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
extern YYSTYPE asmshader_lval; extern YYSTYPE asmshader_lval;
int asmshader_parse (void);
#endif /* !YY_ASMSHADER_ASMSHADER_TAB_H_INCLUDED */

View file

@ -2618,6 +2618,7 @@ void SlDeleteShader(struct bwriter_shader *shader) {
d3dcompiler_free(shader->instr[i]->src[j].rel_reg); d3dcompiler_free(shader->instr[i]->src[j].rel_reg);
} }
d3dcompiler_free(shader->instr[i]->src); d3dcompiler_free(shader->instr[i]->src);
d3dcompiler_free(shader->instr[i]->dst.rel_reg);
d3dcompiler_free(shader->instr[i]); d3dcompiler_free(shader->instr[i]);
} }
d3dcompiler_free(shader->instr); d3dcompiler_free(shader->instr);

View file

@ -140,11 +140,12 @@ static void wpp_warning(const char *file, int line, int col, const char *_near,
static char *wpp_lookup_mem(const char *filename, int type, const char *parent_name, static char *wpp_lookup_mem(const char *filename, int type, const char *parent_name,
char **include_path, int include_path_count) char **include_path, int include_path_count)
{ {
/* Here we return always ok. We will maybe fail on the next wpp_open_mem */ /* We don't check for file existence here. We will potentially fail on
* the following wpp_open_mem(). */
char *path; char *path;
int i; int i;
TRACE("Looking for include %s.\n", debugstr_a(filename)); TRACE("Looking for include %s, parent %s.\n", debugstr_a(filename), debugstr_a(parent_name));
parent_include = NULL; parent_include = NULL;
if (strcmp(parent_name, initial_filename)) if (strcmp(parent_name, initial_filename))

View file

@ -829,6 +829,11 @@ enum hlsl_ir_expr_op {
HLSL_IR_UNOP_SAT, HLSL_IR_UNOP_SAT,
HLSL_IR_UNOP_PREINC,
HLSL_IR_UNOP_PREDEC,
HLSL_IR_UNOP_POSTINC,
HLSL_IR_UNOP_POSTDEC,
HLSL_IR_BINOP_ADD, HLSL_IR_BINOP_ADD,
HLSL_IR_BINOP_SUB, HLSL_IR_BINOP_SUB,
HLSL_IR_BINOP_MUL, HLSL_IR_BINOP_MUL,
@ -859,11 +864,6 @@ enum hlsl_ir_expr_op {
HLSL_IR_BINOP_POW, HLSL_IR_BINOP_POW,
HLSL_IR_BINOP_PREINC,
HLSL_IR_BINOP_PREDEC,
HLSL_IR_BINOP_POSTINC,
HLSL_IR_BINOP_POSTDEC,
HLSL_IR_TEROP_LERP, HLSL_IR_TEROP_LERP,
HLSL_IR_SEQUENCE, HLSL_IR_SEQUENCE,
@ -1109,8 +1109,6 @@ static inline struct hlsl_ir_loop *loop_from_node(const struct hlsl_ir_node *nod
BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var) DECLSPEC_HIDDEN; BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var) DECLSPEC_HIDDEN;
struct hlsl_ir_var *get_variable(struct hlsl_scope *scope, const char *name) DECLSPEC_HIDDEN; struct hlsl_ir_var *get_variable(struct hlsl_scope *scope, const char *name) DECLSPEC_HIDDEN;
void free_declaration(struct hlsl_ir_var *decl) DECLSPEC_HIDDEN; void free_declaration(struct hlsl_ir_var *decl) DECLSPEC_HIDDEN;
BOOL add_func_parameter(struct list *list, struct parse_parameter *param,
const struct source_location *loc) DECLSPEC_HIDDEN;
struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class, struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class,
enum hlsl_base_type base_type, unsigned dimx, unsigned dimy) DECLSPEC_HIDDEN; enum hlsl_base_type base_type, unsigned dimx, unsigned dimy) DECLSPEC_HIDDEN;
struct hlsl_type *new_array_type(struct hlsl_type *basic_type, unsigned int array_size) DECLSPEC_HIDDEN; struct hlsl_type *new_array_type(struct hlsl_type *basic_type, unsigned int array_size) DECLSPEC_HIDDEN;

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */ /* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -30,126 +30,132 @@
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
#ifndef YY_HLSL_HLSL_TAB_H_INCLUDED
/* Tokens. */ # define YY_HLSL_HLSL_TAB_H_INCLUDED
#ifndef YYTOKENTYPE /* Debug traces. */
# define YYTOKENTYPE #ifndef YYDEBUG
/* Put the tokens into the symbol table, so that GDB and other debuggers # define YYDEBUG 0
know about them. */ #endif
enum yytokentype { #if YYDEBUG
KW_BLENDSTATE = 258, extern int hlsl_debug;
KW_BREAK = 259,
KW_BUFFER = 260,
KW_CBUFFER = 261,
KW_COLUMN_MAJOR = 262,
KW_COMPILE = 263,
KW_CONST = 264,
KW_CONTINUE = 265,
KW_DEPTHSTENCILSTATE = 266,
KW_DEPTHSTENCILVIEW = 267,
KW_DISCARD = 268,
KW_DO = 269,
KW_DOUBLE = 270,
KW_ELSE = 271,
KW_EXTERN = 272,
KW_FALSE = 273,
KW_FOR = 274,
KW_GEOMETRYSHADER = 275,
KW_GROUPSHARED = 276,
KW_IF = 277,
KW_IN = 278,
KW_INLINE = 279,
KW_INOUT = 280,
KW_MATRIX = 281,
KW_NAMESPACE = 282,
KW_NOINTERPOLATION = 283,
KW_OUT = 284,
KW_PASS = 285,
KW_PIXELSHADER = 286,
KW_PRECISE = 287,
KW_RASTERIZERSTATE = 288,
KW_RENDERTARGETVIEW = 289,
KW_RETURN = 290,
KW_REGISTER = 291,
KW_ROW_MAJOR = 292,
KW_SAMPLER = 293,
KW_SAMPLER1D = 294,
KW_SAMPLER2D = 295,
KW_SAMPLER3D = 296,
KW_SAMPLERCUBE = 297,
KW_SAMPLER_STATE = 298,
KW_SAMPLERCOMPARISONSTATE = 299,
KW_SHARED = 300,
KW_STATEBLOCK = 301,
KW_STATEBLOCK_STATE = 302,
KW_STATIC = 303,
KW_STRING = 304,
KW_STRUCT = 305,
KW_SWITCH = 306,
KW_TBUFFER = 307,
KW_TECHNIQUE = 308,
KW_TECHNIQUE10 = 309,
KW_TEXTURE = 310,
KW_TEXTURE1D = 311,
KW_TEXTURE1DARRAY = 312,
KW_TEXTURE2D = 313,
KW_TEXTURE2DARRAY = 314,
KW_TEXTURE2DMS = 315,
KW_TEXTURE2DMSARRAY = 316,
KW_TEXTURE3D = 317,
KW_TEXTURE3DARRAY = 318,
KW_TEXTURECUBE = 319,
KW_TRUE = 320,
KW_TYPEDEF = 321,
KW_UNIFORM = 322,
KW_VECTOR = 323,
KW_VERTEXSHADER = 324,
KW_VOID = 325,
KW_VOLATILE = 326,
KW_WHILE = 327,
OP_INC = 328,
OP_DEC = 329,
OP_AND = 330,
OP_OR = 331,
OP_EQ = 332,
OP_LEFTSHIFT = 333,
OP_LEFTSHIFTASSIGN = 334,
OP_RIGHTSHIFT = 335,
OP_RIGHTSHIFTASSIGN = 336,
OP_ELLIPSIS = 337,
OP_LE = 338,
OP_GE = 339,
OP_NE = 340,
OP_ADDASSIGN = 341,
OP_SUBASSIGN = 342,
OP_MULASSIGN = 343,
OP_DIVASSIGN = 344,
OP_MODASSIGN = 345,
OP_ANDASSIGN = 346,
OP_ORASSIGN = 347,
OP_XORASSIGN = 348,
OP_UNKNOWN1 = 349,
OP_UNKNOWN2 = 350,
OP_UNKNOWN3 = 351,
OP_UNKNOWN4 = 352,
PRE_LINE = 353,
VAR_IDENTIFIER = 354,
TYPE_IDENTIFIER = 355,
NEW_IDENTIFIER = 356,
STRING = 357,
C_FLOAT = 358,
C_INTEGER = 359
};
#endif #endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
KW_BLENDSTATE = 258,
KW_BREAK = 259,
KW_BUFFER = 260,
KW_CBUFFER = 261,
KW_COLUMN_MAJOR = 262,
KW_COMPILE = 263,
KW_CONST = 264,
KW_CONTINUE = 265,
KW_DEPTHSTENCILSTATE = 266,
KW_DEPTHSTENCILVIEW = 267,
KW_DISCARD = 268,
KW_DO = 269,
KW_DOUBLE = 270,
KW_ELSE = 271,
KW_EXTERN = 272,
KW_FALSE = 273,
KW_FOR = 274,
KW_GEOMETRYSHADER = 275,
KW_GROUPSHARED = 276,
KW_IF = 277,
KW_IN = 278,
KW_INLINE = 279,
KW_INOUT = 280,
KW_MATRIX = 281,
KW_NAMESPACE = 282,
KW_NOINTERPOLATION = 283,
KW_OUT = 284,
KW_PASS = 285,
KW_PIXELSHADER = 286,
KW_PRECISE = 287,
KW_RASTERIZERSTATE = 288,
KW_RENDERTARGETVIEW = 289,
KW_RETURN = 290,
KW_REGISTER = 291,
KW_ROW_MAJOR = 292,
KW_SAMPLER = 293,
KW_SAMPLER1D = 294,
KW_SAMPLER2D = 295,
KW_SAMPLER3D = 296,
KW_SAMPLERCUBE = 297,
KW_SAMPLER_STATE = 298,
KW_SAMPLERCOMPARISONSTATE = 299,
KW_SHARED = 300,
KW_STATEBLOCK = 301,
KW_STATEBLOCK_STATE = 302,
KW_STATIC = 303,
KW_STRING = 304,
KW_STRUCT = 305,
KW_SWITCH = 306,
KW_TBUFFER = 307,
KW_TECHNIQUE = 308,
KW_TECHNIQUE10 = 309,
KW_TEXTURE = 310,
KW_TEXTURE1D = 311,
KW_TEXTURE1DARRAY = 312,
KW_TEXTURE2D = 313,
KW_TEXTURE2DARRAY = 314,
KW_TEXTURE2DMS = 315,
KW_TEXTURE2DMSARRAY = 316,
KW_TEXTURE3D = 317,
KW_TEXTURE3DARRAY = 318,
KW_TEXTURECUBE = 319,
KW_TRUE = 320,
KW_TYPEDEF = 321,
KW_UNIFORM = 322,
KW_VECTOR = 323,
KW_VERTEXSHADER = 324,
KW_VOID = 325,
KW_VOLATILE = 326,
KW_WHILE = 327,
OP_INC = 328,
OP_DEC = 329,
OP_AND = 330,
OP_OR = 331,
OP_EQ = 332,
OP_LEFTSHIFT = 333,
OP_LEFTSHIFTASSIGN = 334,
OP_RIGHTSHIFT = 335,
OP_RIGHTSHIFTASSIGN = 336,
OP_ELLIPSIS = 337,
OP_LE = 338,
OP_GE = 339,
OP_NE = 340,
OP_ADDASSIGN = 341,
OP_SUBASSIGN = 342,
OP_MULASSIGN = 343,
OP_DIVASSIGN = 344,
OP_MODASSIGN = 345,
OP_ANDASSIGN = 346,
OP_ORASSIGN = 347,
OP_XORASSIGN = 348,
OP_UNKNOWN1 = 349,
OP_UNKNOWN2 = 350,
OP_UNKNOWN3 = 351,
OP_UNKNOWN4 = 352,
PRE_LINE = 353,
VAR_IDENTIFIER = 354,
TYPE_IDENTIFIER = 355,
NEW_IDENTIFIER = 356,
STRING = 357,
C_FLOAT = 358,
C_INTEGER = 359
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{ {
#line 866 "hlsl.y" /* yacc.c:1909 */
/* Line 2068 of yacc.c */
#line 841 "hlsl.y"
struct hlsl_type *type; struct hlsl_type *type;
INT intval; INT intval;
@ -167,30 +173,29 @@ typedef union YYSTYPE
enum parse_unary_op unary_op; enum parse_unary_op unary_op;
enum parse_assign_op assign_op; enum parse_assign_op assign_op;
#line 177 "hlsl.tab.h" /* yacc.c:1909 */
};
/* Line 2068 of yacc.c */
#line 174 "hlsl.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
extern YYSTYPE hlsl_lval; /* Location type. */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE typedef struct YYLTYPE YYLTYPE;
struct YYLTYPE
{ {
int first_line; int first_line;
int first_column; int first_column;
int last_line; int last_line;
int last_column; int last_column;
} YYLTYPE; };
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1 # define YYLTYPE_IS_TRIVIAL 1
#endif #endif
extern YYLTYPE hlsl_lloc;
extern YYSTYPE hlsl_lval;
extern YYLTYPE hlsl_lloc;
int hlsl_parse (void);
#endif /* !YY_HLSL_HLSL_TAB_H_INCLUDED */

View file

@ -46,7 +46,7 @@ void hlsl_message(const char *fmt, ...)
static const char *hlsl_get_error_level_name(enum hlsl_error_level level) static const char *hlsl_get_error_level_name(enum hlsl_error_level level)
{ {
const char *names[] = static const char * const names[] =
{ {
"error", "error",
"warning", "warning",
@ -199,7 +199,7 @@ static void declare_predefined_types(struct hlsl_scope *scope)
{ {
struct hlsl_type *type; struct hlsl_type *type;
unsigned int x, y, bt; unsigned int x, y, bt;
static const char *names[] = static const char * const names[] =
{ {
"float", "float",
"half", "half",
@ -808,6 +808,31 @@ static BOOL add_typedef(DWORD modifiers, struct hlsl_type *orig_type, struct lis
return TRUE; return TRUE;
} }
static BOOL add_func_parameter(struct list *list, struct parse_parameter *param, const struct source_location *loc)
{
struct hlsl_ir_var *decl = d3dcompiler_alloc(sizeof(*decl));
if (!decl)
{
ERR("Out of memory.\n");
return FALSE;
}
decl->node.type = HLSL_IR_VAR;
decl->node.data_type = param->type;
decl->node.loc = *loc;
decl->name = param->name;
decl->semantic = param->semantic;
decl->modifiers = param->modifiers;
if (!add_declaration(hlsl_ctx.cur_scope, decl, FALSE))
{
free_declaration(decl);
return FALSE;
}
list_add_tail(list, &decl->node.entry);
return TRUE;
}
static const struct hlsl_ir_function_decl *get_overloaded_func(struct wine_rb_tree *funcs, char *name, static const struct hlsl_ir_function_decl *get_overloaded_func(struct wine_rb_tree *funcs, char *name,
struct list *params, BOOL exact_signature) struct list *params, BOOL exact_signature)
{ {
@ -1400,7 +1425,6 @@ base_type: KW_VOID
{ {
struct hlsl_type *type; struct hlsl_type *type;
TRACE("Type %s.\n", $1);
type = get_type(hlsl_ctx.cur_scope, $1, TRUE); type = get_type(hlsl_ctx.cur_scope, $1, TRUE);
$$ = type; $$ = type;
d3dcompiler_free($1); d3dcompiler_free($1);
@ -1409,7 +1433,6 @@ base_type: KW_VOID
{ {
struct hlsl_type *type; struct hlsl_type *type;
TRACE("Struct type %s.\n", $2);
type = get_type(hlsl_ctx.cur_scope, $2, TRUE); type = get_type(hlsl_ctx.cur_scope, $2, TRUE);
if (type->type != HLSL_CLASS_STRUCT) if (type->type != HLSL_CLASS_STRUCT)
{ {
@ -1850,7 +1873,7 @@ postfix_expr: primary_expr
} }
operands[0] = $1; operands[0] = $1;
operands[1] = operands[2] = NULL; operands[1] = operands[2] = NULL;
$$ = &new_expr(HLSL_IR_BINOP_POSTINC, operands, &loc)->node; $$ = &new_expr(HLSL_IR_UNOP_POSTINC, operands, &loc)->node;
/* Post increment/decrement expressions are considered const */ /* Post increment/decrement expressions are considered const */
$$->data_type = clone_hlsl_type($$->data_type); $$->data_type = clone_hlsl_type($$->data_type);
$$->data_type->modifiers |= HLSL_MODIFIER_CONST; $$->data_type->modifiers |= HLSL_MODIFIER_CONST;
@ -1869,7 +1892,7 @@ postfix_expr: primary_expr
} }
operands[0] = $1; operands[0] = $1;
operands[1] = operands[2] = NULL; operands[1] = operands[2] = NULL;
$$ = &new_expr(HLSL_IR_BINOP_POSTDEC, operands, &loc)->node; $$ = &new_expr(HLSL_IR_UNOP_POSTDEC, operands, &loc)->node;
/* Post increment/decrement expressions are considered const */ /* Post increment/decrement expressions are considered const */
$$->data_type = clone_hlsl_type($$->data_type); $$->data_type = clone_hlsl_type($$->data_type);
$$->data_type->modifiers |= HLSL_MODIFIER_CONST; $$->data_type->modifiers |= HLSL_MODIFIER_CONST;
@ -2042,7 +2065,7 @@ unary_expr: postfix_expr
} }
operands[0] = $2; operands[0] = $2;
operands[1] = operands[2] = NULL; operands[1] = operands[2] = NULL;
$$ = &new_expr(HLSL_IR_BINOP_PREINC, operands, &loc)->node; $$ = &new_expr(HLSL_IR_UNOP_PREINC, operands, &loc)->node;
} }
| OP_DEC unary_expr | OP_DEC unary_expr
{ {
@ -2058,7 +2081,7 @@ unary_expr: postfix_expr
} }
operands[0] = $2; operands[0] = $2;
operands[1] = operands[2] = NULL; operands[1] = operands[2] = NULL;
$$ = &new_expr(HLSL_IR_BINOP_PREDEC, operands, &loc)->node; $$ = &new_expr(HLSL_IR_UNOP_PREDEC, operands, &loc)->node;
} }
| unary_op unary_expr | unary_op unary_expr
{ {

View file

@ -800,31 +800,6 @@ void free_declaration(struct hlsl_ir_var *decl)
d3dcompiler_free(decl); d3dcompiler_free(decl);
} }
BOOL add_func_parameter(struct list *list, struct parse_parameter *param, const struct source_location *loc)
{
struct hlsl_ir_var *decl = d3dcompiler_alloc(sizeof(*decl));
if (!decl)
{
ERR("Out of memory.\n");
return FALSE;
}
decl->node.type = HLSL_IR_VAR;
decl->node.data_type = param->type;
decl->node.loc = *loc;
decl->name = param->name;
decl->semantic = param->semantic;
decl->modifiers = param->modifiers;
if (!add_declaration(hlsl_ctx.cur_scope, decl, FALSE))
{
free_declaration(decl);
return FALSE;
}
list_add_tail(list, &decl->node.entry);
return TRUE;
}
struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class, struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class,
enum hlsl_base_type base_type, unsigned dimx, unsigned dimy) enum hlsl_base_type base_type, unsigned dimx, unsigned dimy)
{ {
@ -1969,7 +1944,7 @@ const char *debug_modifiers(DWORD modifiers)
static const char *debug_node_type(enum hlsl_ir_node_type type) static const char *debug_node_type(enum hlsl_ir_node_type type)
{ {
const char *names[] = static const char * const names[] =
{ {
"HLSL_IR_VAR", "HLSL_IR_VAR",
"HLSL_IR_ASSIGNMENT", "HLSL_IR_ASSIGNMENT",
@ -2075,7 +2050,7 @@ static void debug_dump_ir_constant(const struct hlsl_ir_constant *constant)
static const char *debug_expr_op(const struct hlsl_ir_expr *expr) static const char *debug_expr_op(const struct hlsl_ir_expr *expr)
{ {
static const char *op_names[] = static const char * const op_names[] =
{ {
"~", "~",
"!", "!",

View file

@ -30,7 +30,7 @@ The following libraries are shared with Wine.
reactos/dll/directx/wine/amstream # Synced to Wine-1.7.27 reactos/dll/directx/wine/amstream # Synced to Wine-1.7.27
reactos/dll/directx/wine/d3d8 # Synced to Wine-1.7.27 reactos/dll/directx/wine/d3d8 # Synced to Wine-1.7.27
reactos/dll/directx/wine/d3d9 # Synced to Wine-1.7.27 reactos/dll/directx/wine/d3d9 # Synced to Wine-1.7.27
reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-1.7.17 reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-1.7.27
reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-1.7.17 reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-1.7.17
reactos/dll/directx/wine/d3dxof # Synced to Wine-1.7.17 reactos/dll/directx/wine/d3dxof # Synced to Wine-1.7.17
reactos/dll/directx/wine/ddraw # Synced to Wine-1.7.27 reactos/dll/directx/wine/ddraw # Synced to Wine-1.7.27