Commit Graph

2749 Commits

Author SHA1 Message Date
Henri Verbeet 5eca371a6c wined3d: Always report WINEDDSCAPS_TEXTURE, WINEDDSCAPS_ZBUFFER and WINEDDSCAPS_MIPMAP.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 09:32:55 +02:00
Henri Verbeet 1500693828 wined3d: Never report WINEDDSCAPS_ALPHA, WINEDDSCAPS_SYSTEMMEMORY and WINEDDSCAPS_VISIBLE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 09:32:52 +02:00
Henri Verbeet 1d26724d74 ddraw/tests: Add a test for reported surface caps.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 09:32:45 +02:00
Paul Gofman aa6517cf87 ddraw/tests: Test restoring attached surface for ddraw1.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:39:02 +02:00
Paul Gofman d8812edc65 ddraw/tests: Test restoring attached surface for ddraw2.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:39:00 +02:00
Paul Gofman da2fdc4cd3 ddraw/tests: Test restoring attached surface for ddraw4.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:38:57 +02:00
Paul Gofman 5c9a7b0986 ddraw: Restore complex attached surfaces when restoring surface.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47586
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:38:49 +02:00
Paul Gofman 7361c7f2cd ddraw: Return DDERR_SURFACELOST from _GetAttachedSurface() if surface is lost.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:38:41 +02:00
Henri Verbeet 5f96c5e264 wined3d: Setup/restore fullscreen window state inside wined3d.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:30:05 +02:00
Alexandre Julliard 0d48c2e796 ddraw: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 10:00:29 +02:00
Henri Verbeet f30248f336 ddraw: Use wined3d_bit_scan() in viewport_alloc_active_light_index().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 14:40:44 +02:00
Jactry Zeng c5577721b9 wined3d: Drop support for WINED3DFMT_D32_UNORM.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 08:27:56 +02:00
Jactry Zeng db0dd15618 ddraw/tests: Add tests for 32-bit depth format support.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 08:27:52 +02:00
Paul Gofman cc2e05bdc7 ddraw: Set _TSS_ALPHA_OP to _SELECT_ARG1 in case of NULL texture in fixup_texture_alpha_op().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 13:01:58 +02:00
Paul Gofman 3b29fc0a87 ddraw: Factor out fixup_texture_alpha_op() function.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 13:01:58 +02:00
Paul Gofman 6978db2940 ddraw: Do not modify any states for _TEXTUREMAPBLEND if application sets the same value.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-21 08:05:05 +02:00
Paul Gofman fb7b878e06 ddraw: Turn off legacy texture blending in d3d_device3_SetTextureStageState().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-21 08:05:03 +02:00
Paul Gofman 166a1d462c ddraw: Store _TEXTUREMAPBLEND state instead of guessing it from wined3d states.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-21 08:04:58 +02:00
Paul Gofman 83ca9a95de ddraw: Increase maximum active light count.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 23:24:51 +02:00
Paul Gofman d729c0362c ddraw/tests: Test adding a number of lights to viewport in ddraw4.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 23:24:49 +02:00
Paul Gofman 1eb6d8c58d ddraw: Always activate the light when requested replacing some previous light.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 23:24:47 +02:00
Paul Gofman d864cece53 ddraw: Do not limit inactive light count in viewport.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 23:24:45 +02:00
Paul Gofman 87a0edafbb ddraw: Factor out viewport_alloc_active_light_index() function.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 23:24:42 +02:00
Michael Muller 50dfd232a4 ddraw: Properly set DDCAPS.ddsOldCaps in ddraw7_GetCaps().
Signed-off-by: David Adam <david.adam.cnrs@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 09:46:13 +02:00
Paul Gofman 89ded2a956 ddraw/tests: Fix test failures in test_lighting() on some of WARP drivers for ddraw7.
Currently fails on w1064v1507 test machine.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 19:51:09 +02:00
Paul Gofman 98f5a30d05 ddraw/tests: Add test for fog calculation in _ProcessVertices for ddraw7.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 19:51:06 +02:00
Paul Gofman 68b15fec00 ddraw/tests: Test lighting with _ProcessVertices() for ddraw7.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 16:44:17 +02:00
Paul Gofman 9ab327a7e3 ddraw/tests: Test lighting with _ProcessVertices() for ddraw4.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-04 19:23:12 +02:00
Paul Gofman fa9cf3fc2c ddraw: Support D3DVOP_LIGHT in d3d_vertex_buffer7_ProcessVertices().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-04 19:23:12 +02:00
Paul Gofman 9344d58a9a wined3d: Implement parallel point lights in process_vertices_strided().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Paul Gofman 8c47f565cf wined3d: Implement spot lights in process_vertices_strided().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Paul Gofman 1381ca7c5a wined3d: Implement point lights in process_vertices_strided().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Paul Gofman 1972e99edd ddraw/tests: Backport test_specular_lighting() for ddraw1.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Paul Gofman 710dfeb425 wined3d: Implement lighting with directional lights in process_vertices_strided().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Matteo Bruni 55c619cb1f ddraw: Check the WINED3DPRASTERCAPS_DEPTHBIAS cap bit to report D3DPRASTERCAPS_ZBIAS.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:36 +02:00
Paul Gofman ae2696c992 ddraw: Enable lighting only if material is set in d3d_execute_buffer_execute().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Paul Gofman 8bc7139b6f ddraw: Fix setting current viewport for ddraw1.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Paul Gofman 034d2b9963 ddraw/tests: Test lighting with ambient light and material in ddraw1.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 20:14:00 +02:00
Paul Gofman 08d630e250 ddraw: Fix vertex count in d3d_device3_DrawIndexedPrimitiveVB().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47129
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-08 08:29:30 -05:00
Henri Verbeet b15685355c wined3d: Explicitly create the implicit swapchain.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-12 15:33:44 +02:00
Henri Verbeet f485816d10 ddraw: Simplify ddraw_destroy_swapchain().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-12 15:33:36 +02:00
Henri Verbeet 15d52fec68 wined3d: Get rid of wined3d_device_uninit_gdi().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-12 15:33:33 +02:00
Henri Verbeet b599e8e3a0 wined3d: Get rid of wined3d_device_init_gdi().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-12 15:33:27 +02:00
Paul Gofman 38bdd6fc5c ddraw: Improve d3d_device7_GetClipStatus() stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43411
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:42 +02:00
Józef Kucia c3da067216 ddraw: Avoid passing invalid device type to wined3d.
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>
2019-04-05 22:16:31 +02:00
Zebediah Figura 1879a17ec4 ddraw: Forbid creating a stateblock while recording.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Zebediah Figura 0da6f2a66a ddraw: Forbid capturing a stateblock while recording.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Zebediah Figura 5fd14a4e62 ddraw: Forbid applying a stateblock while recording.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Zebediah Figura 90af51d041 ddraw: Return D3DERR_NOTINBEGINSTATEBLOCK when EndStateBlock() is called while not recording.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Zebediah Figura f9b9004f81 ddraw: Return D3DERR_INBEGINSTATEBLOCK when BeginStateBlock() is called while recording.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Zebediah Figura 7df470164b ddraw/tests: Add some tests for calling stateblock methods while recording.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Paul Gofman 56404595d5 ddraw: Port light delete / add test for ddraw1.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 23:25:49 +02:00
Paul Gofman ce67874d61 ddraw: Port light delete / add test for ddraw2.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 23:25:49 +02:00
Paul Gofman addc611b2a ddraw: Fix ddraw[1-4] light activation / deactivation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42572
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 23:25:49 +02:00
Paul Gofman d18f051ac4 ddraw/tests: Test specular lighting with zero shininess in ddraw2.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 21:24:01 +01:00
Paul Gofman 9411bc524c ddraw/tests: Test specular lighting with zero shininess in ddraw4.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 21:23:58 +01:00
Paul Gofman ce316dfd5f ddraw/tests: Test specular lighting with zero shininess in ddraw7.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 21:14:00 +01:00
Paul Gofman 26b8581f2f ddraw/tests: Test lighting with ambient light and material in ddraw2.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 21:13:44 +01:00
Paul Gofman fa56881595 ddraw: Do not set ambient light component for d3d[1-4].
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-29 21:13:43 +01:00
Zebediah Figura 4d67ac1758 wined3d: Make wined3d_device_set_texture() infallible.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 20:32:25 +01:00
Paul Gofman 61c32ac8d6 ddraw/tests: Port test for adding the same light to viewports multiple times for ddraw1.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 20:32:09 +01:00
Paul Gofman 927d509aa2 ddraw/tests: Port test for adding the same light to viewports multiple times for ddraw2.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 20:32:06 +01:00
Paul Gofman 9bd6b2c2bf ddraw: Deny adding the same light to viewports multiple times.
According to the logs attached to the bug, the application seems to
spin in endless LIST_FOR_EACH_ENTRY() in viewport_activate(), which
is the result of adding the same light structure to the list twice.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46807
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 20:31:59 +01:00
Stefan Dösinger 4968ca3d79 ddraw/tests: Test invalid clipper objects.
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>
2019-03-22 20:31:56 +01:00
Stefan Dösinger 347efb985c ddraw: Don't operate on stored invalid clippers.
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>
2019-03-22 20:31:54 +01:00
Stefan Dösinger e809a500d7 ddraw: Clear *clipper on failure in ddraw_surface7_GetClipper().
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>
2019-03-13 23:40:39 +01:00
Stefan Dösinger f8361d27e4 ddraw: Protect against invalid clipper pointers.
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>
2019-03-13 23:40:39 +01:00
Michael Stefaniuc 74111f3882 ddraw/tests: Remove redundant not NULL check (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:26:12 +01:00
Michael Stefaniuc 17325e6e69 ddraw/tests: Avoid using the comma operator (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 15:52:07 +01:00
Michael Stefaniuc 0df36ddfa4 ddraw/tests: Remove useless casts to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Józef Kucia 9844d73b66 ddraw/tests: Destroy viewport in test_lighting_interface_versions() (Valgrind).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36381
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>
2019-02-13 19:45:24 +01:00
Paul Gofman fda88f78d1 ddraw/tests: Port test_alphatest() from d3d9.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 12:11:06 +01:00
Matteo Bruni 019ec46602 ddraw: Refuse to create non-managed DDSCAPS_WRITEONLY surfaces.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 19:27:08 +01:00
Józef Kucia 445b97b2a2 ddraw: Pass correct box when mapping system memory vertex buffers.
This fixes a regression introduced by commit
5a8e430b96.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46536
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>
2019-01-31 18:13:18 +01:00
Matteo Bruni ac4f768e61 wined3d: Replace WINED3DUSAGE_WRITEONLY with resource access flags.
Always allow read and write mapping of ddraw buffers:
test_vb_writeonly() depends on that.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:13:18 +01:00
Matteo Bruni 3c87df0bc0 ddraw: Drop map read access from the internal buffers used for user-pointer draws.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 18:36:22 +01:00
Matteo Bruni 7bd3072d7f ddraw/tests: Test drawing with system memory textures.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-24 17:33:38 +01:00
David Adam f5d7d9cccc ddraw: Fix the "dwMipMapCount" field of texture sub-levels.
Instead of the total count, it indicates the count starting from the current
level.

Signed-off-by: David Adam <david.adam.cnrs@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 23:52:22 +01:00
David Adam 6ec69f0ee3 ddraw/tests: Add tests for the "dwMipMapCount" field of texture sub-levels.
Signed-off-by: David Adam <david.adam.cnrs@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 23:52:20 +01:00
Henri Verbeet 0a2b0d4a95 ddraw: Return the correct swapchain surface in ddraw7_GetGDISurface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 16:35:38 +01:00
Henri Verbeet 3bd8b710c3 ddraw: Implement ddraw7_FlipToGDISurface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 16:35:35 +01:00
Zebediah Figura 7163fbba85 wined3d: Remove stateblock handling from wined3d_device_multiply_transform().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 16:32:27 +01:00
Zebediah Figura 110929a662 ddraw/tests: Add a test for MultiplyTransform().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 16:32:24 +01:00
Henri Verbeet 5e677beef5 ddraw/tests: Add a test for the "GDI" surface.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-17 19:45:27 +01:00
Józef Kucia f667e65116 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>
2019-01-09 12:13:46 -06:00
Józef Kucia 8a3923b316 ddraw/tests: Add tests for attaching depth buffers of different sizes.
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>
2019-01-09 12:13:40 -06:00
Matteo Bruni 5a8e430b96 ddraw: Support drawing from D3DVBCAPS_SYSTEMMEMORY vertex buffers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45279
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-17 22:35:22 +01:00
Michael Stefaniuc 7d1c67948d ddraw: Drop redundant memset() before memcpy().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:18 +01:00
Zebediah Figura c6a5bc3ca1 ddraw: Get rid of redundant call to wined3d_stateblock_capture().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Henri Verbeet 9bac6f159c wined3d: Disallow dynamic rendertarget and depth/stencil resources.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Józef Kucia ecad1995a0 ddraw: Do not use unset viewport in viewport_activate().
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-11-12 16:44:22 +01:00
Józef Kucia f4865564ec ddraw: Do not return unset viewport from GetViewport().
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-11-12 16:44:20 +01:00
Józef Kucia b119d3c54b ddraw/tests: Add more tests for 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>
2018-11-12 16:44:19 +01:00
Józef Kucia 709f596b6b ddraw: Validate "dwSize" when setting 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>
2018-11-12 16:44:17 +01:00
Henri Verbeet ffe90dd526 ddraw: Do not set WINED3D_TEXTURE_CREATE_MAPPABLE for swapchain textures.
These aren't visible to the application, and we never map them ourselves.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-07 16:54:51 +01:00
Henri Verbeet 03c1422a71 wined3d: Get rid of WINED3DUSAGE_TEXTURE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 11:14:36 +01:00
Henri Verbeet a0d6ef5bb4 wined3d: Get rid of WINED3DUSAGE_DEPTHSTENCIL.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 11:14:34 +01:00
Henri Verbeet 3adf4b8415 wined3d: Get rid of WINED3DUSAGE_RENDERTARGET.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Henri Verbeet ae6553bd0b wined3d: Pass bind flags to wined3d_check_device_format().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet 543605ca9d wined3d: Pass correct bind flags to swapchain creation functions.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet 7cba915710 wined3d: Pass correct bind flags to texture creation functions.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Stefan Dösinger 6954e4e269 ddraw/tests: Test destroying ddraw in WM_KILLFOCUS.
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-10-15 20:13:51 +02:00
Stefan Dösinger d02b4581b5 ddraw/tests: Test when the device goes bad on focus loss.
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-10-15 20:13:51 +02:00
Stefan Dösinger 4e80641d87 ddraw/tests: Look for more messages when losing focus.
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-10-15 20:13:51 +02:00
Serge Gautherie ff64475e99 ddraw: Get rid of a redundant assignment in ddraw7_GetDisplayMode().
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-13 00:31:16 +02:00
Henri Verbeet 156572888e ddraw: Check for DDRAW_NO3D before checking for a video memory surface in d3d_device_create().
While slightly odd, this matches what the tests expect.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 01:12:06 +02:00
Henri Verbeet fbcdf8c698 ddraw: Only do asynchronous clears when the application asked for them.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 01:12:04 +02:00
Henri Verbeet 8ac639d25c ddraw: Do not request 3D-usages for DDRAW_NO3D surfaces.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-26 16:50:46 +02:00
Henri Verbeet 33d182dd54 ddraw: Reject creating DDSCAPS_VIDEOMEMORY surfaces with DDRAW_NO3D.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-25 12:29:06 +02:00
Henri Verbeet a6f68107e6 ddraw: Do not report IID_IDirect3DHALDevice in ddraw_find_device() with DDRAW_NO3D.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-25 12:29:02 +02:00
Józef Kucia 7b2ff90404 wined3d: Pass feature levels to wined3d_device_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>
2018-09-24 22:41:30 +02:00
Alistair Leslie-Hughes 96ba1bc478 ddraw: Accept the d3d1 and d3d2 versions of D3DFINDDEVICERESULT in ddraw_find_device().
Based off a patch by Michael Müller.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 16:15:21 +02:00
Henri Verbeet 8577ff54ad ddraw: Find the correct GUIDs for each D3D version in FindDevice().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 16:15:19 +02:00
Henri Verbeet 29b794dcca ddraw: Ignore the colour model in d3d3_FindDevice().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 16:15:17 +02:00
Henri Verbeet 8a66164f89 ddraw/tests: Rewrite FindDevice().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 16:15:15 +02:00
Zebediah Figura 2689f3e68b ddraw: Avoid leaking references to the wined3d device.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-22 17:02:23 +02:00
Józef Kucia a705984723 ddraw/tests: Fix IDirectDraw leaks.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:02 +02:00
Józef Kucia 4195e612d0 ddraw/tests: Add tests for cross-device blits.
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-08-14 10:16:02 +02:00
Stefan Dösinger 340437a1aa ddraw/tests: Add a test for D3DMCS_COLOR{1/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>
2018-08-14 10:16:00 +02:00
Henri Verbeet 2470b0e447 ddraw/tests: Rewrite DeviceLoadTest().
Based on a patch by Alex Henrie.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:00 +02:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Józef Kucia ec42ed4e18 wined3d: Get rid of WINED3DCAPS typedef.
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-06-15 09:11:29 +02:00
Michael Stefaniuc 7b5668a6e7 include: Make ARRAY_SIZE() available in wine/test.h.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-25 12:09:17 +02:00
Pablo Martin 43efd4f5ec wined3d: Add unimplemented flags parameter to wined3d_device_copy_sub_resource_region.
Signed-off-by: Pablo Martin <pmart-wine@riseup.net>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-21 20:34:46 +02:00
Matteo Bruni 2ca4c8360f ddraw/tests: Port test_viewport() to ddraw1.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-20 14:06:41 +02:00
Matteo Bruni f5bd6e4dcd ddraw/tests: Port test_viewport() to ddraw2.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-20 14:06:38 +02:00
Matteo Bruni 700394f5ff ddraw: Forbid setting viewport extents larger than the render target in SetViewport().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-20 14:06:35 +02:00
Nikolay Sivov b67870b7a7 wined3d: Add support for returning multiple viewports.
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-04-18 21:37:04 +02:00
Matteo Bruni 5c43d6e34f ddraw/tests: Port test_viewport() 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>
2018-04-18 21:36:50 +02:00
Nikolay Sivov 853f6538e4 wined3d: Add support for setting multiple viewports.
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-04-16 20:42:56 +02:00
Matteo Bruni 267bd0d3ea ddraw/tests: Remove a few unnecessary render state settings.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-13 22:21:54 +02:00
Matteo Bruni 7df2060167 ddraw: Forbid setting viewport extents larger than the render target in SetViewport2().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-13 22:21:46 +02:00
Matteo Bruni 233af36482 ddraw: Return error on NULL viewport in {Get, Set}Viewport[2]().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-13 22:21:44 +02:00
Stefan Dösinger 02f7b097b4 ddraw: Don't read past the end of the executebuffer.
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-04-09 09:55:06 +02:00
Stefan Dösinger 6f5028337e ddraw: Fix D3DEXECUTEDATA.dwSize handling.
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-04-09 09:55:04 +02:00
Henri Verbeet a362daeaf5 ddraw: Copy the entire front-buffer surface after a buffer swap.
wined3d_swapchain_present() will invalidate everything except
WINED3D_LOCATION_DRAWABLE, which means a partial blit to the front-buffer
afterwards might need to read the drawable contents back to the texture. For
P8 front-buffers that's problematic, because the original palette indices are
lost. We may want to improve the wined3d side of this to avoid reading back
the drawable, but copying the entire surface in ddraw in this situation seems
like a good idea regardless.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-30 16:52:05 +02:00
Matteo Bruni 3f6ab8f58b ddraw/tests: Port test_viewport() to ddraw7.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-29 16:06:04 +02:00
Matteo Bruni 451c376977 ddraw: Forbid setting a viewport larger than the render target.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-29 16:06:04 +02:00
Henri Verbeet 034e88e038 ddraw: Take the flip interval into account in ddraw_surface7_Flip().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-27 16:13:18 +02:00
Henri Verbeet 23713ee2a8 ddraw: Create swapchains with back-buffers.
As preparation for the next patch. Note that we drop WINED3DUSAGE_RENDERTARGET
here. We never render directly to the back-buffer in ddraw, since ddraw
back-buffers don't directly correspond to wined3d back-buffers. Moreover,
ddraw may create WINED3DFMT_P8_UINT swapchains, for which
WINED3DUSAGE_RENDERTARGET wouldn't be valid.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-27 16:13:16 +02:00
Henri Verbeet b943c7910b ddraw: Handle DDLOCK_WRITEONLY in wined3dmapflags_from_ddrawmapflags().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-26 11:35:46 +02:00
Henri Verbeet 0a354365bd wined3d: Merge the surface_created() and volume_created() wined3d_device_parent_ops callbacks.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-16 16:40:31 +01:00
Michael Stefaniuc 27ef844bd1 ddraw: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 12:40:54 +01:00
Michael Stefaniuc f450e8e32f ddraw/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 12:40:52 +01:00
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