Commit Graph

2605 Commits

Author SHA1 Message Date
Henri Verbeet 1bd9cb3471 ddraw: Compare with the correct view in ddraw_surface_delete_attached_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 16:55:08 +01:00
Henri Verbeet 6ca15e9c13 wined3d: Split WINED3D_RESOURCE_ACCESS_MAP into WINED3D_RESOURCE_ACCESS_MAP_R and WINED3D_RESOURCE_ACCESS_MAP_W.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 13:43:52 +01:00
Henri Verbeet acc0f49aae wined3d: Introduce separate read and write resource map flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 13:43:52 +01:00
Henri Verbeet 72c31c146b ddraw: Explicitly translate resource map flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-16 14:24:58 +01:00
Henri Verbeet 02dc04bcc9 wined3d: Do not implicitly set WINED3D_RESOURCE_ACCESS_MAP for dynamic resources.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 09:06:51 +01:00
Henri Verbeet 9cc7c6e99f ddraw: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-13 20:23:26 +01:00
Henri Verbeet 46f20e4198 ddraw: Set WINED3D_RESOURCE_ACCESS_MAP on textures.
Like buffers, WINED3D_RESOURCE_ACCESS_MAP is not currently enforced on 2D
textures in wined3d.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 15:33:09 +01:00
Henri Verbeet 3bb34ac938 ddraw: Set WINED3D_RESOURCE_ACCESS_MAP on buffers.
Since ddraw buffers can always be mapped. WINED3D_RESOURCE_ACCESS_MAP is
currently not enforced on buffers in wined3d, but we'd like to change that.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 15:33:09 +01:00
Henri Verbeet 0b92a6fba7 ddraw: Use wined3d_buffer_create() in d3d_vertex_buffer_create_wined3d_buffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 09:41:59 +01:00
Henri Verbeet c8dd71bbc4 ddraw: Avoid using WINED3DUSAGE_DYNAMIC without WINED3D_RESOURCE_ACCESS_GPU in d3d_execute_buffer_SetExecuteData().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 10:05:49 +01:00
Henri Verbeet cbd1aaafa0 ddraw: Use wined3d_buffer_create() in d3d_execute_buffer_SetExecuteData().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 10:05:46 +01:00
Henri Verbeet 3aafba2b69 ddraw: Use wined3d_buffer_create() in d3d_device_prepare_vertex_buffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 10:05:44 +01:00
Henri Verbeet a3ca7a308a ddraw: Use wined3d_buffer_create() in d3d_execute_buffer_execute().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 12:58:58 +01:00
Henri Verbeet 2e027f8668 ddraw: Use wined3d_buffer_create() in d3d_device_prepare_index_buffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:00:07 +01:00
Henri Verbeet 9275b06cc0 wined3d: Replace the pool in struct wined3d_resource_desc with resource access flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-02 18:36:45 +01:00
Józef Kucia 4701425f3c wined3d: Add buffer usage to wined3d_swapchain_desc.
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>
2018-01-25 16:27:10 +01:00
Stefan Dösinger d877dce7a2 ddraw/tests: Make test_depth_readback work on Nvidia GPUs on Windows.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 20:16:29 +01:00
Józef Kucia 110eecf7d4 ddraw/tests: Rewrite SetRenderState() tests.
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>
2018-01-11 22:30:33 +01:00
Józef Kucia 4767991851 ddraw/tests: Rewrite LimitTest().
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>
2018-01-11 22:30:30 +01:00
Józef Kucia d146940be9 ddraw/tests: Fully initialize surface desc in surface enumeration tests.
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>
2018-01-11 22:30:28 +01:00
Józef Kucia 9525f3a1e1 ddraw/tests: Avoid touching unsupported clip planes.
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>
2018-01-11 22:30:25 +01:00
Nikolay Sivov 81bc148bd1 ddraw/tests: Move CreateSurface() invalid arguments test.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-11 22:30:22 +01:00
Nikolay Sivov f6039736dd ddraw/tests: Move the surface enumeration test.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-10 23:40:27 +01:00
Stefan Dösinger dcb0d32bfa ddraw/tests: Mark WARP negative rectangle handling broken.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-10 23:16:29 +01:00
Stefan Dösinger 4244ca96a3 ddraw/tests: Sync test_clear() with d3d8/9.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-10 23:16:17 +01:00
Andrey Gusev fbb57d4176 ddraw: Fix typos in comments.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-08 19:26:44 +01:00
Nikolay Sivov 030803b422 ddraw/tests: Add another invalid arguments test for surface QI.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-05 19:23:22 +01:00
Henri Verbeet f427714bf9 ddraw/tests: Add a depth read-back test.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-05 19:20:36 +01:00
Henri Verbeet 5aefc4e3c9 ddraw/tests: Introduce a test for vertex buffer map synchronisation.
Based on a patch by Patrick Rudolph from a while ago.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-03 17:47:07 +01:00
Henri Verbeet 3037097198 ddraw: Only respect DDLOCK_NOOVERWRITE and DDLOCK_DISCARDCONTENTS on version 7 vertex buffers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-03 17:47:00 +01:00
Alex Henrie 9aeb3b98f8 ddraw/tests: Mark GetDC() failures on VMware as broken.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-02 17:31:25 +01:00
Alex Henrie 2a0f704d9b ddraw/tests: Recognise E_NOTIMPL returned from UpdateOverlay() on VMware as broken.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-27 21:12:46 +01:00
Henri Verbeet 7c9671c002 ddraw/tests: Print driver and device information before running the tests.
Analogous to the d3d8 and d3d9 tests.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-27 21:12:46 +01:00
Henri Verbeet 053272d665 ddraw/tests: Introduce an ARRAY_SIZE macro to ddraw7 as well.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-27 21:12:46 +01:00
Józef Kucia d38076fd57 wined3d: Consider CPU blitter when clearing discarded textures.
In order to avoid invalidating system memory for "converted" surfaces.

