Commit Graph

2570 Commits

Author SHA1 Message Date
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