Commit Graph

128 Commits

Author SHA1 Message Date
Zebediah Figura bf31a900d1 d3dcompiler: Get rid of the "node" field from struct hlsl_ir_var.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-14 17:41:01 +02:00
Zebediah Figura 32fd9ff479 d3dcompiler: Get rid of the "node" field from struct hlsl_ir_function_decl.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-14 17:41:01 +02:00
Zebediah Figura cf5ccf29a9 d3dcompiler: Introduce a new_binary_expr() helper.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 01:26:41 +02:00
Zebediah Figura b899965615 d3dcompiler: Introduce a new_unary_expr() helper.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 01:26:41 +02:00
Zebediah Figura b89f027bc1 d3dcompiler: Use new_cast() in implicit_conversion().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 01:26:41 +02:00
Zebediah Figura c22f64bceb d3dcompiler: Store the arguments to a hlsl_ir_constructor as a fixed array.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 20:38:28 +02:00
Alexandre Julliard c8d34ef088 d3dcompiler: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 14:59:40 +02:00
Serge Gautherie ffe9346120 d3dcompiler: Fix dxbc_init() function prototype.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-20 15:34:01 +01:00
Matteo Bruni e9231beb86 d3dcompiler: Add an assert checking for writemask sanity in debug_writemask().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 23:28:59 +01:00
Alex Henrie 358b814873 d3dcompiler: Turn variable 'components' into a static constant.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 21:41:33 +01:00
Alex Henrie cbae62ba9e d3dcompiler_43: Turn variable 'c' into a static constant.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-12 10:21:52 +01:00
Matteo Bruni 4d1c8a8bff d3dcompiler: Make types array static const.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Michael Stefaniuc c91a00ce61 d3dcompiler: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:39:39 +02:00
Jacek Caban d29e59a145 rbtree.h: Take wine_rb_entry as wine_rb_remove argument type and add new wine_rb_remove_key helper using key.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-14 00:01:53 +09:00
Jacek Caban acc0bb0521 rbtree.h: Pass compare function instead of wine_rb_functions to wine_rb_init.
Also change return type to void since the function can no longer fail.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-02 23:30:29 +09:00
Jacek Caban 907854d4a2 d3dcompiler_43: Removed no longer needed wine_rb_init error handling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-02 11:26:45 +09:00
Matteo Bruni bd7e83f292 d3dcompiler: Parse ": register()" syntax. 2015-06-19 19:11:03 +09:00
Matteo Bruni 5ae37d47f1 d3dcompiler: Handle writemask in make_assignment(). 2015-06-19 19:11:01 +09:00
Matteo Bruni 10fcb9379e d3dcompiler: Handle redefining an intrinsic function as a user-defined function. 2015-06-19 19:10:59 +09:00
Henri Verbeet bef432a19c d3dcompiler: Rename "func" to "decl" in free_function_decl().
Mostly just for consistency with other uses of struct hlsl_ir_function_decl.
2015-05-01 15:17:15 +09:00
Henri Verbeet c05acba168 d3dcompiler: Actually free the function in free_function() (Valgrind). 2015-05-01 15:17:11 +09:00
Matteo Bruni a02f76637d d3dcompiler: Fix tracing of expression operators.
This hunk should have been in d25486fba4.
2014-10-16 21:23:41 +09:00
Matteo Bruni c37714342e d3dcompiler: add_func_parameter is only used in hlsl.y. 2014-05-02 17:15:09 +02:00
Henri Verbeet ffc01ec648 d3dcompiler: Make some string arrays const. 2014-05-02 13:45:43 +02:00
Henri Verbeet aab72562d5 d3dcompiler: Get rid of a couple of redundant casts. 2013-09-04 11:37:09 +02:00
André Hentschel 3abc425267 d3dcompiler_43: Free assignment on error (coverity). 2012-10-26 11:48:12 +02:00
Francois Gouget 25c465269c d3dcompiler_43: Make free_function{_decl}() static. 2012-10-15 19:37:29 +02:00
Matteo Bruni 69922c671a d3dcompiler: Add some checks to function definitions. 2012-10-11 21:24:34 +02:00
Matteo Bruni 6897f9aa35 d3dcompiler: Properly support function overloads. 2012-10-11 21:24:34 +02:00
Matteo Bruni 426b5b3609 d3dcompiler: Avoid "naked" vars in record dereferences. 2012-10-11 21:24:34 +02:00
Matteo Bruni f10e0d4e9e d3dcompiler: Fix freeing function. 2012-09-28 17:52:52 +02:00
Matteo Bruni 16360a4f18 d3dcompiler: Handle simple struct initializers. 2012-09-27 13:09:05 +02:00
Matteo Bruni 9cbd80bda1 d3dcompiler: Store the pointer to the struct field in the dereference node. 2012-09-27 13:08:58 +02:00
Matteo Bruni f2d2755eef d3dcompiler: Also free the list itself in free_instr_list(). 2012-09-27 13:08:54 +02:00
Francois Gouget 919db661e5 d3dcompiler_43: Make compare_hlsl_types_rb() static. 2012-09-24 16:38:16 +02:00
Matteo Bruni 76525af7f1 d3dcompiler: Allow casts to arrays. 2012-09-21 18:29:26 +02:00
Francois Gouget 0c9ee6663f d3dcompiler_43: Remove an unwanted trailing '\n' in debug_dump_instr(). 2012-09-20 00:01:06 +02:00
Matteo Bruni ca701b7d69 d3dcompiler: Parse casts. 2012-09-19 23:54:25 +02:00
Matteo Bruni 8f60f8f34b d3dcompiler: Store data types in a RB tree for faster search. 2012-09-19 23:54:07 +02:00
Matteo Bruni 79c6ce0a0f d3dcompiler: Parse "if/else" statement. 2012-09-19 23:54:04 +02:00
Matteo Bruni ae11ba0b23 d3dcompiler: Parse "return" statement. 2012-09-18 19:05:44 +02:00
Matteo Bruni 47e931823c d3dcompiler: Only a few modifiers are relevant in type comparison. 2012-09-18 19:05:36 +02:00
Matteo Bruni e7a9218ef1 d3dcompiler: Declare predefined data types. 2012-09-18 19:05:22 +02:00
Matteo Bruni 237558f649 d3dcompiler: Postincrement/decrement expressions are const.
Also check for const expressions used as l-values.
2012-09-17 18:31:58 +02:00
Matteo Bruni 7cce71a0c3 d3dcompiler: Parse swizzles. 2012-09-17 18:31:48 +02:00
Francois Gouget 3dd26315a4 d3dcompiler_43: Make debug_dump_ir_expr() static. 2012-07-25 16:11:17 +02:00
Francois Gouget 285b9340f1 d3dcompiler_43: Make some functions static. 2012-07-23 19:53:50 +02:00
Francois Gouget 28e06e3fb0 d3dcompiler_43: Add a trailing '\n' to a couple of Wine traces. 2012-07-23 19:53:49 +02:00
Matteo Bruni 1a36da15af d3dcompiler: Parse assignments. 2012-07-20 21:30:07 +02:00
Matteo Bruni 6c92d78c8c d3dcompiler: Parse relational operators, stub out more rules. 2012-07-18 17:15:24 +02:00
Matteo Bruni 57a7479f77 d3dcompiler: Parse multiplicative expressions. 2012-07-18 17:15:24 +02:00
Matteo Bruni 27880abb97 d3dcompiler: Implement basic expressions parsing. 2012-07-17 11:55:20 +02:00
Matteo Bruni 7ebab8c4f7 d3dcompiler: Pass the complete location to add_func_parameter(). 2012-07-17 11:55:19 +02:00
Matteo Bruni 5bcf8de8cf d3dcompiler: Introduce source_location structure. 2012-07-12 11:47:47 -05:00
Matteo Bruni 4a01368809 d3dcompiler: Improve debug_hlsl_type function. 2012-07-11 11:18:04 -05:00
Matteo Bruni 995fb30d58 d3dcompiler: Add a trace to the scope push/pop functions. 2012-07-11 11:17:57 -05:00
Marcus Meissner 1f1686fddd d3dcompiler_43: Fixed small overread possibility (Coverity). 2012-07-09 10:07:10 -04:00
Francois Gouget 768c38034c d3dcompiler_43: Make debug_dump_ir_constructor() static. 2012-06-13 21:35:41 +02:00
Matteo Bruni eeb550c0c3 d3dcompiler: Parse constructors. 2012-06-12 10:20:35 +02:00
Matteo Bruni d2673848ea d3dcompiler: Parse function definitions. 2012-06-12 10:20:32 +02:00
Matteo Bruni 552f10d0e8 d3dcompiler: Parse function declarations. 2012-06-12 10:20:30 +02:00
Matteo Bruni 5e34375238 d3dcompiler: Parse sampler declarations. 2012-06-12 10:20:27 +02:00
Francois Gouget b0a339707f d3dcompiler_43: Make debug_{base,node}_type() static. 2012-06-08 19:35:17 +02:00
Matteo Bruni 96470dfcb4 d3dcompiler: Parse variable references in expressions. 2012-06-07 10:32:46 +02:00
Matteo Bruni 887ef49419 d3dcompiler: Parse variable initializers, basic expressions. 2012-06-07 10:32:41 +02:00
Matteo Bruni 3275cca970 d3dcompiler: Parse modifiers. 2012-06-07 10:32:36 +02:00
Matteo Bruni 9d9dae0cdb d3dcompiler: Distinguish between scalars, vectors and matrices. 2012-06-07 10:32:31 +02:00
Matteo Bruni 2aa6c460f7 d3dcompiler: Parse variable declarations. 2012-06-05 10:20:20 +02:00
Matteo Bruni 2ad2c5fa01 d3dcompiler: Add identifiers parsing. 2012-06-05 10:20:17 +02:00
Matteo Bruni 47a7f7f13d d3dcompiler: Trace compilation messages. 2012-05-16 16:45:10 +02:00
Matteo Bruni 491d0e9d6b d3dcompiler: Rename asm_alloc/realloc/free functions to more generic names. 2012-05-08 20:21:18 +02:00
Matteo Bruni e2866d6fa1 d3dcompiler: Generalize message reporting function. 2012-05-08 20:21:13 +02:00
Francois Gouget 4d29b9716e d3dcompiler_43: Make write_dword_unknown() static. 2011-05-03 14:38:06 +02:00
Rico Schüller 7832577ad7 d3dcompiler: Add debug helper for shader variable type. 2011-03-04 16:25:58 +01:00
Rico Schüller 525dee0778 d3dcompiler: Add debug helper for shader variable class. 2011-03-04 16:25:58 +01:00
Amine Khaldi b6990fa77a d3dcompiler_43: Avoid an unintended fall-through. 2011-02-23 19:24:05 +01:00
Henri Verbeet a141ea4933 d3dcompiler: Merge asmutils.c into utils.c. 2010-10-18 19:08:38 +02:00
Rico Schüller ec698dea66 d3dcompiler: Implement D3DGetBlobPart(). 2010-10-07 15:58:11 +02:00