Commit graph

1013 commits

Author SHA1 Message Date
Zebediah Figura 99cbab729b ddraw/tests: Make test_texture_wrong_caps() a bit clearer.
* Disable lighting, which affects rendering tests in non-obvious ways.

* Show that the texture is explicitly never set in ddraw7.

* Show that the diffuse color is rendered in ddraw4 and ddraw7, which is
  consistent with the texture being unset in ddraw7 and suggests that the same
  applies to ddraw4.

This may or may not help with bug 54069, but if it does not, it hopefully will
at least make the reason for failure clearer.
2023-03-29 22:29:37 +02:00
Zebediah Figura c81d05064f ddraw/tests: Add some tests for creating surfaces with user memory. 2023-03-29 22:29:37 +02:00
Stefan Dösinger 2212e663f9 ddraw/tests: Show that SYSMEM | 3DDEVICE surfaces don't consume vidmem. 2023-03-28 11:43:42 +02:00
Stefan Dösinger 23cfa8a210 ddraw/tests: Native 64 bit ddraw has a video memory leak. 2023-03-28 11:43:42 +02:00
Zebediah Figura 46c8a63752 winex11: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough. 2023-03-09 15:02:46 +01:00
Zebediah Figura c86263aa5d ddraw: Forbid DDSD_MIPMAPCOUNT without DDSCAPS_COMPLEX. 2023-03-02 19:43:07 +01:00
Zebediah Figura 9bfdd9141c ddraw: Forbid DDSCAPS_COMPLEX without any caps that merit a complex surface. 2023-03-02 19:43:07 +01:00
Zebediah Figura df8c73e906 ddraw/tests: Add more tests for mipmap surface creation flags. 2023-03-02 19:43:07 +01:00
Zebediah Figura 1cea45a183 ddraw/tests: Test that surface properties are retained across SetSurfaceDesc() calls. 2023-03-02 19:43:07 +01:00
Zebediah Figura 89e68fa9c9 ddraw/tests: Test that presenting does not set the pixel format on a window without one. 2023-02-14 20:57:09 +01:00
Zebediah Figura 02b482f47b ddraw/tests: Remove unnecessary skips and conditionals from test_pixel_format().
We do not expect normal CreateWindow() and GetDC() calls to ever fail.
2023-02-14 20:57:09 +01:00
Paul Gofman be57ebe015 ddraw: Do not report D3DDEVCAPS_HWRASTERIZATION for RGB emulation device. 2023-01-24 20:42:10 +01:00
Zhiyi Zhang 36afabb9c1 ddraw/tests: Do not create a fullscreen test window in test_window_position_cb().
Some window managers have trouble moving fullscreen windows to another monitor. For example, KWin
doesn't allow moving windows with _NET_WM_STATE_FULLSCREEN set. FVWM used by TestBots keeps
the size for fullscreen windows after they are moved to another monitor and when the window is also
fullscreen on the new monitor, which could be a bug in FVWM. But let's work around this in the tests
as well. The changed tests don't need created windows being fullscreen at the start.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54172
2023-01-11 20:32:07 +01:00
Paul Gofman 1a9c1d593b ddraw/tests: Release ddraw after device in test_texture_wrong_caps().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54049
2022-12-21 18:24:39 +01:00
Francois Gouget c2adce37f4 ddraw/tests: Mark tests failing randomly on Windows 8 as flaky.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53134
2022-10-20 20:58:33 +02:00
Stefan Dösinger 1c5bfc120d ddraw/tests: Avoid picking a large mode on Win10 in find_different_mode_callback. 2022-09-07 20:07:18 +02:00
Stefan Dösinger fc9f3bbfa5 ddraw/tests: Avoid picking a large mode on Win10 in test_coop_level_mode_set_enum_cb. 2022-09-07 20:07:18 +02:00
Zhiyi Zhang 4f00a1f9e2 ddraw: Don't report unsupported device capabilities in d3d3_EnumDevices(). 2022-08-24 09:05:47 -05:00
Zhiyi Zhang 6c391ac139 ddraw: Don't report unsupported device capabilities in d3d7_EnumDevices().
Fix Battle Realms: Zen Edition failing to start. The game expects to find a device without
D3DDEVCAPS_HWTRANSFORMANDLIGHT.
2022-08-24 09:05:45 -05:00
Zhiyi Zhang 0868bed180 ddraw/tests: Add more capability tests for enumerated devices.
Add tests for D3DDEVCAPS_HWTRANSFORMANDLIGHT and D3DDEVCAPS_DRAWPRIMITIVES2EX.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-24 09:05:42 -05:00
Zhiyi Zhang 3c899df3b5 ddraw/tests: Move the capability tests for enumerated devices.
Move the capability tests for enumerated devices from d3d.c to ddraw{1,2,4}.c.
2022-08-24 09:05:38 -05:00
Zhiyi Zhang 21beb2a8c7 ddraw/tests: Add a comment to note that tests in d3d.c are deprecated.
And new tests should be added to tests/ddraw{1,2,4,7}.c.
2022-08-24 09:05:36 -05:00
Paul Gofman f48f5155ee ddraw: Restore full complex attachment chain in ddraw_surface7_Restore(). 2022-08-16 22:27:53 +02:00
Paul Gofman 4c0efe444d ddraw/tests: Add more tests for restoring complex surfaces. 2022-08-16 22:27:53 +02:00
Stefan Dösinger 7fa1259823 ddraw/tests: Add some video memory accounting tests. 2022-08-02 11:59:03 +02:00
Zebediah Figura 7375e8a9fc ddraw/tests: Build ddraw7.c without -DWINE_NO_LONG_TYPES. 2022-07-13 12:50:07 +02:00
Zebediah Figura b176b9dab1 ddraw/tests: Build ddraw4.c without -DWINE_NO_LONG_TYPES. 2022-07-13 12:50:07 +02:00
Zebediah Figura 0af510467b ddraw/tests: Build ddraw2.c without -DWINE_NO_LONG_TYPES. 2022-07-12 22:51:29 +02:00
Zebediah Figura 92793a6e73 ddraw/tests: Build ddraw1.c without -DWINE_NO_LONG_TYPES. 2022-07-12 22:51:29 +02:00
Zebediah Figura fcaa16ae40 ddraw/tests: Build visual.c without -DWINE_NO_LONG_TYPES. 2022-07-11 10:33:29 +02:00
Zebediah Figura a4bf81081d ddraw/tests: Build refcount.c without -DWINE_NO_LONG_TYPES. 2022-07-11 10:33:29 +02:00
Zebediah Figura cc7eae0c8f ddraw/tests: Build dsurface.c without -DWINE_NO_LONG_TYPES. 2022-07-11 10:33:27 +02:00
Zebediah Figura 8a56c4dbba ddraw/tests: Build ddrawmodes.c without -DWINE_NO_LONG_TYPES. 2022-07-08 10:48:28 +02:00
Zebediah Figura 0f45657137 ddraw/tests: Build d3d.c without -DWINE_NO_LONG_TYPES. 2022-07-08 10:48:28 +02:00
Zebediah Figura 27e84c2897 wined3d: Consider WINED3D_LOCATION_CLEARED to be a GPU location for GPU-accessible textures.
When blitting from a staging texture in SYSMEM to an as-yet uninitialized GPU
texture, we want to avoid ever loading the source texture into TEXTURE_RGB, or
loading the destination texture into SYSMEM.

