Commit Graph

1513 Commits

Author SHA1 Message Date
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 1ae07c048a d3d8/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:36 +02:00
Zebediah Figura 0922237c83 wined3d: Use a backup device context for swapchains created on the desktop window.
This patch was written by "naur".

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18490
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-06-21 22:51:55 +02:00
Zebediah Figura 835d668dc3 d3d8/tests: Test creating and rendering to a swapchain on the desktop window.
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-06-21 22:51:55 +02:00
Matteo Bruni e9d085e676 d3d8: 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
Matteo Bruni 7dfc56937d d3d8: Always allow read and write map access to non-DEFAULT 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>
2019-05-14 20:13:59 +02: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
Paul Gofman 1035d2ae28 d3d8: Keep previous stream source stride only when setting NULL buffer.
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-05 22:16:31 +02:00
Zebediah Figura a2c29deb19 d3d8: 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-04 17:24:14 +02:00
Zebediah Figura 2e01e46aeb d3d8: 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-04 17:24:14 +02:00
Zebediah Figura d63e1bc9ab d3d8: 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-04 17:24:14 +02:00
Zebediah Figura 74b3f9e3af d3d8/tests: Add more 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-04 17:24:14 +02:00
Paul Gofman aaf3ea3d9f d3d8/tests: Test specular lighting with zero shininess.
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
Michael Stefaniuc 9936d9ec82 d3d8: Actually test two return values.
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-03-27 22:00:55 +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
Matteo Bruni e3957a5627 d3d8/tests: Add a test for GetDisplayMode().
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-03-14 23:52:59 +01:00
Matteo Bruni 59e32ecbbe d3d8: Validate vertex stride in Draw[Indexed]PrimitiveUP().
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-03-13 23:40:39 +01:00
Matteo Bruni 7912a19ad3 d3d8/tests: Skip test_lost_device() on WARP.
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-03-13 23:40:39 +01:00
Matteo Bruni 62dda27f53 d3d8/tests: Set FVF in test_draw_primitive().
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-03-13 23:40:39 +01:00
Matteo Bruni f3609e0d8d d3d8/tests: Add a test for CheckDeviceFormat() with an unsupported adapter format.
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-03-13 23:40:39 +01:00
Matteo Bruni ff92a993ad d3d8: Return failure in CheckDeviceFormat() for unsupported adapter formats.
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-03-09 02:09:00 +01:00
Matteo Bruni c79fbdd3bf d3d8: Don't upload unused system memory 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>
2019-03-06 18:31:00 +01:00
Gijs Vermeulen 740102f332 d3d8: Improve ValidatePixelShader().
Based largely on a patch by Sebastian Lackner.
Adapted from "Improve ValidateVertexShader()" by Henri Verbeet.

Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:35:55 +01:00
Matteo Bruni 5020020934 d3d8/tests: Add a test for drawing with released 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>
2019-02-28 21:37:30 +01:00
Matteo Bruni 873178c03a d3d8: Release system memory wined3d buffer only after the draw buffer is destroyed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46371
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-28 21:37:30 +01:00
Matteo Bruni cf11ddfe41 d3d8/tests: Fix device tests on Windows 10.
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-26 20:48:37 +01:00
Matteo Bruni e2ffbf2e48 d3d8/tests: Add a test for Reset() with bound DEFAULT resources.
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-22 12:25:32 +01:00
Michael Stefaniuc 40c994d906 d3d8/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-20 15:52:03 +01:00
Paul Gofman e70c4846ff d3d8/tests: Add test for MaxVertexW device capability.
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-11 18:31:35 +01:00
Henri Verbeet 3ccbb762d2 d3d8: Improve ValidateVertexShader().
Based largely on a patch by Sebastian Lackner.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 12:11:02 +01:00
Józef Kucia 61a5b6c64c d3d8/tests: Use correct index variable in test_resource_access() (Coverity).
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>
2019-02-06 22:25:08 +01:00
Paul Gofman 5f823e11a3 d3d8/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-06 22:13:04 +01:00
Matteo Bruni 4e3ce8c1f0 d3d8: Refuse to create D3DUSAGE_WRITEONLY 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-02-05 19:27:06 +01:00
Zhiyi Zhang 13cca44d20 d3d8: Fix building on Mac.
bool is a reserved word in c99.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-04 19:20:49 +01:00
Matteo Bruni 8a69db2ffa d3d8/tests: Use a D3DUSAGE_WRITEONLY buffer in test_vb_lock_flags().
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 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 10061d591e d3d8: Don't allow map read access to D3DUSAGE_WRITEONLY 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>
2019-01-31 18:13:18 +01:00
Matteo Bruni 7003ba4489 d3d8: Take usage flags into account when assigning map flags.
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 00:13:00 +01:00
Matteo Bruni 955744e0c9 d3d8: 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:20 +01:00
Matteo Bruni 8384452d19 d3d8/tests: Test D3DPOOL_SYSTEMMEM vertex buffer lock address stability.
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:15 +01:00
Józef Kucia 5c3d4f39e2 d3d8: Use wined3d_bit_scan() instead of open-coding it.
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-25 23:09:07 +01:00
Józef Kucia b51bc84338 wined3d: Move wined3d_bit_scan() to public header.
wine/port.h is required for ffs().

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-25 23:09:07 +01:00
Zebediah Figura 38fb14a688 d3d8/tests: Port test_draw_primitive() from d3d9.
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-25 18:55:40 +01:00
Matteo Bruni 6e1015d8bc d3d8/tests: Test drawing with D3DPOOL_SYSTEMMEM 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
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 1bd1d0cca3 d3d8/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:19 +01:00
Józef Kucia a2829a6529 d3d8: Clamp index buffer upload range to buffer size.
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-16 17:15:03 +01:00
Józef Kucia 58868304dc d3d8: Clamp vertex buffer upload range to buffer size.
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-16 17:14:41 +01:00
Henri Verbeet dc3221a9c8 d3d8: Avoid calling wined3d_device_process_vertices() with unmappable source buffers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-08 13:07:37 -06:00
Henri Verbeet da50331bde d3d8/tests: Add a test for ProcessVertices() on D3DPOOL_SYSTEMMEM buffers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-08 13:07:37 -06:00