Commit Graph

64 Commits

Author SHA1 Message Date
Matteo Bruni 633ad47b29 d3dx9: Add a comment about a specific preshader parsing failure mode.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-21 10:14:10 +01:00
Paul Gofman dc96079784 d3dx9: Zero constantinfo_reserved on error in get_constants_desc().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-10 23:54:49 +01:00
Paul Gofman c48658dbb8 d3dx9: Dump bytecode if parameter evaluator creation failed.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-31 20:15:32 +02:00
Paul Gofman 14fab72269 d3dx9: Do not support preshader instructions which output multiple registers.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-31 20:15:32 +02:00
Paul Gofman 72b9265680 d3dx9: Get rid of constants modification bitmasks.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-30 08:17:39 +02:00
Paul Gofman c579a81a63 d3dx9: Factor out set_constants_device() function.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-29 15:51:28 +02:00
Paul Gofman d6f36ca18f d3dx9: Avoid an extra indirection in is_const_tab_input_dirty().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-04 09:28:41 +02:00
Matteo Bruni 88abcf3a1d d3dx9: Get rid of a forward declaration.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:34 +02:00
Paul Gofman 315e87e172 d3dx9: Fix potential memory leak on HeapReAlloc() failure in get_constants_desc().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:34 +02:00
Paul Gofman 4b11a99108 d3dx9: Support skip_constants parameter for effect.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:34 +02:00
Paul Gofman 6498a03a8e d3dx9: Introduce d3dx_shader_get_ctab_constant() function and use it instead of ID3DXConstantTableImpl_GetConstantDesc().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:34 +02:00
Paul Gofman 518b2f27cf d3dx9: Fail effect creation when parameter evaluator creation fails.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:34 +02:00
Paul Gofman 35f82ba444 d3dx9: Get rid of init_set_constants() function.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 22:41:04 +02:00
Paul Gofman 9fc4e4a1a9 d3dx9: Simplify init and cleanup in get_constants_desc().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 22:41:01 +02:00
Paul Gofman a7ea12c943 d3dx9: Check type and register count for sampler constants.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 20:26:25 +02:00
Paul Gofman 08df007e80 d3dx9: Move transpose 'if' outside of the inner loop in set_constants().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-27 23:46:23 +02:00
Paul Gofman 0029128464 d3dx9: Get rid of constant's length checking for matrix in set_constants().
When count in const_upload_info is calculated precisely (considering actual
constant set length), boolean matrix setting fall in direct copy path, unless
transpose is required. The case of incomplete last row for matrix should be
handled in set_constants() for transposed boolean constant only.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-27 23:46:20 +02:00
Paul Gofman ed7e27ad8d d3dx9: Remove redundant parameter size check in set_constants().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-27 23:46:18 +02:00
Matteo Bruni bd7a12b23c d3dx9: Make the assert() in regstore_set_values() a bit more strict.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-21 23:21:16 +02:00
Paul Gofman 95a49bdce6 d3dx9: Add scalar and vector setting path to set_constants().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-16 18:10:45 +02:00
Paul Gofman f48d38e5ac d3dx9: Avoid casting each value separately in set_constants().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-16 18:10:42 +02:00
Paul Gofman 607ae76ada d3dx9: Add const qualifier to regstore_set_values() input data.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-14 08:17:25 +02:00
Paul Gofman 45b0add678 d3dx9: Introduce get_reg_components() helper function and use it instead of get_offset_reg() when appropriate.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-14 08:17:23 +02:00
Francois Gouget aacf28d701 d3dx9_36: Add a trailing '\n' to a FIXME() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:48:31 +02:00
Paul Gofman 68e6691a5b d3dx9: Remove redundant FIXME in set_constants().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:48:25 +02:00
Paul Gofman ef22e6f0da d3dx9: Limit constant size by register count instead of table size.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:48:11 +02:00
Paul Gofman 730832d2d8 d3dx9: Merge constant setting for child parameters when possible.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:37:07 +02:00
Paul Gofman 4c7653ef5d d3dx9: Don't add const setting entries with zero count.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:37:03 +02:00
Paul Gofman 1816d8a9fa d3dx9: Precompute and store a constant direct copy flag.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:36:59 +02:00
Paul Gofman 6cefc5fa6c d3dx9: Factor out table_type_from_param_type() function.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:36:58 +02:00
Paul Gofman 09e089cc66 d3dx9: Factor out get_const_upload_info() function.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:36:56 +02:00
Paul Gofman 2f72e9669f d3dx9: Get rid of table lookup for converting between register indexes and offsets.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:12:57 +02:00
Paul Gofman f03de9ac4c d3dx9: Fix NAN handling in 'cmp' preshader opcode.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:38 +02:00
Paul Gofman cd62062673 d3dx9: Add 'div' preshader opcode.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:29 +02:00
Paul Gofman 2f47898953 d3dx9: Add 'atan2' preshader opcode.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:27 +02:00
Paul Gofman 89043af09f d3dx9: Add 'atan' preshader opcode.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:25 +02:00
Paul Gofman 537390ed8d d3dx9: Add 'acos' preshader opcode.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:23 +02:00
Paul Gofman 5d887de728 d3dx9: Add 'asin' preshader opcode.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:21 +02:00
Paul Gofman 53bf72e266 d3dx9: Loop through input parameters in is_const_tab_input_dirty().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 19:56:40 +02:00
Paul Gofman 5e87656ec3 d3dx9: Avoid redundant constant tables updates.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 19:56:40 +02:00
Paul Gofman b5784f926c d3dx9: Factor out regstore_set_modified_reg() function.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 19:56:39 +02:00
Paul Gofman 454a2c5c21 d3dx9: Match native out of bounds array selector index handling.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 19:56:39 +02:00
Paul Gofman a179584844 d3dx9: Use versioned parameter updates instead of 'dirty' flags.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 19:47:26 +02:00
Alexandre Julliard d321cdcd28 d3dx9: Check for missing log2 function.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-17 21:57:13 +02:00
Paul Gofman 651e8bfaee d3dx9: Add 'log' preshader opcode.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-11 10:17:50 -05:00
Paul Gofman 6a06baee60 d3dx9: Sort preshader opcode table.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-11 10:17:50 -05:00
Paul Gofman b4cac62546 d3dx9: Set reg_component_count to 4 for immediate constants.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-28 09:14:39 +02:00
Paul Gofman 30bc3bab30 d3dx9: Return an error for out of bounds input register in parse_preshader().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-28 09:14:16 +02:00
Paul Gofman 905421351f d3dx9: Fix register index for the scalar op case in parse_preshader().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-28 09:11:19 +02:00
Paul Gofman d6ab655a09 d3dx9: Support effect state manager.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-10 22:12:44 +02:00