This isn't really a proper fix for the relevant tests; it just manages to avoid
the problematic code path.

This manages to fix test_yv12_overlay because it causes those blits to use the
upload path (whereas currently they go through the raw blitter, and before
1632b8e7a4 they would go through the CPU blitter), and
wined3d_texture_gl_upload_data() is one of the only functions to correctly
handle planar YUV formats.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52684
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 11:53:11 +02:00
Zebediah Figura edebe24a07 ddraw/tests: Use winetest_push_context() in test_viewport().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 19:57:49 +02:00
Stefan Dösinger 3a833d9b0b ddraw/tests: Account for random WARP behavior in test_texturemapblend.
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>
2022-02-09 20:08:11 +01:00
Stefan Dösinger 9da1a5059d ddraw/tests: Mark random WARP behavior broken in test_ck_default.
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>
2022-02-08 15:25:27 +01:00
Stefan Dösinger cbd14598d5 ddraw/tests: Disable color keying in ddraw1 test_texture_load.
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>
2022-02-08 15:25:25 +01:00
Stefan Dösinger d41ca1818c ddraw/tests: Skip a crashy test on WARP.
ddraw1 doesn't draw, so presumably not affected. Can't find any crashes in the testbot history
http://test.winehq.org/data/4364ff8d5c0387edd6fae142affe8e844b291518/win81_newtb-w8adm/ddraw:ddraw2.html
http://test.winehq.org/data/d03984709d87d6eaa0e2e7746f0db5d8fdf81b5a/win1507_newtb-w1064v1507-32/ddraw:ddraw4.html
I haven't found any examples of ddraw7 crashing in this test. Doesn't mean there aren't any. Let's wait and see.

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>
2022-02-08 15:25:14 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Stefan Dösinger 9a4992173e ddraw/tests: Don't insist on a different refresh rate if no refresh rate was requested.
d4fdb1f62c broke test_cursor_clipping by accident. It added a requirement
that width, height and refresh rate are different from the old mode, but
test_cursor_clipping does not use DDEDM_REFRESHRATES, so all refresh rates
are 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>
2022-01-26 21:53:57 +01:00
Stefan Dösinger dc79534a6d ddraw/tests: Treat refresh rates with 1 hz difference as equal.
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>
2022-01-26 21:53:57 +01:00
Stefan Dösinger 917e8dbf67 ddraw/tests: Accept broken depth readback of new-ish AMD GPUs.
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>
2022-01-25 20:50:49 +01:00
Gabriel Ivăncescu e44afcd8bf ddraw: Remove topmost style when going from exclusive mode to normal.
Unless DDSCL_NOWINDOWCHANGES was specified.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
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>
2022-01-20 18:18:00 +01:00
Gabriel Ivăncescu f8ac8752ed ddraw: Use WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES also if DDSCL_NOWINDOWCHANGES is set.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
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>
2022-01-20 18:17:52 +01:00
Gabriel Ivăncescu a384da8865 ddraw: Use WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES only if window is not in foreground.
Fixes a regression introduced by f90d607c67.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50370
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
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>
2022-01-20 18:17:45 +01:00
Stefan Dösinger 9e6a307f09 ddraw/tests: Reduce precision in test_filling_convention.
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>
2022-01-10 16:57:41 +01:00
Paul Gofman c52f7de248 ddraw/tests: Port tests for fullscreen window size reset from d3d9.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-03 14:50:30 +01:00
Zebediah Figura 2292e5fb5d ddraw/tests: Pass the correct size to VirtualQuery().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 15:33:50 +01:00