[D3DCOMPILER_43] Fix a MSVC-x64 warning about dxbc_init() (#1173)
[reactos.git] / dll / directx / wine / d3dcompiler_43 / d3dcompiler_private.h
index 0e887d0..68ff962 100644 (file)
 #ifndef __WINE_D3DCOMPILER_PRIVATE_H
 #define __WINE_D3DCOMPILER_PRIVATE_H
 
-#include <config.h>
-#include <wine/port.h>
-
-#include <assert.h>
-#include <stdio.h>
+#include "wine/debug.h"
+#include "wine/list.h"
+#include "wine/rbtree.h"
 
 #define COBJMACROS
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
-#include <d3dcompiler.h>
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
 
-#include <wine/debug.h>
-#include <wine/list.h>
-#include <wine/rbtree.h>
+#include "d3dcompiler.h"
+
+#include <assert.h>
 
 /*
  * This doesn't belong here, but for some functions it is possible to return that value,
@@ -535,8 +532,8 @@ enum bwritershader_param_srcmod_type
     BWRITERSPSM_NOT,
 };
 
-#define BWRITER_SM1_VS  0xfffe
-#define BWRITER_SM1_PS  0xffff
+#define BWRITER_SM1_VS  0xfffeu
+#define BWRITER_SM1_PS  0xffffu
 
 #define BWRITERPS_VERSION(major, minor) ((BWRITER_SM1_PS << 16) | ((major) << 8) | (minor))
 #define BWRITERVS_VERSION(major, minor) ((BWRITER_SM1_VS << 16) | ((major) << 8) | (minor))
@@ -750,12 +747,19 @@ struct hlsl_ir_node
 
 #define HLSL_MODIFIERS_COMPARISON_MASK (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)
 
+struct reg_reservation
+{
+    enum bwritershader_param_register_type type;
+    DWORD regnum;
+};
+
 struct hlsl_ir_var
 {
     struct hlsl_ir_node node;
     const char *name;
     const char *semantic;
     unsigned int modifiers;
+    const struct reg_reservation *reg_reservation;
     struct list scope_entry;
 
     struct hlsl_var_allocation *allocation;
@@ -829,6 +833,11 @@ enum hlsl_ir_expr_op {
 
     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_SUB,
     HLSL_IR_BINOP_MUL,
@@ -859,11 +868,6 @@ enum hlsl_ir_expr_op {
 
     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_SEQUENCE,
@@ -964,9 +968,16 @@ struct parse_parameter
     struct hlsl_type *type;
     const char *name;
     const char *semantic;
+    const struct reg_reservation *reg_reservation;
     unsigned int modifiers;
 };
 
+struct parse_colon_attribute
+{
+    const char *semantic;
+    struct reg_reservation *reg_reservation;
+};
+
 struct parse_variable_def
 {
     struct list entry;
@@ -974,7 +985,8 @@ struct parse_variable_def
 
     char *name;
     unsigned int array_size;
-    char *semantic;
+    const char *semantic;
+    struct reg_reservation *reg_reservation;
     struct list *initializer;
 };
 
@@ -1109,8 +1121,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;
 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;
-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,
         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;
@@ -1204,7 +1214,7 @@ HRESULT dxbc_write_blob(struct dxbc *dxbc, ID3DBlob **blob) DECLSPEC_HIDDEN;
 void dxbc_destroy(struct dxbc *dxbc) DECLSPEC_HIDDEN;
 HRESULT dxbc_parse(const char *data, SIZE_T data_size, struct dxbc *dxbc) DECLSPEC_HIDDEN;
 HRESULT dxbc_add_section(struct dxbc *dxbc, DWORD tag, const char *data, DWORD data_size) DECLSPEC_HIDDEN;
-HRESULT dxbc_init(struct dxbc *dxbc, DWORD count) DECLSPEC_HIDDEN;
+HRESULT dxbc_init(struct dxbc *dxbc, unsigned int size) DECLSPEC_HIDDEN;
 
 static inline void read_dword(const char **ptr, DWORD *d)
 {