ReactOS  0.4.14-dev-57-g333b8f1
d3dcompiler_private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Stefan Dösinger
3  * Copyright 2009 Matteo Bruni
4  * Copyright 2010 Rico Schüller
5  * Copyright 2012 Matteo Bruni for CodeWeavers
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #ifndef __WINE_D3DCOMPILER_PRIVATE_H
23 #define __WINE_D3DCOMPILER_PRIVATE_H
24 
25 #include "wine/debug.h"
26 #include "wine/list.h"
27 #include "wine/rbtree.h"
28 
29 #define COBJMACROS
30 #include "windef.h"
31 #include "winbase.h"
32 #include "objbase.h"
33 
34 #include "d3dcompiler.h"
35 
36 #include <assert.h>
37 
38 /*
39  * This doesn't belong here, but for some functions it is possible to return that value,
40  * see http://msdn.microsoft.com/en-us/library/bb205278%28v=VS.85%29.aspx
41  * The original definition is in D3DX10core.h.
42  */
43 #define D3DERR_INVALIDCALL 0x8876086c
44 
45 /* TRACE helper functions */
49 
51 {
55 };
56 
58 {
66 };
67 
68 struct constant {
70  union {
71  float f;
72  INT i;
75  } value[4];
76 };
77 
78 struct shader_reg {
83  union {
86  } u;
87 };
88 
89 struct instruction {
95  struct shader_reg dst;
96  struct shader_reg *src;
97  unsigned int num_srcs; /* For freeing the rel_regs */
101 };
102 
103 struct declaration {
109 };
110 
111 struct samplerdecl {
115 };
116 
117 #define INSTRARRAY_INITIAL_SIZE 8
120 
121  /* Shader version selected */
123 
124  /* Local constants. Every constant that is not defined below is loaded from
125  * the global constant set at shader runtime
126  */
127  struct constant **constF;
128  struct constant **constI;
129  struct constant **constB;
130  unsigned int num_cf, num_ci, num_cb;
131 
132  /* Declared input and output varyings */
134  unsigned int num_inputs, num_outputs;
136  unsigned int num_samplers;
137 
138  /* Are special pixel shader 3.0 registers declared? */
140 
141  /* Array of shader instructions - The shader code itself */
142  struct instruction **instr;
144 };
145 
146 static inline void *d3dcompiler_alloc(SIZE_T size)
147 {
149 }
150 
151 static inline void *d3dcompiler_realloc(void *ptr, SIZE_T size)
152 {
153  return HeapReAlloc(GetProcessHeap(), 0, ptr, size);
154 }
155 
156 static inline BOOL d3dcompiler_free(void *ptr)
157 {
158  return HeapFree(GetProcessHeap(), 0, ptr);
159 }
160 
161 static inline char *d3dcompiler_strdup(const char *string)
162 {
163  char *copy;
164  SIZE_T len;
165 
166  if (!string)
167  return NULL;
168 
169  len = strlen(string);
170  copy = d3dcompiler_alloc(len + 1);
171  if (copy)
172  memcpy(copy, string, len + 1);
173  return copy;
174 }
175 
176 struct asm_parser;
177 
178 /* This structure is only used in asmshader.y, but since the .l file accesses the semantic types
179  * too it has to know it as well
180  */
181 struct rel_reg {
187 };
188 
189 #define MAX_SRC_REGS 4
190 
191 struct src_regs {
193  unsigned int count;
194 };
195 
197  void (*constF)(struct asm_parser *This, DWORD reg, float x, float y, float z, float w);
200 
202  const struct shader_reg *dst);
203  void (*srcreg)(struct asm_parser *This, struct instruction *instr, int num,
204  const struct shader_reg *src);
205 
207  const struct shader_reg *predicate);
209 
211  const struct shader_reg *reg);
213  DWORD mod, const struct shader_reg *reg);
214  void (*dcl_sampler)(struct asm_parser *This, DWORD samptype, DWORD mod,
215  DWORD regnum, unsigned int line_no);
216 
217  void (*end)(struct asm_parser *This);
218 
220  enum bwriter_comparison_type comp, const struct shader_reg *dst,
221  const struct src_regs *srcs, int expectednsrcs);
222 };
223 
224 struct instruction *alloc_instr(unsigned int srcs) DECLSPEC_HIDDEN;
226 BOOL add_constF(struct bwriter_shader *shader, DWORD reg, float x, float y, float z, float w) DECLSPEC_HIDDEN;
230  DWORD mod, BOOL output, DWORD regnum, DWORD writemask, BOOL builtin) DECLSPEC_HIDDEN;
232 
233 #define MESSAGEBUFFER_INITIAL_SIZE 256
234 
236 {
240 };
241 
243 {
244  char *string;
245  unsigned int size;
246  unsigned int capacity;
247 };
248 
250 {
251  /* The function table of the parser implementation */
252  const struct asmparser_backend *funcs;
253 
254  /* Private data follows */
256  unsigned int m3x3pad_count;
257 
260  unsigned int line_no;
261 };
262 
263 extern struct asm_parser asm_ctx DECLSPEC_HIDDEN;
264 
278 
280 
281 #ifdef __GNUC__
282 #define PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args)))
283 #else
284 #define PRINTF_ATTR(fmt,args)
285 #endif
286 
288 void asmparser_message(struct asm_parser *ctx, const char *fmt, ...) PRINTF_ATTR(2,3) DECLSPEC_HIDDEN;
290 {
291  if (update == PARSE_ERR)
292  *current = PARSE_ERR;
293  else if (update == PARSE_WARN && *current == PARSE_SUCCESS)
294  *current = PARSE_WARN;
295 }
296 
297 /* A reasonable value as initial size */
298 #define BYTECODEBUFFER_INITIAL_SIZE 32
303  /* For tracking rare out of memory situations without passing
304  * return values around everywhere
305  */
307 };
308 
309 struct bc_writer; /* Predeclaration for use in vtable parameters */
310 
311 typedef void (*instr_writer)(struct bc_writer *This,
312  const struct instruction *instr,
313  struct bytecode_buffer *buffer);
314 
316  void (*header)(struct bc_writer *This, const struct bwriter_shader *shader,
317  struct bytecode_buffer *buffer);
318  void (*end)(struct bc_writer *This, const struct bwriter_shader *shader,
319  struct bytecode_buffer *buffer);
320  void (*srcreg)(struct bc_writer *This, const struct shader_reg *reg,
321  struct bytecode_buffer *buffer);
322  void (*dstreg)(struct bc_writer *This, const struct shader_reg *reg,
324  void (*opcode)(struct bc_writer *This, const struct instruction *instr,
325  DWORD token, struct bytecode_buffer *buffer);
326 
327  const struct instr_handler_table {
330  } *instructions;
331 };
332 
333 /* Bytecode writing stuff */
334 struct bc_writer {
335  const struct bytecode_backend *funcs;
336 
337  /* Avoid result checking */
339 
341 
342  /* Vertex shader varying mapping */
350 
351  /* Pixel shader specific members */
354 };
355 
356 /* Debug utility routines */
360 const char *debug_print_dstreg(const struct shader_reg *reg) DECLSPEC_HIDDEN;
361 const char *debug_print_srcreg(const struct shader_reg *reg) DECLSPEC_HIDDEN;
362 const char *debug_print_comp(DWORD comp) DECLSPEC_HIDDEN;
364 
365 /* Used to signal an incorrect swizzle/writemask */
366 #define SWIZZLE_ERR ~0U
367 
368 /* Enumerations and defines used in the bytecode writer intermediate
369  * representation. */
371 {
421 
456 
460 };
461 
463 {
482 };
483 
485 {
489 };
490 
491 #define BWRITERSP_WRITEMASK_0 0x1 /* .x r */
492 #define BWRITERSP_WRITEMASK_1 0x2 /* .y g */
493 #define BWRITERSP_WRITEMASK_2 0x4 /* .z b */
494 #define BWRITERSP_WRITEMASK_3 0x8 /* .w a */
495 #define BWRITERSP_WRITEMASK_ALL 0xf /* all */
496 
498 {
503 };
504 
506 {
512 };
513 
514 #define BWRITERSI_TEXLD_PROJECT 1
515 #define BWRITERSI_TEXLD_BIAS 2
516 
518 {
533 };
534 
535 #define BWRITER_SM1_VS 0xfffeu
536 #define BWRITER_SM1_PS 0xffffu
537 
538 #define BWRITERPS_VERSION(major, minor) ((BWRITER_SM1_PS << 16) | ((major) << 8) | (minor))
539 #define BWRITERVS_VERSION(major, minor) ((BWRITER_SM1_VS << 16) | ((major) << 8) | (minor))
540 
541 #define BWRITERVS_SWIZZLE_SHIFT 16
542 #define BWRITERVS_SWIZZLE_MASK (0xFF << BWRITERVS_SWIZZLE_SHIFT)
543 
544 #define BWRITERVS_X_X (0 << BWRITERVS_SWIZZLE_SHIFT)
545 #define BWRITERVS_X_Y (1 << BWRITERVS_SWIZZLE_SHIFT)
546 #define BWRITERVS_X_Z (2 << BWRITERVS_SWIZZLE_SHIFT)
547 #define BWRITERVS_X_W (3 << BWRITERVS_SWIZZLE_SHIFT)
548 
549 #define BWRITERVS_Y_X (0 << (BWRITERVS_SWIZZLE_SHIFT + 2))
550 #define BWRITERVS_Y_Y (1 << (BWRITERVS_SWIZZLE_SHIFT + 2))
551 #define BWRITERVS_Y_Z (2 << (BWRITERVS_SWIZZLE_SHIFT + 2))
552 #define BWRITERVS_Y_W (3 << (BWRITERVS_SWIZZLE_SHIFT + 2))
553 
554 #define BWRITERVS_Z_X (0 << (BWRITERVS_SWIZZLE_SHIFT + 4))
555 #define BWRITERVS_Z_Y (1 << (BWRITERVS_SWIZZLE_SHIFT + 4))
556 #define BWRITERVS_Z_Z (2 << (BWRITERVS_SWIZZLE_SHIFT + 4))
557 #define BWRITERVS_Z_W (3 << (BWRITERVS_SWIZZLE_SHIFT + 4))
558 
559 #define BWRITERVS_W_X (0 << (BWRITERVS_SWIZZLE_SHIFT + 6))
560 #define BWRITERVS_W_Y (1 << (BWRITERVS_SWIZZLE_SHIFT + 6))
561 #define BWRITERVS_W_Z (2 << (BWRITERVS_SWIZZLE_SHIFT + 6))
562 #define BWRITERVS_W_W (3 << (BWRITERVS_SWIZZLE_SHIFT + 6))
563 
564 #define BWRITERVS_NOSWIZZLE (BWRITERVS_X_X | BWRITERVS_Y_Y | BWRITERVS_Z_Z | BWRITERVS_W_W)
565 
566 #define BWRITERVS_SWIZZLE_X (BWRITERVS_X_X | BWRITERVS_Y_X | BWRITERVS_Z_X | BWRITERVS_W_X)
567 #define BWRITERVS_SWIZZLE_Y (BWRITERVS_X_Y | BWRITERVS_Y_Y | BWRITERVS_Z_Y | BWRITERVS_W_Y)
568 #define BWRITERVS_SWIZZLE_Z (BWRITERVS_X_Z | BWRITERVS_Y_Z | BWRITERVS_Z_Z | BWRITERVS_W_Z)
569 #define BWRITERVS_SWIZZLE_W (BWRITERVS_X_W | BWRITERVS_Y_W | BWRITERVS_Z_W | BWRITERVS_W_W)
570 
572 {
587 };
588 
589 /* ps 1.x texture registers mappings */
590 #define T0_REG 2
591 #define T1_REG 3
592 #define T2_REG 4
593 #define T3_REG 5
594 
595 struct bwriter_shader *SlAssembleShader(const char *text, char **messages) DECLSPEC_HIDDEN;
598 
599 /* The general IR structure is inspired by Mesa GLSL hir, even though the code
600  * ends up being quite different in practice. Anyway, here comes the relevant
601  * licensing information.
602  *
603  * Copyright © 2010 Intel Corporation
604  *
605  * Permission is hereby granted, free of charge, to any person obtaining a
606  * copy of this software and associated documentation files (the "Software"),
607  * to deal in the Software without restriction, including without limitation
608  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
609  * and/or sell copies of the Software, and to permit persons to whom the
610  * Software is furnished to do so, subject to the following conditions:
611  *
612  * The above copyright notice and this permission notice (including the next
613  * paragraph) shall be included in all copies or substantial portions of the
614  * Software.
615  *
616  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
617  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
618  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
619  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
620  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
621  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
622  * DEALINGS IN THE SOFTWARE.
623  */
624 
626 {
634 };
635 
637 {
651 };
652 
654 {
660 };
661 
663 {
666 };
667 
668 struct hlsl_type
669 {
670  struct list entry;
675  const char *name;
676  unsigned int modifiers;
677  unsigned int dimx;
678  unsigned int dimy;
679  union
680  {
681  struct list *elements;
682  struct
683  {
684  struct hlsl_type *type;
685  unsigned int elements_count;
686  } array;
687  } e;
688 };
689 
691 {
692  struct list entry;
693  struct hlsl_type *type;
694  const char *name;
695  const char *semantic;
697 };
698 
700 {
701  const char *file;
702  unsigned int line;
703  unsigned int col;
704 };
705 
707 {
719 };
720 
722 {
723  struct list entry;
726 
728 };
729 
730 #define HLSL_STORAGE_EXTERN 0x00000001
731 #define HLSL_STORAGE_NOINTERPOLATION 0x00000002
732 #define HLSL_MODIFIER_PRECISE 0x00000004
733 #define HLSL_STORAGE_SHARED 0x00000008
734 #define HLSL_STORAGE_GROUPSHARED 0x00000010
735 #define HLSL_STORAGE_STATIC 0x00000020
736 #define HLSL_STORAGE_UNIFORM 0x00000040
737 #define HLSL_STORAGE_VOLATILE 0x00000080
738 #define HLSL_MODIFIER_CONST 0x00000100
739 #define HLSL_MODIFIER_ROW_MAJOR 0x00000200
740 #define HLSL_MODIFIER_COLUMN_MAJOR 0x00000400
741 #define HLSL_MODIFIER_IN 0x00000800
742 #define HLSL_MODIFIER_OUT 0x00001000
743 
744 #define HLSL_TYPE_MODIFIERS_MASK (HLSL_MODIFIER_PRECISE | HLSL_STORAGE_VOLATILE | \
745  HLSL_MODIFIER_CONST | HLSL_MODIFIER_ROW_MAJOR | \
746  HLSL_MODIFIER_COLUMN_MAJOR)
747 
748 #define HLSL_MODIFIERS_COMPARISON_MASK (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)
749 
751 {
754 };
755 
757 {
759  const char *name;
760  const char *semantic;
761  unsigned int modifiers;
764 
765  struct hlsl_var_allocation *allocation;
766 };
767 
769 {
771  const char *name;
774 };
775 
777 {
781  const char *semantic;
782  struct list *parameters;
783  struct list *body;
784 };
785 
787 {
790  struct list *then_instrs;
791  struct list *else_instrs;
792 };
793 
795 {
797  /* loop condition is stored in the body (as "if (!condition) break;") */
798  struct list *body;
799 };
800 
802 {
804  struct hlsl_ir_node *lhs;
805  struct hlsl_ir_node *rhs;
806  unsigned char writemask;
807 };
808 
821 
823 
825 
828  HLSL_IR_UNOP_SIN_REDUCED, /* Reduced range [-pi, pi] */
829  HLSL_IR_UNOP_COS_REDUCED, /* Reduced range [-pi, pi] */
830 
833 
835 
840 
845 
847 
854 
857 
863 
868 
870 
872 
874 };
875 
877 {
880  struct hlsl_ir_node *operands[3];
882 };
883 
885 {
890 };
891 
893 {
897 };
898 
900 {
902  struct hlsl_ir_node *val;
904 };
905 
907 {
911 };
912 
914 {
917  union
918  {
919  struct hlsl_ir_var *var;
920  struct
921  {
924  } array;
925  struct
926  {
929  } record;
930  } v;
931 };
932 
934 {
936  union
937  {
938  union
939  {
940  unsigned u[16];
941  int i[16];
942  float f[16];
943  double d[16];
944  BOOL b[16];
945  } value;
948  } v;
949 };
950 
952 {
954  struct list *arguments;
955 };
956 
958 {
959  struct list entry;
960  struct list vars;
962  struct hlsl_scope *upper;
963 };
964 
965 /* Structures used only during parsing */
967 {
968  struct hlsl_type *type;
969  const char *name;
970  const char *semantic;
972  unsigned int modifiers;
973 };
974 
976 {
977  const char *semantic;
979 };
980 
982 {
983  struct list entry;
985 
986  char *name;
987  unsigned int array_size;
988  const char *semantic;
990  struct list *initializer;
991 };
992 
994 {
995  char *name;
997 };
998 
1000 {
1003 };
1004 
1006 {
1011 };
1012 
1014 {
1026 };
1027 
1029 {
1030  const char **source_files;
1031  unsigned int source_files_count;
1032  const char *source_file;
1033  unsigned int line_no;
1034  unsigned int column;
1037 
1040  struct list scopes;
1041 
1042  struct list types;
1044 
1046 };
1047 
1049 
1051 {
1055 };
1056 
1057 void hlsl_message(const char *fmt, ...) PRINTF_ATTR(1,2) DECLSPEC_HIDDEN;
1060 
1062 {
1063  assert(node->type == HLSL_IR_VAR);
1064  return CONTAINING_RECORD(node, struct hlsl_ir_var, node);
1065 }
1066 
1067 static inline struct hlsl_ir_expr *expr_from_node(const struct hlsl_ir_node *node)
1068 {
1069  assert(node->type == HLSL_IR_EXPR);
1070  return CONTAINING_RECORD(node, struct hlsl_ir_expr, node);
1071 }
1072 
1073 static inline struct hlsl_ir_deref *deref_from_node(const struct hlsl_ir_node *node)
1074 {
1075  assert(node->type == HLSL_IR_DEREF);
1076  return CONTAINING_RECORD(node, struct hlsl_ir_deref, node);
1077 }
1078 
1079 static inline struct hlsl_ir_constant *constant_from_node(const struct hlsl_ir_node *node)
1080 {
1081  assert(node->type == HLSL_IR_CONSTANT);
1082  return CONTAINING_RECORD(node, struct hlsl_ir_constant, node);
1083 }
1084 
1085 static inline struct hlsl_ir_jump *jump_from_node(const struct hlsl_ir_node *node)
1086 {
1087  assert(node->type == HLSL_IR_JUMP);
1088  return CONTAINING_RECORD(node, struct hlsl_ir_jump, node);
1089 }
1090 
1091 static inline struct hlsl_ir_assignment *assignment_from_node(const struct hlsl_ir_node *node)
1092 {
1093  assert(node->type == HLSL_IR_ASSIGNMENT);
1094  return CONTAINING_RECORD(node, struct hlsl_ir_assignment, node);
1095 }
1096 
1097 static inline struct hlsl_ir_swizzle *swizzle_from_node(const struct hlsl_ir_node *node)
1098 {
1099  assert(node->type == HLSL_IR_SWIZZLE);
1100  return CONTAINING_RECORD(node, struct hlsl_ir_swizzle, node);
1101 }
1102 
1103 static inline struct hlsl_ir_constructor *constructor_from_node(const struct hlsl_ir_node *node)
1104 {
1105  assert(node->type == HLSL_IR_CONSTRUCTOR);
1107 }
1108 
1109 static inline struct hlsl_ir_if *if_from_node(const struct hlsl_ir_node *node)
1110 {
1111  assert(node->type == HLSL_IR_IF);
1112  return CONTAINING_RECORD(node, struct hlsl_ir_if, node);
1113 }
1114 
1115 static inline struct hlsl_ir_loop *loop_from_node(const struct hlsl_ir_node *node)
1116 {
1117  assert(node->type == HLSL_IR_LOOP);
1118  return CONTAINING_RECORD(node, struct hlsl_ir_loop, node);
1119 }
1120 
1121 BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var) DECLSPEC_HIDDEN;
1122 struct hlsl_ir_var *get_variable(struct hlsl_scope *scope, const char *name) DECLSPEC_HIDDEN;
1123 void free_declaration(struct hlsl_ir_var *decl) DECLSPEC_HIDDEN;
1124 struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class,
1125  enum hlsl_base_type base_type, unsigned dimx, unsigned dimy) DECLSPEC_HIDDEN;
1126 struct hlsl_type *new_array_type(struct hlsl_type *basic_type, unsigned int array_size) DECLSPEC_HIDDEN;
1127 struct hlsl_type *clone_hlsl_type(struct hlsl_type *old) DECLSPEC_HIDDEN;
1128 struct hlsl_type *get_type(struct hlsl_scope *scope, const char *name, BOOL recursive) DECLSPEC_HIDDEN;
1129 BOOL find_function(const char *name) DECLSPEC_HIDDEN;
1130 unsigned int components_count_type(struct hlsl_type *type) DECLSPEC_HIDDEN;
1131 BOOL compare_hlsl_types(const struct hlsl_type *t1, const struct hlsl_type *t2) DECLSPEC_HIDDEN;
1134  struct source_location *loc) DECLSPEC_HIDDEN;
1135 struct hlsl_ir_expr *new_cast(struct hlsl_ir_node *node, struct hlsl_type *type,
1136  struct source_location *loc) DECLSPEC_HIDDEN;
1137 struct hlsl_ir_expr *hlsl_mul(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1138  struct source_location *loc) DECLSPEC_HIDDEN;
1139 struct hlsl_ir_expr *hlsl_div(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1140  struct source_location *loc) DECLSPEC_HIDDEN;
1141 struct hlsl_ir_expr *hlsl_mod(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1142  struct source_location *loc) DECLSPEC_HIDDEN;
1143 struct hlsl_ir_expr *hlsl_add(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1144  struct source_location *loc) DECLSPEC_HIDDEN;
1145 struct hlsl_ir_expr *hlsl_sub(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1146  struct source_location *loc) DECLSPEC_HIDDEN;
1147 struct hlsl_ir_expr *hlsl_lt(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1148  struct source_location *loc) DECLSPEC_HIDDEN;
1149 struct hlsl_ir_expr *hlsl_gt(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1150  struct source_location *loc) DECLSPEC_HIDDEN;
1151 struct hlsl_ir_expr *hlsl_le(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1152  struct source_location *loc) DECLSPEC_HIDDEN;
1153 struct hlsl_ir_expr *hlsl_ge(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1154  struct source_location *loc) DECLSPEC_HIDDEN;
1155 struct hlsl_ir_expr *hlsl_eq(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1156  struct source_location *loc) DECLSPEC_HIDDEN;
1157 struct hlsl_ir_expr *hlsl_ne(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2,
1158  struct source_location *loc) DECLSPEC_HIDDEN;
1161 struct hlsl_ir_node *make_assignment(struct hlsl_ir_node *left, enum parse_assign_op assign_op,
1162  DWORD writemask, struct hlsl_ir_node *right) DECLSPEC_HIDDEN;
1163 void push_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN;
1165 struct hlsl_ir_function_decl *new_func_decl(struct hlsl_type *return_type, struct list *parameters) DECLSPEC_HIDDEN;
1167 void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_function_decl *decl,
1168  BOOL intrinsic) DECLSPEC_HIDDEN;
1170  const char *entrypoint, char **messages) DECLSPEC_HIDDEN;
1171 
1172 const char *debug_hlsl_type(const struct hlsl_type *type) DECLSPEC_HIDDEN;
1173 const char *debug_modifiers(DWORD modifiers) DECLSPEC_HIDDEN;
1175 
1180 
1181 
1182 #define MAKE_TAG(ch0, ch1, ch2, ch3) \
1183  ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
1184  ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
1185 #define TAG_Aon9 MAKE_TAG('A', 'o', 'n', '9')
1186 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
1187 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
1188 #define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N')
1189 #define TAG_OSG5 MAKE_TAG('O', 'S', 'G', '5')
1190 #define TAG_PCSG MAKE_TAG('P', 'C', 'S', 'G')
1191 #define TAG_RDEF MAKE_TAG('R', 'D', 'E', 'F')
1192 #define TAG_SDBG MAKE_TAG('S', 'D', 'B', 'G')
1193 #define TAG_SHDR MAKE_TAG('S', 'H', 'D', 'R')
1194 #define TAG_SHEX MAKE_TAG('S', 'H', 'E', 'X')
1195 #define TAG_STAT MAKE_TAG('S', 'T', 'A', 'T')
1196 #define TAG_XNAP MAKE_TAG('X', 'N', 'A', 'P')
1197 #define TAG_XNAS MAKE_TAG('X', 'N', 'A', 'S')
1198 
1200 {
1202  const char *data;
1204 };
1205 
1206 struct dxbc
1207 {
1211 };
1212 
1214 void dxbc_destroy(struct dxbc *dxbc) DECLSPEC_HIDDEN;
1217 HRESULT dxbc_init(struct dxbc *dxbc, unsigned int size) DECLSPEC_HIDDEN;
1218 
1219 static inline void read_dword(const char **ptr, DWORD *d)
1220 {
1221  memcpy(d, *ptr, sizeof(*d));
1222  *ptr += sizeof(*d);
1223 }
1224 
1225 static inline void write_dword(char **ptr, DWORD d)
1226 {
1227  memcpy(*ptr, &d, sizeof(d));
1228  *ptr += sizeof(d);
1229 }
1230 
1231 void skip_dword_unknown(const char **ptr, unsigned int count) DECLSPEC_HIDDEN;
1232 
1233 #endif /* __WINE_D3DCOMPILER_PRIVATE_H */
BOOL record_sampler(struct bwriter_shader *shader, DWORD samptype, DWORD mod, DWORD regnum) DECLSPEC_HIDDEN
const char * semantic
struct wine_rb_entry entry
struct list * else_instrs
struct list * subexpressions
GLenum func
Definition: glext.h:6028
void SlDeleteShader(struct bwriter_shader *shader) DECLSPEC_HIDDEN
const char * debug_d3dcompiler_d3d_blob_part(D3D_BLOB_PART part) DECLSPEC_HIDDEN
Definition: utils.c:109
struct hlsl_scope * cur_scope
unsigned int dimx
const char * debug_print_opcode(DWORD opcode) DECLSPEC_HIDDEN
Definition: utils.c:419
void free_hlsl_type(struct hlsl_type *type) DECLSPEC_HIDDEN
Definition: utils.c:2278
bwritershader_param_register_type
GLint level
Definition: gl.h:1546
const char ** source_files
unsigned int num_samplers
unsigned int num_instrs
struct S2 s2
static void * d3dcompiler_realloc(void *ptr, SIZE_T size)
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
HRESULT dxbc_add_section(struct dxbc *dxbc, DWORD tag, const char *data, DWORD data_size) DECLSPEC_HIDDEN
Definition: utils.c:532
#define shift
Definition: input.c:1668
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
hlsl_base_type
hlsl_matrix_majority
static struct hlsl_ir_deref * deref_from_node(const struct hlsl_ir_node *node)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
HRESULT dxbc_init(struct dxbc *dxbc, unsigned int size) DECLSPEC_HIDDEN
Definition: utils.c:560
void(* dcl_input)(struct asm_parser *This, DWORD usage, DWORD num, DWORD mod, const struct shader_reg *reg)
const struct reg_reservation * reg_reservation
struct hlsl_ir_expr * hlsl_gt(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1447
struct hlsl_ir_expr * new_expr(enum hlsl_ir_expr_op op, struct hlsl_ir_node **operands, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1298
enum hlsl_type_class type
D3D_BLOB_PART
Definition: d3dcompiler.h:85
const char * debug_print_shift(DWORD shift) DECLSPEC_HIDDEN
Definition: utils.c:181
struct hlsl_ir_expr * hlsl_mod(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1395
unsigned int modifiers
void(* opcode)(struct bc_writer *This, const struct instruction *instr, DWORD token, struct bytecode_buffer *buffer)
Definition: image.c:133
hlsl_ir_jump_type
struct asm_parser asm_ctx
Definition: asmshader.tab.c:79
void(* instr_writer)(struct bc_writer *This, const struct instruction *instr, struct bytecode_buffer *buffer)
struct x86_inst instr
void push_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN
Definition: utils.c:1704
Definition: http.c:6587
struct source_location loc
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
const char * source_file
static void read_dword(const char **ptr, DWORD *d)
void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_function_decl *decl, BOOL intrinsic) DECLSPEC_HIDDEN
Definition: utils.c:2456
struct list vars
struct wine_rb_entry entry
struct hlsl_type * clone_hlsl_type(struct hlsl_type *old) DECLSPEC_HIDDEN
Definition: utils.c:932
const struct asmparser_backend * funcs
static struct hlsl_ir_if * if_from_node(const struct hlsl_ir_node *node)
struct constant ** constI
const WCHAR * text
Definition: package.c:1827
bwriter_comparison_type
HRESULT SlWriteBytecode(const struct bwriter_shader *shader, int dxversion, DWORD **result, DWORD *size) DECLSPEC_HIDDEN
GLuint GLuint GLsizei count
Definition: gl.h:1545
unsigned int components_count_type(struct hlsl_type *type) DECLSPEC_HIDDEN
Definition: utils.c:860
enum hlsl_sampler_dim sampler_dim
void free_instr(struct hlsl_ir_node *node) DECLSPEC_HIDDEN
Definition: utils.c:2395
enum hlsl_ir_node_type type
unsigned int num_outputs
static struct hlsl_ir_constructor * constructor_from_node(const struct hlsl_ir_node *node)
struct wine_rb_entry scope_entry
unsigned int num_inputs
static struct hlsl_ir_constant * constant_from_node(const struct hlsl_ir_node *node)
static struct hlsl_ir_assignment * assignment_from_node(const struct hlsl_ir_node *node)
enum hlsl_matrix_majority matrix_majority
static BOOL d3dcompiler_free(void *ptr)
static void write_dword(char **ptr, DWORD d)
struct hlsl_ir_node * return_value
D3D_FL9_3_MAX_TEXTURE_REPEAT enum _D3D_SHADER_VARIABLE_CLASS D3D_SHADER_VARIABLE_CLASS
enum _D3D_SHADER_VARIABLE_TYPE D3D_SHADER_VARIABLE_TYPE
#define MAX_SRC_REGS
static struct hlsl_ir_expr * expr_from_node(const struct hlsl_ir_node *node)
GLdouble GLdouble t
Definition: gl.h:2047
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
struct shader_reg predicate
struct hlsl_type * type
#define assert(x)
Definition: debug.h:53
Definition: ecma_167.h:138
void(* constF)(struct asm_parser *This, DWORD reg, float x, float y, float z, float w)
GLuint buffer
Definition: glext.h:5915
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
void debug_dump_ir_function_decl(const struct hlsl_ir_function_decl *func) DECLSPEC_HIDDEN
Definition: utils.c:2259
const char * debug_hlsl_type(const struct hlsl_type *type) DECLSPEC_HIDDEN
Definition: utils.c:1866
struct hlsl_ir_expr * hlsl_div(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1382
hlsl_error_level
struct samplerdecl * samplers
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
Definition: utils.c:809
GLuint GLuint end
Definition: gl.h:1545
unsigned int source_files_count
const char * filename
Definition: ioapi.h:135
void hlsl_message(const char *fmt,...) PRINTF_ATTR(1
union hlsl_ir_deref::@233 v
void hlsl_report_message(const char *filename, DWORD line, DWORD column, enum hlsl_error_level level, const char *fmt,...) PRINTF_ATTR(5
Definition: match.c:390
void create_vs10_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1349
void(* dstreg)(struct bc_writer *This, const struct shader_reg *reg, struct bytecode_buffer *buffer, DWORD shift, DWORD mod)
enum hlsl_ir_jump_type type
int32_t INT
Definition: typedefs.h:56
static struct hlsl_ir_swizzle * swizzle_from_node(const struct hlsl_ir_node *node)
void free_instr_list(struct list *list) DECLSPEC_HIDDEN
Definition: utils.c:2295
static void * d3dcompiler_alloc(SIZE_T size)
unsigned int instr_alloc_size
static UINT array_size
Definition: msctf.c:69
struct hlsl_ir_var * get_variable(struct hlsl_scope *scope, const char *name) DECLSPEC_HIDDEN
Definition: utils.c:787
void(* dcl_output)(struct asm_parser *This, DWORD usage, DWORD num, const struct shader_reg *reg)
struct hlsl_ir_constant * array_elements
unsigned int line_no
struct source_location loc
void create_ps2x_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1524
struct hlsl_ir_expr * hlsl_le(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1460
const char * debug_print_srcmod(DWORD mod) DECLSPEC_HIDDEN
Definition: utils.c:131
struct hlsl_type * type
unsigned int num_srcs
union hlsl_type::@231 e
struct hlsl_scope * globals
struct hlsl_ir_expr * hlsl_ge(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1473
BOOL add_constB(struct bwriter_shader *shader, DWORD reg, BOOL x) DECLSPEC_HIDDEN
void(* coissue)(struct asm_parser *This)
unsigned int BOOL
Definition: ntddk_ex.h:94
void asmparser_message(struct asm_parser *ctx, const char *fmt,...) PRINTF_ATTR(2
struct instruction * alloc_instr(unsigned int srcs) DECLSPEC_HIDDEN
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
static PVOID ptr
Definition: dispmode.c:27
struct bwriter_shader * parse_asm_shader(char **messages) DECLSPEC_HIDDEN
GLdouble GLdouble z
Definition: glext.h:5874
void free_function_rb(struct wine_rb_entry *entry, void *context) DECLSPEC_HIDDEN
Definition: utils.c:2451
void compilation_message(struct compilation_messages *msg, const char *fmt, va_list args) DECLSPEC_HIDDEN
Definition: utils.c:722
struct hlsl_ir_deref * new_record_deref(struct hlsl_ir_node *record, struct hlsl_struct_field *field) DECLSPEC_HIDDEN
Definition: utils.c:1528
bwriterdeclusage
DWORD additional_offset
struct hlsl_ir_node * condition
const char * debug_d3dcompiler_shader_variable_class(D3D_SHADER_VARIABLE_CLASS c) DECLSPEC_HIDDEN
Definition: utils.c:35
struct list * then_instrs
smooth NULL
Definition: ftsmooth.c:416
struct constant ** constF
Definition: parser.c:48
char * va_list
Definition: acmsvcex.h:78
#define inline
Definition: module.h:38
struct declaration * inputs
void(* constB)(struct asm_parser *This, DWORD reg, BOOL x)
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 hlsl_struct_field * field
struct bwriter_shader * SlAssembleShader(const char *text, char **messages) DECLSPEC_HIDDEN
void create_ps30_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1540
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct asm_parser asm_ctx DECLSPEC_HIDDEN
struct hlsl_scope * upper
struct hlsl_ir_node * index
struct hlsl_ir_node * operands[3]
static struct hlsl_ir_var * var_from_node(const struct hlsl_ir_node *node)
struct list entry
GLuint shader
Definition: glext.h:6030
struct dxbc_section * sections
union shader_reg::@230 u
hlsl_ir_node_type
GLfloat f
Definition: glext.h:7540
struct shader_reg reg[MAX_SRC_REGS]
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define PRINTF_ATTR(fmt, args)
struct shader_reg * src
GLsizeiptr size
Definition: glext.h:5919
static char * d3dcompiler_strdup(const char *string)
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define d
Definition: ke_i.h:81
void create_vs20_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1381
Definition: cmds.c:130
void create_ps12_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1460
Definition: parser.c:43
struct hlsl_ir_expr * hlsl_sub(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1421
LONG HRESULT
Definition: typedefs.h:77
enum bwriter_comparison_type comptype
HRESULT dxbc_parse(const char *data, SIZE_T data_size, struct dxbc *dxbc) DECLSPEC_HIDDEN
Definition: utils.c:580
struct S1 s1
hlsl_ir_expr_op
void create_ps10_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1428
struct hlsl_ir_expr * hlsl_add(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1408
struct hlsl_type * data_type
struct wine_rb_tree overloads
const struct reg_reservation * reg_reservation
BOOL add_constI(struct bwriter_shader *shader, DWORD reg, INT x, INT y, INT z, INT w) DECLSPEC_HIDDEN
const GLubyte * c
Definition: glext.h:8905
static struct __wine_debug_functions funcs
Definition: debug.c:59
struct hlsl_ir_expr * hlsl_ne(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1499
struct hlsl_type * type
void create_ps13_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1476
void create_vs11_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1365
unsigned long DWORD
Definition: ntddk_ex.h:95
struct constant ** constB
GLuint GLuint num
Definition: glext.h:9618
GLint left
Definition: glext.h:7726
struct hlsl_ir_function_decl * new_func_decl(struct hlsl_type *return_type, struct list *parameters) DECLSPEC_HIDDEN
Definition: utils.c:1732
BOOL compare_hlsl_types(const struct hlsl_type *t1, const struct hlsl_type *t2) DECLSPEC_HIDDEN
Definition: utils.c:886
struct shader_reg * rel_reg
const char * debug_print_srcreg(const struct shader_reg *reg) DECLSPEC_HIDDEN
Definition: utils.c:340
GLdouble GLdouble right
Definition: glext.h:10859
enum hlsl_base_type base_type
struct bwriter_shader * shader
void skip_dword_unknown(const char **ptr, unsigned int count) DECLSPEC_HIDDEN
Definition: utils.c:513
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
const char * debug_modifiers(DWORD modifiers) DECLSPEC_HIDDEN
Definition: utils.c:1893
const char * debug_d3dcompiler_shader_variable_type(D3D_SHADER_VARIABLE_TYPE t) DECLSPEC_HIDDEN
Definition: utils.c:53
const char * name
const struct bytecode_backend::instr_handler_table * instructions
BOOL pop_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN
Definition: utils.c:1721
struct list * elements
const char * debug_print_dstreg(const struct shader_reg *reg) DECLSPEC_HIDDEN
Definition: utils.c:333
HRESULT dxbc_write_blob(struct dxbc *dxbc, ID3DBlob **blob) DECLSPEC_HIDDEN
Definition: utils.c:658
struct hlsl_parse_ctx hlsl_ctx
Definition: hlsl.tab.c:87
int ret
bwritershader_instruction_opcode_type
BOOL compatible_data_types(struct hlsl_type *s1, struct hlsl_type *s2) DECLSPEC_HIDDEN
Definition: utils.c:1010
BOOL find_function(const char *name) DECLSPEC_HIDDEN
Definition: utils.c:855
struct list * body
union hlsl_ir_constant::@236 v
struct declaration * outputs
struct hlsl_ir_function_decl * decl
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
uint32_t entry
Definition: isohybrid.c:63
struct list * else_instrs
struct list scope_entry
bwritersampler_texture_type
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
void create_ps20_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1508
BOOL add_instruction(struct bwriter_shader *shader, struct instruction *instr) DECLSPEC_HIDDEN
Definition: _list.h:228
static void set_parse_status(enum parse_status *current, enum parse_status update)
BOOL record_declaration(struct bwriter_shader *shader, DWORD usage, DWORD usage_idx, DWORD mod, BOOL output, DWORD regnum, DWORD writemask, BOOL builtin) DECLSPEC_HIDDEN
struct list * struct_elements
GLenum src
Definition: glext.h:6340
unsigned int modifiers
void(* dstreg)(struct asm_parser *This, struct instruction *instr, const struct shader_reg *dst)
BYTE usage_idx
void free_declaration(struct hlsl_ir_var *decl) DECLSPEC_HIDDEN
Definition: utils.c:801
struct hlsl_ir_deref * new_var_deref(struct hlsl_ir_var *var) DECLSPEC_HIDDEN
Definition: utils.c:1512
hlsl_type_class
void(* srcreg)(struct asm_parser *This, struct instruction *instr, int num, const struct shader_reg *src)
struct hlsl_ir_node * val
void dxbc_destroy(struct dxbc *dxbc) DECLSPEC_HIDDEN
Definition: utils.c:651
enum hlsl_ir_expr_op op
void create_ps11_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1444
ULONG_PTR SIZE_T
Definition: typedefs.h:78
static struct hlsl_ir_jump * jump_from_node(const struct hlsl_ir_node *node)
enum hlsl_ir_deref_type type
struct hlsl_ir_var * var
BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var) DECLSPEC_HIDDEN
Definition: utils.c:764
unsigned int elements_count
void create_vs30_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1413
struct hlsl_ir_expr * new_cast(struct hlsl_ir_node *node, struct hlsl_type *type, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1355
DWORD oD_regnum[2]
void(* dcl_sampler)(struct asm_parser *This, DWORD samptype, DWORD mod, DWORD regnum, unsigned int line_no)
bwritershader_param_dstmod_type
Definition: rbtree.h:35
#define major(rdev)
Definition: propsheet.cpp:879
#define HeapReAlloc
Definition: compat.h:393
GLenum GLenum dst
Definition: glext.h:6340
struct list entry
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
void(* predicate)(struct asm_parser *This, const struct shader_reg *predicate)
struct instruction ** instr
BOOL add_constF(struct bwriter_shader *shader, DWORD reg, float x, float y, float z, float w) DECLSPEC_HIDDEN
unsigned int UINT
Definition: ndis.h:50
struct reg_reservation * reg_reservation
DWORD oT_regnum[8]
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
static int reg
Definition: i386-dis.c:1275
struct list * then_instrs
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
void create_ps14_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1492
struct wine_rb_tree functions
struct hlsl_type::@231::@232 array
bwritervs_rastout_offsets
void(* srcreg)(struct bc_writer *This, const struct shader_reg *reg, struct bytecode_buffer *buffer)
#define msg(x)
Definition: auth_time.c:54
Definition: import.c:86
void init_functions_tree(struct wine_rb_tree *funcs) DECLSPEC_HIDDEN
Definition: utils.c:1833
Definition: name.c:36
struct hlsl_ir_node * rhs
enum shader_type type
union hlsl_ir_constant::@236::@237 value
struct hlsl_ir_node * lhs
struct hlsl_ir_expr * hlsl_mul(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1369
struct reg_reservation * reg_reservation
struct hlsl_ir_node * make_assignment(struct hlsl_ir_node *left, enum parse_assign_op assign_op, DWORD writemask, struct hlsl_ir_node *right) DECLSPEC_HIDDEN
Definition: utils.c:1568
#define const
Definition: zconf.h:230
#define minor(rdev)
Definition: propsheet.cpp:880
struct hlsl_type * get_type(struct hlsl_scope *scope, const char *name, BOOL recursive) DECLSPEC_HIDDEN
Definition: utils.c:844
hlsl_sampler_dim
unsigned int modifiers
void(* constI)(struct asm_parser *This, DWORD reg, INT x, INT y, INT z, INT w)
const char * debug_print_comp(DWORD comp) DECLSPEC_HIDDEN
Definition: utils.c:404
enum parse_status status
void create_vs2x_parser(struct asm_parser *ret) DECLSPEC_HIDDEN
Definition: asmparser.c:1397
struct hlsl_ir_expr * hlsl_eq(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1486
UINT op
Definition: effect.c:223
struct hlsl_ir_node * array
const char * name
struct bwriter_shader * parse_hlsl_shader(const char *text, enum shader_type type, DWORD major, DWORD minor, const char *entrypoint, char **messages) DECLSPEC_HIDDEN
Definition: hlsl.yy.c:2927
enum bwritershader_param_register_type type
unsigned int m3x3pad_count
struct hlsl_ir_expr * hlsl_lt(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, struct source_location *loc) DECLSPEC_HIDDEN
Definition: utils.c:1434
struct hlsl_var_allocation * allocation
void(* header)(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer)
struct hlsl_type * new_array_type(struct hlsl_type *basic_type, unsigned int array_size) DECLSPEC_HIDDEN
Definition: utils.c:831
static struct hlsl_ir_loop * loop_from_node(const struct hlsl_ir_node *node)
GLuint64EXT * result
Definition: glext.h:11304
struct hlsl_ir_function * func
const char * debug_print_dstmod(DWORD mod) DECLSPEC_HIDDEN
Definition: utils.c:156
struct hlsl_ir_node * record
Definition: dsound.c:943
#define HeapFree(x, y, z)
Definition: compat.h:394
hlsl_ir_deref_type
const struct bytecode_backend * funcs
enum parse_status status
bwritershader_param_srcmod_type
struct task_struct * current
Definition: linux.c:32
unsigned int count
unsigned int dimy
static int mod
Definition: i386-dis.c:1273
Definition: dlist.c:348