Commit Graph

2310 Commits

Author SHA1 Message Date
Michael Stefaniuc 63fcf7faee ddraw: Don't memset memory before overwritting it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:03 +09:00
Matteo Bruni 96eb4242cc ddraw: Use a union in tss_lookup. (Coverity).
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-20 22:50:02 +09:00
Stefan Dösinger f8bda14d66 ddraw/tests: Skip A4R4G4B4 ckey tests on Nvidia.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:40:11 +09:00
Michael Stefaniuc 36a1bc1f04 ddraw: Get rid of a cast from a COM object to an iface.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-04 23:06:28 +09:00
Stefan Dösinger 6ffa32b8b3 ddraw/tests: P8 color keying does not work on WARP.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-04 23:04:51 +09:00
Michael Stefaniuc a602e2f69a ddraw/tests: Use wine_dbgstr_rect() in the ddraw7 tests.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-09 21:57:14 +09:00
Michael Stefaniuc 7d74583e8a ddraw/tests: Use wine_dbgstr_rect() in the ddraw4 tests.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-09 21:57:12 +09:00
Michael Stefaniuc bfe3475d5a ddraw/tests: Use wine_dbgstr_rect() in the ddraw2 tests.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-09 21:57:09 +09:00
Michael Stefaniuc 420f2329ab ddraw/tests: Use wine_dbgstr_rect() in the ddraw1 tests.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-09 21:57:06 +09:00
Henri Verbeet 2afd2f705f ddraw: Avoid accessing free'd memory on an error path in ddraw_surface_create().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 11:39:05 +09:00
Stefan Dösinger 55b8c75528 ddraw/tests: Remove p8_primary_test.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 11:38:42 +09:00
Stefan Dösinger ab34bc6cca ddraw/tests: Test P8 color keying.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 11:38:40 +09:00
Stefan Dösinger 156a2aa07a ddraw/tests: Add readback tests to test_palette_gdi.
The changed SetDisplayMode / SetCooperativeLevel order is necessary to
make this test pass reliably on native. Otherwise my Windows 7 box
returns a color of 0x00000000 from GetDC about 25% of the time.

Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-08 11:38:35 +09:00
Andrey Gusev 2aa6894af6 ddraw: Fix a typo in WARN() messages.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 00:10:51 +09:00
Józef Kucia 42fcf20221 wined3d: Implement index buffer offset.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-03 00:10:49 +09:00
Andrey Gusev b27389ae08 ddraw/tests: Fix a typo in ok() messages.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 20:02:55 +09:00
Józef Kucia e47a735f76 wined3d: Add wined3d creation flag for selecting unbound resource color.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-23 19:23:45 +09:00
Józef Kucia 76d4f54c55 ddraw/tests: Test creating flippable cubemaps.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-17 21:01:41 +09:00
Józef Kucia 00bf75066b ddraw: Forbid creating flippable cubemaps.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-17 21:01:39 +09:00
Michael Stefaniuc 08201eef3c ddraw: Use IsRectEmpty() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-14 12:12:28 +09:00
Józef Kucia 64014ae3ed wined3d: Add "layer_count" parameter to wined3d_texture_create().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-26 21:35:31 +09:00
Henri Verbeet 078aefddba ddraw: Return early in d3d_device7_DrawPrimitiveVB() with a 0 vertex count.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-26 14:47:55 +09:00
Francois Gouget 2738f7690d ddraw: Remove DDENUMSURFACES_{MATCH,SEARCH}TYPE as they are unused.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:19 +09:00
Henri Verbeet 34a1ef42a7 ddraw: Return early in d3d_device7_DrawIndexedPrimitiveVB() with a 0 vertex or index count.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:17 +09:00
Henri Verbeet a849cc1bd3 ddraw: Return early in d3d_device7_DrawPrimitive() with a 0 vertex count.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:17 +09:00
Henri Verbeet d71132ed83 ddraw: Return early in d3d_device7_DrawPrimitiveStrided() with a 0 vertex count.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:16 +09:00
Henri Verbeet af4e471ef1 ddraw: Return early in d3d_device7_DrawIndexedPrimitive() with a 0 vertex or index count.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:16 +09:00
Henri Verbeet 41975efef6 ddraw: Return early in d3d_device7_DrawIndexedPrimitiveStrided() with a 0 vertex or index count.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:16 +09:00
Henri Verbeet c12dc091bd ddraw/tests: Add some tests for draw parameter validation.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:16 +09:00
Henri Verbeet 7cabef1457 ddraw: Require exclusive mode only for primary surface flips.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 12:22:45 +09:00
Henri Verbeet 1736431c68 ddraw: Allow DDSCAPS_FLIP without DDSCAPS_PRIMARYSURFACE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 12:22:42 +09:00
Henri Verbeet 4e02cc3a86 ddraw: Fix the parameter names for the various Flip() functions.
The "dst" surface is the source, not the destination.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 12:22:39 +09:00
Francois Gouget 8f42343c02 ddraw: Spelling and plural fixes in comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-20 21:50:35 +09:00
Henri Verbeet f519aca8b3 wined3d: Reject sub-resource types in wined3d_check_device_format().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 14:56:14 +09:00
Henri Verbeet 82a7f1ebf2 wined3d: Implement texture DC creation on top of D3DKMTCreateDCFromMemory().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 12:32:25 +09:00
Henri Verbeet 2280487111 ddraw/tests: Add some tests for the properties of the DC returned by surface GetDC().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-13 23:01:07 +09:00
Henri Verbeet c3d74913b7 wined3d: Be more lenient with wined3d_texture_get_dc() calls from ddraw.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-13 23:01:06 +09:00
Henri Verbeet 31999bafda ddraw/tests: Add some more surface GetDC() tests to test_getdc().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-11 11:36:10 +09:00
Henri Verbeet 77e6d98819 ddraw/tests: Rewrite GetDCFormatTest().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-11 11:36:07 +09:00
Matteo Bruni 302b610f9c ddraw/tests: Add a test for color varyings clamping.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-01 12:49:07 +09:00
Henri Verbeet 3c7ca3d553 ddraw/tests: Get rid of the unused "d3d" variable in test_shademode().
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-03-23 11:28:51 +09:00
Henri Verbeet f0c7c7f627 ddraw/tests: Rewrite blt_test().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-23 11:27:26 +09:00
Michael Stefaniuc 060387936d ddraw: Use SetRect() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 23:51:31 +09:00
Henri Verbeet 198042e1d8 wined3d: Require a valid rectangle pointer if rect_count is non-zero in device_clear_render_targets().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-18 12:20:44 +09:00
Henri Verbeet 644724d32c ddraw: Just return an error if we failed to find the predecessor in ddraw_surface_delete_attached_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-16 12:10:03 +09:00
Henri Verbeet 130bd9d8c7 ddraw: Avoid d3d_device_update_depth_stencil() in ddraw_surface_delete_attached_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-16 12:10:00 +09:00
Henri Verbeet 9ff40749f9 ddraw: Do not destroy surfaces that are still attached.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-16 12:09:58 +09:00
Henri Verbeet 0bdae1a0b8 ddraw/tests: Skip initialising "quad" and "indices" in test_specular_lighting() if a 3D device can't be created.
This also happens to avoid leaking them in that case.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-13 15:41:37 +09:00
Michael Stefaniuc 3db08a49e1 ddraw: Use SetRectEmpty() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 22:29:02 +09:00
Henri Verbeet 48580ccd42 ddraw: Use wined3d_texture_get_sub_resource_desc() in ddraw_surface_create().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:11 +09:00