Commit Graph

2275 Commits

Author SHA1 Message Date
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
Henri Verbeet f984f56fd8 ddraw: Use wined3d_texture_get_sub_resource_parent() in ddraw_surface_create().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-17 13:05:59 +09:00
Henri Verbeet 9d7221b51d wined3d: Replace WINEDDBLTFX with a new structure that only includes the used fields.
It's a happy coincidence that none of the surface pointers are actually used.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 12:09:37 +09:00
Henri Verbeet 0b6b5176cc wined3d: Get rid of unused/unimplemented WINEDDBLT_* flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 12:09:37 +09:00
Henri Verbeet 47635a60a0 ddraw: Handle DDBLT_DDROPS in ddraw_surface7_Blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 12:09:36 +09:00
Henri Verbeet 05b84945d5 wined3d: Get rid of the unused _WINEDDOVERLAYFX structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 12:09:36 +09:00
Henri Verbeet c6a7284924 ddraw: Disable WINED3D_SRGB_READ_WRITE_CONTROL.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-13 13:22:56 +09:00
Henri Verbeet 3b5eca269d wined3d: Get rid of the surface parameter to wined3d_device_parent_ops.surface_created().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:28 +09:00
Henri Verbeet 6e5fa92299 ddraw: Use wined3d_texture_get_pitch() in ddraw_surface_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:28 +09:00
Henri Verbeet 1b106fe830 ddraw: Use the correct height when calculating the linear size in ddraw_surface_init().
This fixes a regression introduced by commit
7d45318aea.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-10 13:45:02 +09:00
Riccardo Bortolato b278bb8f56 wined3d: Get rid of wined3d_device_get_surface_from_dc().
Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 12:19:39 +09:00
Henri Verbeet f0053d06c4 wined3d: Get rid of wined3d_surface_update_overlay_z_order().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 12:19:21 +09:00
Henri Verbeet 02008a6f2e wined3d: Introduce wined3d_texture_update_overlay().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 12:19:14 +09:00
Józef Kucia 1769ea38e6 wined3d: Add support for separate sRGB formats.
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-02-09 00:37:25 +09:00
Henri Verbeet ea85a1ca59 wined3d: Introduce wined3d_texture_set_overlay_position().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-06 12:25:53 +09:00
Henri Verbeet 6e30b042e1 wined3d: Introduce wined3d_texture_get_overlay_position().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-06 12:25:40 +09:00
Henri Verbeet 9628db25f6 ddraw/tests: Rewrite rectangle_settings().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-06 12:25:24 +09:00
Henri Verbeet 03ef393ae4 ddraw/tests: Rewrite offscreen_test().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-06 12:24:39 +09:00
Henri Verbeet b2b61094e0 ddraw/tests: Rewrite yv12_test().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-06 12:24:23 +09:00
Henri Verbeet b170952230 ddraw: Use wined3d_texture_get_sub_resource() in ddraw_surface7_Flip().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-05 13:52:49 +09:00
Henri Verbeet 7d45318aea ddraw: Move the mip-level dimensions fix-up from ddraw_surface_init() to ddraw_surface_create().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-05 13:52:43 +09:00
Henri Verbeet 6037179f6b ddraw: Use wined3d_rendertarget_view_create_from_sub_resource() in ddraw_surface_get_rendertarget_view().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-04 14:41:44 +09:00
Henri Verbeet 44f2589e7c ddraw: Use wined3d_resource_unmap() in ddraw_surface7_Unlock().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-03 21:56:38 +09:00
Henri Verbeet 36187987ed ddraw: Use wined3d_resource_map() in surface_lock().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-03 21:56:32 +09:00
Henri Verbeet 6b2a080372 ddraw: Use wined3d_resource_map() in d3d_texture2_Load().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-02 14:39:01 +09:00
Henri Verbeet 7e57924d32 ddraw: Use wined3d_texture_release_dc() in ddraw_surface7_ReleaseDC().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-02 14:38:55 +09:00
Henri Verbeet 83a147d98a ddraw: Use wined3d_texture_get_dc() in ddraw_surface7_GetDC().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-02 14:38:45 +09:00
Henri Verbeet 88c9ade49c ddraw: Use wined3d_texture_get_dc() in ddraw_surface_update_frontbuffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-02 14:38:39 +09:00
Henri Verbeet 59116f833e ddraw: Use wined3d_texture_preload() in d3d_device7_PreLoad().
This is safe because D3D is always initialized in D3D device methods.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-01 17:53:38 +09:00
Henri Verbeet 8ae4580137 ddraw: Print an ERR for non-zero sub-resource indices in ddraw_surface7_Flip().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-01 17:53:37 +09:00
Henri Verbeet f7e9604c3e ddraw: Use wined3d_texture_blt() in copy_mipmap_chain().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-01 17:53:37 +09:00