Commit Graph

1408 Commits

Author SHA1 Message Date
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 57de7e9919 d3dx9: Factor out is_parameter_used() 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:40:58 +02:00
Paul Gofman ec7e766635 d3dx9/tests: Add test for skip_constants effect parameter.
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:40:55 +02:00
Michael Stefaniuc 041a0ff1c0 d3dx9/tests: Use string concatenation for a multiline string.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 22:40:39 +02:00
Paul Gofman 4e2c044412 d3dx9/tests: Add tests for array of samplers.
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:29 +02:00
Paul Gofman 8f9bbdf9ad d3dx9: Support arrays of samplers.
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:27 +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
Paul Gofman 5cbc84e51e d3dx9/tests: Modify transpose boolean matrix test to reproduce the case of incomplete last row.
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-21 23:21:17 +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
Matteo Bruni df07533a80 d3dx9/tests: Avoid SIZE_T in traces.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-12 12:02:52 +02:00
Matteo Bruni 82029cba2f d3dx9/tests: Add a comment about the negation in boolean constant checks.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-12 12:02:41 +02:00
Matteo Bruni 26175489ba d3dx9/tests: Fix compilation when the NAN macro is not available.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-12 12:02:24 +02:00
Matteo Bruni 4569cbe8e9 d3dx9: Move set_number() into d3dx9_private.h.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-12 12:02:22 +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 8bc783ef30 d3dx9/tests: Add tests for updating boolean matrices on CommitChanges.
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:23 +02:00
Paul Gofman 6930679a90 d3dx9/tests: Initialize boolean constants with the inverse of expected result.
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:21 +02:00
Paul Gofman eea701cca0 d3dx9/tests: Factor out test_effect_preshader_compare_pbool_consts() 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-05 19:48:19 +02:00
Paul Gofman 2a3ad1d209 d3dx9/tests: Factor out test_effect_preshader_clear_pbool_consts() 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-05 19:48:16 +02:00
Paul Gofman 7178c16742 d3dx9/tests: Extend test for boolean matrix constant setting.
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:15 +02:00
Paul Gofman b45db52d98 d3dx9/tests: Remove a leftover todo_wine_if in test_effect_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-06-05 19:48:13 +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
Henri Verbeet e56adf9884 d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHScale().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:36:43 +02:00
Henri Verbeet af7125e56b d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHRotateZ().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:36:41 +02:00
Henri Verbeet 141da77890 d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHRotate().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:36:39 +02:00
Henri Verbeet 1b83660c59 d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHMultiply4().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:36:37 +02:00
Henri Verbeet 69f93748c1 d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHEvalDirectionalLight().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-01 09:36:35 +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
Austin English 131837eaaf d3dx9_36: Sort specfile.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:12:56 +02:00
Henri Verbeet 31fcb336a2 d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHMultiply3().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 08:57:39 +02:00
Henri Verbeet 4002673683 d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHMultiply2().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 08:57:37 +02:00
Henri Verbeet c940057171 d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHEvalSphericalLight().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 08:57:35 +02:00
Henri Verbeet 12c8400631 d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHEvalHemisphereLight().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 08:57:33 +02:00
Paul Gofman a7da1c81e7 d3dx9/tests: Use static test blob in test_effect_preshader_ops().
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-25 08:57:24 +02:00
Paul Gofman 37bdb8e8cd d3dx9/tests: Check pixel shader sampler states in test_effect_commitchanges().
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:46:06 +02:00