Fixes a regression introduced by commit 56128d18d4 ("wined3d: Drop the
special case for "converted" surfaces in wined3d_surface_blt().").

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>
2017-12-21 16:06:02 +01:00
Alexandre Julliard 749e280df7 ddraw: Validate the surface descriptor size in GetDisplayMode.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-21 16:06:02 +01:00
Józef Kucia 46fa862dc4 ddraw: Set depth test state while resetting device.
wined3d will not do this anymore.

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>
2017-12-07 19:14:31 +01:00
Józef Kucia 8999dfac61 ddraw: Also store supported user clip planes.
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>
2017-12-07 19:14:06 +01:00
Henri Verbeet eebf1181f9 ddraw/tests: Redundant mode sets are broken on Windows 10.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 21:01:24 +01:00
Józef Kucia a7186d79d9 ddraw: Store all 32 user clip planes.
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>
2017-12-05 20:30:06 +01:00
Józef Kucia 98e63e469e wined3d: Allow setting all 32 user clip planes.
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>
2017-12-04 11:52:02 +01:00
Józef Kucia 462bbf4d20 ddraw/tests: Add test for clip planes limits.
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>
2017-12-04 11:51:57 +01:00
Józef Kucia d1f5189759 ddraw: Cleanup ddraw_get_d3dcaps().
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>
2017-12-04 11:51:51 +01:00
Michael Stefaniuc 1677711d6e ddraw/tests: Use ARRAY_SIZE() in the ddraw4 tests.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 12:07:54 +01:00
Michael Stefaniuc 71443a5e12 ddraw/tests: Use ARRAY_SIZE() in the ddraw2 tests.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 12:07:44 +01:00
Michael Stefaniuc 27c203f237 ddraw/tests: Use ARRAY_SIZE() in the ddraw1 tests.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 12:07:40 +01:00
Józef Kucia c675bf4e82 wined3d: Add support for patch list primitive type.
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>
2017-05-19 14:01:35 +02:00
Józef Kucia e14e7e3237 wined3d: Implement floating-point viewports.
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>
2017-05-11 10:17:47 -05:00
Matteo Bruni 43b6bfbc37 wined3d: Ignore lights out of maximum range for legacy FFP lighting too.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-08 10:10:52 -05:00
Matteo Bruni c329ee5673 wined3d: Fix specular lighting calculation.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-08 10:10:50 -05:00
Henri Verbeet fb4740bbb3 ddraw: Validate that non-fill blits have a source surface in ddraw_surface7_Blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 15:38:47 +02:00
Henri Verbeet 7f826a7131 ddraw/tests: Port test_texturemapblend() to ddraw4.c as well.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 15:38:47 +02:00
Henri Verbeet 5ff2fdc452 wined3d: Make blits asynchronous by default.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 08:44:54 +02:00
Henri Verbeet 6b41501344 ddraw: Ignore unsupported blit flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 08:44:48 +02:00
Henri Verbeet 45b01908da ddraw/tests: Add a test for the alpha and z-buffer blit flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 08:44:43 +02:00
Henri Verbeet a86af72270 ddraw/tests: Introduce a helper function to create windows.
Mostly for consistency with other D3D tests.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 10:01:37 +02:00
Stefan Dösinger 0aa9302b08 ddraw/tests: Prefer 16 bit depth buffers in ddraw1 and 2.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 10:01:14 +02:00
Stefan Dösinger b81e58b6bf ddraw/tests: Don't use DDBLT_COLORFILL in test_flip.
It is broken on Geforce 7 cards in some conditions triggered by this
test. Doing the fill manually is awkward but maintains the full
functionality of the test on these cards.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 10:01:09 +02:00
Henri Verbeet df6120274d wined3d: Introduce a helper function to assign wined3d_box values.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-07 11:37:28 +02:00
Henri Verbeet 381cd03eb3 ddraw: Implement depth/colour fills on top of wined3d_device_clear_rendertarget_view().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 09:01:57 +02:00
Francois Gouget b7d0b4d8a6 ddraw: Make ddraw_surface_release_iface() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-24 20:51:15 +01:00
Francois Gouget d2aa533b9c ddraw: Make ddraw_destroy_swapchain() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 15:54:08 +01:00
Matteo Bruni b772dfd502 ddraw/tests: Port test_compute_sphere_visibility() to ddraw4.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-14 17:14:23 +01:00
Matteo Bruni 8bfc9e6614 ddraw: Fix d3d6 version of ComputeSphereVisibility().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-14 17:14:21 +01:00
Matteo Bruni 52512b3d01 ddraw/tests: Cleanup and extend d3d7 ComputeSphereVisibility() tests.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-14 17:14:19 +01:00
Matteo Bruni 5f5e83977b ddraw: Take user clip planes into account in d3d7 ComputeSphereVisibility().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-14 17:14:17 +01:00
Francois Gouget d489a6db65 ddraw/tests: Spelling fixes in comments and an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-13 19:27:42 +01:00
Matteo Bruni d2fe7bfd7c ddraw/tests: Add a ddraw7 vertex buffer refcount test.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-10 23:21:24 +01:00
Matteo Bruni 444475fb4a ddraw/tests: Add a ddraw4 vertex buffer refcount test.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-10 23:21:23 +01:00
Matteo Bruni 2568fd2e00 ddraw: Keep a ddraw object reference in d3d7 vertex buffers.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-09 20:13:23 +01:00
Stefan Dösinger c3521cd673 ddraw/tests: Rewrite SrcColorKey32BlitTest.
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>
2017-03-09 20:13:23 +01:00
Józef Kucia c7f3308db7 wined3d: Add support for seamless cube map filtering.
Seamless cube map filtering should always be enabled in D3D10+.

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>
2017-03-08 16:37:35 +01:00
Nikolay Sivov 84a8f7f457 ddraw: Remove referenced to IWineD3D* interfaces.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-06 19:45:08 +01:00
Henri Verbeet 1a14a6efd5 ddraw: Avoid destroying ddraw objects from DllMain().
It's not clear we're supposed to clean up after the application like this, and
it seems questionable whether it makes things better in general.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-01 10:29:18 +01:00
Nikolay Sivov f55a10a07d ddraw: Remove references to IWineD3DDevice that doesn't exist anymore.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 09:56:31 +01:00
Matteo Bruni 68709850f1 ddraw: Get rid of multiple interfaces from vertex buffer objects.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 09:56:25 +01:00
Henri Verbeet 2cc9b854b1 ddraw/tests: Test depth fill results in test_color_fill().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-24 09:36:41 +01:00
Alex Henrie 062f1ae752 ddraw: Validate the "surface" pointer before creating the surface in CreateSurface().
And thereby avoid leaking the surface on the error path.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-16 19:08:36 +01:00
Alex Henrie 438d0fed86 ddraw/tests: Validate the "surface" pointer is unmodified after CreateSurface() without cooperative level.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-16 19:08:26 +01:00
Michael Stefaniuc 427c607a6c ddraw/tests: Fix double assigment to the same lvalue (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-15 16:16:59 +01:00
Henri Verbeet ebcf5196fc ddraw: Implement GetSurfaceFromDC().
Many thanks to Dmitry Timoshkov for helping figure this out.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-10 21:29:40 +01:00
Henri Verbeet e28a5fa393 ddraw/tests: Rewrite GetDCTest().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-10 21:29:36 +01:00
Nikolay Sivov 1a7ddf8dd9 dxgi: Added support for DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-09 13:16:57 +01:00
Matteo Bruni a65f16bf64 ddraw/tests: Fix IDirect3DDevice typo.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-08 17:00:06 +01:00
Józef Kucia a865aa368f ddraw/tests: Add basic test for D3DOP_TEXTURELOAD.
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>
2017-02-07 14:45:39 +01:00
Józef Kucia 19d85623cf ddraw: Implement D3DOP_TEXTURELOAD.
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>
2017-02-07 14:45:37 +01:00
Henri Verbeet aa8cedb033 ddraw: Update the primary surface format when changing the display mode.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-01 16:26:52 +01:00
Henri Verbeet 312cb81138 ddraw: Validate the primary surface format in ddraw_surface7_Restore().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-01 16:26:52 +01:00
Henri Verbeet ca6b29983b ddraw: Validate the primary surface dimensions in ddraw_surface7_Restore().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-01 16:26:51 +01:00
Henri Verbeet 0885e3f5ae ddraw: Mark surfaces as lost when changing the display mode.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-01 16:26:51 +01:00
Alex Henrie c9e29bff7b ddraw: Don't crash if writing out a new ddraw7 surface segfaults.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:48 +01:00
Alex Henrie 1850ac5770 ddraw: Don't crash if writing out a new ddraw4 surface segfaults.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:48 +01:00
Alex Henrie f6997e8fe0 ddraw: Don't crash if writing out a new ddraw2 surface segfaults.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:48 +01:00
Alex Henrie d9f2b4627a ddraw: Don't crash if writing out a new ddraw1 surface segfaults.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:48 +01:00
Józef Kucia 2bef0eafd0 ddraw: Relax "dwSize" validation in ddraw_surface*_Lock().
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>
2017-01-25 15:52:35 +01:00
Józef Kucia d7b3ef0783 ddraw: Cleanup ddraw7_GetAvailableVidMem().
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>
2017-01-25 15:52:20 +01:00
Henri Verbeet 31fcbb6bf2 ddraw: Kill stray tabs.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:25:53 +01:00
Michael Stefaniuc 34737c6704 ddraw/tests: Remove some no longer needed broken(TRUE).
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-20 17:39:36 +01:00
Józef Kucia 2c46fd0807 ddraw/tests: Rewrite StructSizeTest().
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>
2017-01-17 15:41:35 +01:00
Józef Kucia 2abbc1d564 ddraw/tests: Fix compilation on systems that don't support nameless unions.
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>
2017-01-13 16:27:47 +01:00
Henri Verbeet e48d75862f ddraw: Set the swapchain palette in ddraw_create_swapchain().
This fixes a regression introduced by commit
9d49b7a9be.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-13 14:51:13 +01:00
Józef Kucia 0bcc46874f ddraw/tests: Add test for display mode surface pixel format.
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>
2017-01-12 14:09:15 +01:00
Henri Verbeet 544fd16c15 ddraw/tests: Try to avoid killing the Intel (kernel) driver.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-11 16:03:54 +01:00
Francois Gouget 45a7e7482a ddraw/tests: Spelling fixes in a few 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>
2017-01-09 20:49:10 +01:00
Henri Verbeet c7c0415689 ddraw: Keep an explicit reference to the wined3d device in surfaces.
Version 1 and version 2 surfaces don't keep references to the ddraw interface
that created them, so such surfaces may get destroyed after the corresponding
ddraw object was destroyed. Wined3d requires that the device is destroyed
after all its resources are destroyed. In principle this issue always existed,
but it was probably made worse by changes in the texture cleanup code.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-04 11:11:09 +01:00
Józef Kucia 9090995115 ddraw: Subtract framebuffer size from reported available video memory.
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>
2017-01-02 20:27:10 +01:00
Józef Kucia ffcea8af77 wined3d: Implement primitive restart.
Based on a patch by Andrew Wesie.

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-12-08 13:54:06 +01:00
Daniel Lehman 5244bd0748 gdi32: Initialize rgbReserved to zero in SetDIBColorTable.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-23 22:36:39 +01:00
Stefan Dösinger 59c4d8581d ddraw: Implement executebuffer point and line draws.
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-11-15 13:46:16 -06:00
Stefan Dösinger 15fc10a728 ddraw: Avoid redundant src vertex buffer discards.
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-11-15 13:46:14 -06:00
Stefan Dösinger 72eab6f214 ddraw: Avoid redundant index buffer discards.
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-11-15 13:46:12 -06:00
Stefan Dösinger 0d91d86bba ddraw: Use wined3d_device_process_vertices for execute buffers.
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-11-15 13:46:06 -06:00
Stefan Dösinger b7c9d14e8e ddraw: Use d3d buffers for executebuffer data.
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-10-31 15:40:46 +01:00
Stefan Dösinger b44a5668f1 ddraw/tests: Add D3DVIEWPORT2 transform tests.
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-10-03 20:43:01 +02:00
Stefan Dösinger 58b82c6751 ddraw: Use the clip space matrix in TransformVertices.
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-10-03 20:43:01 +02:00
Stefan Dösinger cb078e10ed ddraw: Apply legacy clipspace to d3d2.
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-10-03 20:43:00 +02:00
Stefan Dösinger 969368341e ddraw/tests: Test d3d2 and 3 drawing with non-standard viewports.
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-10-03 20:43:00 +02:00
Stefan Dösinger ce7fa156a5 ddraw: Store d3d1 projection matrices in device->legacy_projection.
The math in transform_vertex is now the same as in wined3d's
process_vertices_strided. Calling wined3d_device_process_vertices is
easier now, but that will require moving the vertex and index data into
buffers.

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-10-03 20:43:00 +02:00
Stefan Dösinger f660a56322 ddraw/tests: Add position tests for D3DPROCESSVERTICES_TRANSFORM.
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-10-03 20:43:00 +02:00
Stefan Dösinger 85ae10698c ddraw/tests: Port test_transform_vertices to ddraw2 and ddraw4.
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-09-02 23:34:26 +09:00
Stefan Dösinger 33fbdd8bdc ddraw/tests: Test matrices in TransformVertices.
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-09-02 23:34:26 +09:00
Stefan Dösinger bc1bcf0f31 ddraw/tests: Make the vec parameter of compare_vec4 const.
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-09-02 23:34:26 +09:00
Henri Verbeet 612071c365 ddraw: Use resource mapping functions in d3d_device7_DrawIndexedPrimitiveVB().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-01 21:21:37 +09:00
Henri Verbeet a8da2f35af ddraw: Use resource mapping functions in d3d_device7_DrawIndexedPrimitiveStrided().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-01 21:21:36 +09:00
Henri Verbeet f72b682d49 ddraw: Use resource mapping functions in d3d_device7_DrawPrimitiveStrided().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-01 21:21:36 +09:00
Stefan Dösinger b12ab05f10 ddraw/tests: Extend TransformVertices invalid data tests.
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-09-01 21:21:35 +09:00
Stefan Dösinger 3cd0d92c8c ddraw: Validate the input data in TransformVertices.
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-09-01 21:21:34 +09:00
Stefan Dösinger 56e9a6e792 ddraw: Fix offscreen flag handling in TransformVertices.
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-09-01 21:21:34 +09:00
Stefan Dösinger 606441e57e ddraw: Copy extra vertex data in viewport::TransformVertices.
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-09-01 21:21:33 +09:00
Stefan Dösinger cbb2f34a79 ddraw/tests: Move IDirect3DViewport::TransformVertices tests to ddraw1.c.
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-09-01 21:21:33 +09:00
Henri Verbeet 59de77eaaa ddraw: Use resource mapping functions in d3d_device7_DrawIndexedPrimitive().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-31 22:23:00 +09:00
Henri Verbeet 215e34819d ddraw: Use resource mapping functions in d3d_device7_DrawPrimitive().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-31 22:22:59 +09:00
Henri Verbeet bd7d8fc04f ddraw: Use wined3d_resource_unmap() in d3d_vertex_buffer7_Unlock().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-29 17:55:16 +09:00
Henri Verbeet 7834f00be5 wined3d: Use wined3d_resource_map() in d3d_vertex_buffer7_Lock().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-29 17:55:14 +09:00
Henri Verbeet 6e7d370209 ddraw: Rename "wineD3DVertexDeclaration" to "wined3d_declaration".
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-26 23:23:46 +09:00
Henri Verbeet d2b782f4e4 ddraw: Rename "wineD3DVertexBuffer" to "wined3d_buffer".
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-26 23:23:45 +09:00
Henri Verbeet db42c500e2 ddraw: Rename "wineD3DPalette" to "wined3d_palette".
For consistency with other D3D libraries.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-26 23:23:45 +09:00
Henri Verbeet 53165034ba wined3d: Unify resource preloads.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 12:08:58 +09:00
Józef Kucia eaa20836d2 wined3d: Do not enable blending for edge/line antialiasing.
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-08-10 23:56:50 +09:00
Józef Kucia b808b0758d ddraw/tests: Add tests for edge antialiasing blending.
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-08-10 23:56:43 +09:00
Stefan Dösinger 426a9efc3a ddraw/tests: Skip overlay tests if DWM is on.
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-08-08 21:45:44 +09:00
Józef Kucia 2f5850c56a wined3d: Add WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT flag.
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-08-03 09:56:17 -05:00
Józef Kucia 8d032351f2 wined3d: Add WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH flag.
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-08-03 09:56:17 -05:00
Nikolay Sivov a4fabd283d ddraw: Fix its vs it's typos.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-02 06:08:44 -05:00
Michael Stefaniuc 3e8a683658 ddraw: Use SetRectEmpty() instead of memset().
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-08-01 09:57:50 -05:00
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
Henri Verbeet 3d2fb4c948 ddraw: Get the texture format from the texture in d3d_device3_SetTexture().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:11 +09:00
Henri Verbeet 3c54eefaca ddraw: Get the texture format from the texture in d3d_device3_SetRenderState().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:10 +09:00
Henri Verbeet 8c93a90f78 ddraw: Get the texture format from the texture in d3d_device3_GetRenderState().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:10 +09:00
Henri Verbeet 5c1976c43b wined3d: Introduce wined3d_texture_set_sub_resource_parent().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:10 +09:00
Frédéric Delanoy 3e53214092 ddraw/tests: Use todo_wine_if() in tests.
Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 01:17:24 +09:00