Commit Graph

1771 Commits

Author SHA1 Message Date
Henri Verbeet a64f3b9b70 d3d9/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:15 +01:00
Stefan Dösinger 1437317819 d3d9/tests: Work around focus-follows-mouse test failures.
Removing WS_VISIBLE without updating the window state with
SWP_FRAMECHANGED is enough to trigger d3d9's hidden window codepath
(native and in Wine), but doesn't actually hide the window. This
prevents unpredictable focus changes on focus follows mouse WMs.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-21 16:06:02 +01:00
Józef Kucia 0ccc7c09bb d3d9/tests: Add test for checking D3DUSAGE_AUTOGENMIPMAP support.
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-11 18:21:14 +01:00
Józef Kucia 48504e73e9 d3d9: 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:27 +01:00
Józef Kucia ad0ad75b5d d3d9: Toggle depth test state based on auto depth stencil.
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-06 17:01:04 +01:00
Józef Kucia 5d2a3ad310 wined3d: Add support for D3D10+ depth bias.
Direct3D seems to define exact depth bias scale factors per format.
In order to make depth bias work reliably across OpenGL drivers we need
to slightly adjust depth bias values passed to glPolygonOffset().

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-06 17:00:55 +01:00
Matteo Bruni dfba903bb2 d3d9: Stop calling wined3d_texture_generate_mipmaps().
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-12-05 20:30:05 +01:00
Józef Kucia 93d45c04c4 d3d9: Clamp clip plane index to valid range.
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:00 +01:00
Józef Kucia 3e61833807 d3d9/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:53 +01:00
Stefan Dösinger 04d4584dea wined3d: Show the device window when changing fullscreen resolutions.
World of Warplanes calls SetWindowLong(window, GWL_STYLE, WS_POPUP)
before calling reset, effectively hiding the window. It does not call
SetWindowPos(SWP_FRAMECHANGED), so the effect isn't visible and the
game displays fine after the reset. However, after the next mouse
click WINPOS_WindowFromPoint skips the window because it doesn't have
WS_VISIBLE and returns the desktop window. This in turn triggers a
focus loss and d3d9 minimizes the game.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-01 15:56:54 +01:00
Henri Verbeet 7b09398a0b wined3d: Clamp NULL source boxes in wined3d_device_copy_sub_resource_region().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 23:35:05 +01:00
Józef Kucia 7374c8325d wined3d: Allow copies between compatible formats in wined3d_device_copy_sub_resource_region().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 23:35:05 +01:00
Stefan Dösinger d334097c09 d3d9/tests: Windows 10 17.09 added an undocumented query type.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-07 18:13:12 +01:00
Stefan Dösinger eb7c1fd62e d3d9/tests: Windows 10 15.07 doesn't detect external mode changes.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-19 16:53:50 +02:00
Stefan Dösinger 975a686aa0 d3d9/tests: Make test_reset more resilient against DPI scaling.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-19 16:53:49 +02:00
Stefan Dösinger 56b223adfa d3d9/tests: Use a borderless window for test_cursor_pos.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-16 15:26:33 +02:00
Akihiro Sagawa 7bdfb745ea d3d9: Return success in d3d9_device_SetMaximumFrameLatency().
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-09 20:14:57 +02:00
Matteo Bruni 25a8773d21 wined3d: Advertise AUTOGENMIPMAP only for renderable and filterable 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>
2017-09-21 19:53:15 +02:00
Matteo Bruni cc7c6928da d3d9/tests: Add a test for nonrenderable format D3DUSAGE_AUTOGENMIPMAP support.
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-09-21 19:53:13 +02:00
Matteo Bruni 9480e81719 d3d9/tests: Properly check for mipmap autogeneration support.
CheckDeviceFormat() returns D3DOK_NOAUTOGEN if the texture format is
otherwise supported.

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-09-21 19:53:10 +02:00
Nikolay Sivov a5328e51df d3d9/tests: Some tests for D3DPRESENTFLAG_LOCKABLE_BACKBUFFER mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 13:27:32 +02:00
Nikolay Sivov be1f61e275 d3d9/tests: Test for GetDC()-capable backbuffer created with D3DFMT_UNKNOWN format.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 09:22:53 +02:00
Nikolay Sivov 67689049e2 d3d9: Ask for texture GetDC() capability GET_DC based on texture format instead of initial swapchain buffer format.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-15 17:00:53 +02:00
Matteo Bruni 22b9403d00 d3d9/tests: Trace the current test in test_signed_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>
2017-09-11 18:42:52 +02:00
Matteo Bruni 9916837786 d3d9/tests: Add a test for "NULL" FourCC 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>
2017-09-06 17:31:00 +02:00
Paul Gofman 0a4d3074ee d3d9/tests: Add test for SW shader in MVP mode.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-26 06:29:32 +02:00
Paul Gofman e81e14c894 d3d9/tests: Add tests for SW shaders creation in SWVP and MVP modes.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:58:57 +02:00
Paul Gofman 7027da7f37 d3d9/tests: Add tests for setting vertex shader constants in SWVP and MVP modes.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:58:52 +02:00
Henri Verbeet d4bd150c23 d3d9/tests: Introduce a test for drawing with a destroyed window.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 20:20:17 +02:00
Józef Kucia c4e4357eb5 d3d9: Validate D3DQUERYTYPE.
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-25 20:47:47 +02:00
Józef Kucia 42951f3e10 d3d9/tests: Add test for invalid query types.
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-23 17:34:41 +02:00
Józef Kucia 5a03f2c430 d3d9/tests: Use ARRAY_SIZE() macro in device 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>
2017-05-23 17:34:39 +02: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 487d2e0279 wined3d: Add support for patch constant signatures.
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-12 16:11:13 +02:00
Józef Kucia 6c5a90e193 wined3d: Add "parent_ops" for query objects.
In order to implement proper refcounting for
d3d11_immediate_context_SetPredication().

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:48 -05: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 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
Stefan Dösinger 9ce5b4096f d3d9/tests: WARP returns a random color in uninitialized color attributes.
ea8ba70a made the broken(warp) condition too strict. This patch reverts
back to the old behavior of accepting any result from WARP.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 10:01:22 +02:00
Stefan Dösinger 2303b5a896 d3d9/tests: Accept alpha channel differences in shadow_test.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 10:01:17 +02:00
Stefan Dösinger 4e1f7b18bf d3d9/tests: Accept WARP uninitialized texcoord alpha result on real cards.
My Radeon X1600 has the same behavior. This is consistent with the
vertex shader case in test_uninitialized_varyings with ps3_texcoord_code.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-19 09:10:33 +02:00
Stefan Dösinger ea8ba70ad4 d3d9/tests: Accept another stale value in test_vshader_input.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-19 09:10:31 +02:00
Stefan Dösinger bb7ba81111 d3d9/tests: Fix stream_test cases which do not use stream 0.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-13 11:38:41 +02:00
Stefan Dösinger 463880ea1f d3d9/tests: Disable the SM3 uninitialized diffuse test.
With the AMD r500 Windows result we have so many combinations that I
don't see the point of testing this case. As an added bonus, we can
remove the allow_zero flag now.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-13 11:38:37 +02:00
Stefan Dösinger 71d3a4a202 d3d9/tests: Allow 1.0 alpha in SM3 uninitialized varyings tests.
My Radeon X1600 shows this behavior. This makes the tests less of an
exception compared to the other ones, which also expect alpha 0.0 or
1.0.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-13 11:38:32 +02:00
Stefan Dösinger b96da0d8be d3d9/tests: Relax the partially initialized varyings test.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-13 11:38:09 +02:00
Henri Verbeet 6a307598b1 wined3d: Invalidate sub-levels in wined3d_texture_add_dirty_region().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 14:59:01 +02:00
Henri Verbeet c68eaaa026 d3d9/tests: Introduce mip-mapping to add_dirty_rect_test().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-10 21:51:38 +02:00
Henri Verbeet df6120274d wined3d: Introduce a helper function to assign wined3d_box values.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-07 11:37:28 +02:00
Henri Verbeet 49f2a1ab2f wined3d: Ignore the blitter's depth/colour fill return value in wined3d_device_clear_rendertarget_view().
Direct3D 10 and later don't have a return value, earlier versions seem to
claim success even if the fill/clear is unsupported.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 12:00:04 +02:00
Józef Kucia a5fb297ae4 d3d9/tests: Add test for vertex textures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-14 17:14:43 +01:00