Commit Graph

378 Commits

Author SHA1 Message Date
Paul Gofman aab980a162 d3dx9: Use stricmp() instead of _strnicmp(..., -1).
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:12 +01:00
Paul Gofman 2b5b069dd7 d3dx9: Validate state operation in d3dx_parse_state().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 22:30:40 +01:00
Matteo Bruni cfc533b40d d3dx9: Use an assert() to validate access to const_tbl[].
This check is essentially validating that the hardcoded state_table[]
has reasonable values for the shader constant states. Use ARRAY_SIZE()
to avoid warnings if the compiler chooses an unsigned integer to back
enum SHADER_CONSTANT_TYPE.

Based on an idea by Henri Verbeet.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Francois Gouget 0611e27caf d3dx9_36: Fix the spelling of a TRACE() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 20:45:46 +01:00
Paul Gofman e28888c9fe d3dx9: Implement d3dx_effect_ApplyParameterBlock().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Paul Gofman 7d512a1e0e d3dx9: Implement recording parameters to parameter block.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Paul Gofman 07562f1e39 d3dx9: Factor out free_parameter_object_data() 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>
2019-11-18 23:18:00 +01:00
Paul Gofman 4020a38259 d3dx9: Factor out set_value() 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>
2019-11-18 23:18:00 +01:00
Paul Gofman f65e4854e3 d3dx9: Implement d3dx_effect_DeleteParameterBlock().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-18 23:18:00 +01:00
Paul Gofman fd47b68448 d3dx9: Implement d3dx_effect_EndParameterBlock().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-18 23:18:00 +01:00
Paul Gofman e281ba4db6 d3dx9: Implement d3dx_effect_BeginParameterBlock().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-18 23:18:00 +01:00
Paul Gofman 6aced396ba d3dx9: Avoid double freeing 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>
2019-11-18 23:18:00 +01:00
Michael Stefaniuc a0a5c64bd5 d3dx9: Remove redundant NULL check before heap_free().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 17:32:00 +01:00
Paul Gofman aef11864a4 d3dx9: Correctly handle NULL constant state for objects on 64 bit arch.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 16:01:47 +01:00
Matteo Bruni 5b66442bc9 d3dx9: Turn unimplemented interface ERR into a WARN.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-30 11:30:23 +01:00
Alexandre Julliard 9fb5745a79 d3dx9: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 20:20:09 +02:00
Sven Baars 7dc42119b4 d3dx9: Always free samplers (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 20:40:46 +02:00
Sven Baars 63443f249f d3dx9: Release the full parameter name when a parameter is released (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 20:40:43 +02:00
Piotr Caban 5c5a8ae23f d3dx9: Don't use strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 19:33:41 +02:00
Michael Stefaniuc cd3e5020e4 d3dx9: Secure against unsafe iface to COM object transitions.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:53:04 +01:00
Michael Stefaniuc 3b951b77f8 d3dx9: Get rid of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:53:02 +01:00
Michael Stefaniuc 7f16670edc d3dx9: Move flags out of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:52:59 +01:00
Michael Stefaniuc c56906599c d3dx9: Avoid using This in d3dx_effect_Clone().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:52:57 +01:00
Michael Stefaniuc ef974e5985 d3dx9: Merge the two pool fields of struct d3dx_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:52:55 +01:00
Michael Stefaniuc 3bd0fc3d6a d3dx9: Avoid using 'This' in d3dx_effect_GetPool().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:52:53 +01:00
Matteo Bruni 9a121f5115 d3dx9: Simplify effect init.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 22:57:51 +01:00
Matteo Bruni 009279845d d3dx9: Simplify effect cleanup.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 22:57:51 +01:00
Michael Stefaniuc 5fa06bbc30 d3dx9: Move techniques out of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 19:32:52 +01:00
Michael Stefaniuc 4c134a66b0 d3dx9: Move parameters out of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 19:32:49 +01:00
Michael Stefaniuc 9438d03127 d3dx9: Use get_version_counter_ptr() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 19:32:47 +01:00
Michael Stefaniuc 074e3232ee d3dx9: Move technique_count out of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 19:32:45 +01:00
Michael Stefaniuc 92d2f6d994 d3dx9: Pass a struct d3dx_effect to d3dx9_create_object().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 19:32:43 +01:00
Michael Stefaniuc de59a12971 d3dx9: Don't pass a struct d3dx9_base_effect to d3dx9_base_effect_init().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 19:32:41 +01:00
Michael Stefaniuc baf4aaa359 d3dx9: Don't expose struct d3dx9_base_effect outside effect.c.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:31:38 +01:00
Michael Stefaniuc 09770370c0 d3dx9: Pass a struct d3dx_effect to get_parameter_element_by_name().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:31:36 +01:00
Michael Stefaniuc 0c63453229 d3dx9: Move full_name_tmp_size out of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:31:33 +01:00
Michael Stefaniuc 3779ff07b0 d3dx9: Move full_name_tmp out of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:31:31 +01:00
Michael Stefaniuc adc1b5a8bc d3dx9: Move param_tree out of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:31:28 +01:00
Matteo Bruni cffe35488d d3dx9: Avoid double free on effect initialization failure.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:43:11 +01:00
Michael Stefaniuc 2f16d2f4ca d3dx9: Pass a struct d3dx_effect to d3dx9_base_effect_cleanup().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:35 +01:00
Michael Stefaniuc 7738fec56b d3dx9: Pass a struct d3dx_effect to get_annotation_by_name().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:33 +01:00
Michael Stefaniuc 62a26e1ad0 d3dx9: Pass a struct d3dx_effect to add_param_to_tree().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:31 +01:00
Michael Stefaniuc f9351bae3e d3dx9: Pass a struct d3dx_effect to the version helpers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:28 +01:00
Michael Stefaniuc 956b30dbf3 d3dx9: Pass a struct d3dx_effect to get_valid_pass().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:26 +01:00
Michael Stefaniuc 6ecc2c51b3 d3dx9: Pass a struct d3dx_effect to get_valid_parameter().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:24 +01:00
Michael Stefaniuc 73a05456bf d3dx9: Merge the d3dx_effect_GetVertexShader() helper.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 21:41:21 +01:00
Michael Stefaniuc a4ea70af14 d3dx9: Merge the d3dx_effect_SetVectorArray() helper.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-15 20:00:31 +01:00
Michael Stefaniuc 6eb69d2cf6 d3dx9: Merge the d3dx_effect_SetVector() helper.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-15 20:00:29 +01:00
Michael Stefaniuc 4d978ec081 d3dx9: Merge the d3dx_effect_GetVectorArray() helper.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-15 20:00:27 +01:00
Michael Stefaniuc 3754ba683f d3dx9: Merge the d3dx_effect_GetVector() helper.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-15 20:00:25 +01:00