Commit graph

2880 commits

Author SHA1 Message Date
Alistair Leslie-Hughes 964025e279 ddraw: Remove DECLSPEC_HIDDEN usage. 2023-07-20 21:48:39 +02:00
Alexandre Julliard 5eab460c8b ddraw: Use nameless unions/structs. 2023-07-13 11:56:15 +02:00
Zebediah Figura 221f110bbd wined3d: Remove no longer used arguments from wined3d_texture_update_desc().
Limit it to updating user memory and pitch.
2023-06-29 12:04:37 +02:00
Sven Baars d26e0b880c ddraw: Set the texture height in SetSurfaceDesc() (Coverity). 2023-05-08 20:01:21 +02:00
Zebediah Figura c7d8a1b47a wined3d: Directly call wined3d_texture_create() to create swapchain textures.
Get rid of the create_swapchain_texture callback.
2023-05-04 18:44:48 +02:00
Zebediah Figura f74de8e0ab ddraw: Retrieve the frontbuffer directly from wined3d. 2023-04-18 16:48:17 +02:00
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 4ac9d12522 ddraw: Reimplement SetSurfaceDesc() by recreating the wined3d texture(s). 2023-03-29 22:29:37 +02:00
Zebediah Figura 5a37d94bea wined3d: Pass parent ops to wined3d_rendertarget_view_set_parent(). 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
Stefan Dösinger 723cd0a4ae wined3d: Make video memory accounting a per-resource flag.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54701
2023-03-28 11:43:38 +02:00
Zebediah Figura 107c260893 ddraw: Make ddraw_surface_init() static. 2023-03-22 20:03:51 +01:00
Zebediah Figura 87cd13903c ddraw: Move sub-resource surface creation to ddraw_texture_init(). 2023-03-22 20:03:51 +01:00
Zebediah Figura a18bc5f9d7 wined3d: Pass parent ops to wined3d_resource_set_parent().
So that we can "detach" a wined3d surface from ddraw after creating it, in turn
so that we can recreate the backing wined3d texture for a surface, namely for
SetSurfaceDesc().
2023-03-22 20:03:51 +01:00
Zebediah Figura 4f8635bd78 wined3d: Pass parent ops to wined3d_texture_set_sub_resource_parent().
So that we can allow setting the sub resource and parent ops not from the
texture_sub_resource_created() callback, and also that we can "detach" a wined3d
surface from ddraw after creating it, so that we can recreate the backing
wined3d texture, viz. in SetSurfaceDesc().
2023-03-22 20:03:51 +01:00
Zebediah Figura f103da7c69 ddraw: Factor out a ddraw_texture_rename_to() helper from ddraw_surface1_Flip(). 2023-03-22 20:03:51 +01:00
Zebediah Figura 06e6b16479 ddraw: Rename ddraw_surface_create_wined3d_texture() to ddraw_texture_init(). 2023-03-16 17:38:08 +01:00
Zebediah Figura d4072dc870 ddraw: Do not return a wined3d_texture from ddraw_surface_create_wined3d_texture(). 2023-03-16 17:38:08 +01:00
Zebediah Figura 0ff2f3a856 ddraw: Move the rest of the surface desc population to ddraw_surface_create() from device_parent_texture_sub_resource_created().
Cf. 191db92fd5.

Put all this code in the same place, and possibly move towards getting rid of
the texture_sub_resource_created() callback entirely.
2023-03-16 17:38:05 +01:00
Zebediah Figura 53aa0be037 ddraw: Move sub-resource surface initialization to ddraw_surface_create_wined3d_texture(). 2023-03-14 14:24:59 +01:00
Zebediah Figura 54fb279302 ddraw: Factor out more common initialization into ddraw_surface_create_wined3d_texture(). 2023-03-14 14:24:59 +01:00
Zebediah Figura 7a61760c60 ddraw: Move sysmem_fallback setting to ddraw_surface_create_wined3d_texture(). 2023-03-14 14:24:59 +01:00
Zebediah Figura fbcd01ff1f ddraw: Remove some outdated comments from ddraw_surface7_SetSurfaceDesc(). 2023-03-14 14:24:59 +01:00
Zebediah Figura 0fb06e8ac7 ddraw: Rename "is_complex_root" to "is_root".
"is_complex_root" is somewhat misleading, given that it is TRUE for surfaces with no attached surfaces.
2023-03-14 14:24:59 +01: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 b826e1eb3d ddraw: Move wined3d_resource_desc translation to ddraw_surface_create_wined3d_texture(). 2023-03-08 18:07:04 +01:00
Zebediah Figura eea1b79e24 ddraw: Move the wined3d_texture_update_desc() call into ddraw_surface_create_wined3d_texture(). 2023-03-08 18:07:04 +01:00
Zebediah Figura b15339d470 ddraw: Restructure ddraw_surface_create_wined3d_texture() to avoid gotos.
And, more saliently, to allow moving more common code to the end of the
function.
2023-03-08 18:07:03 +01:00
Zebediah Figura 5ba3c4af7c ddraw: Separate a need_draw_texture() helper. 2023-03-08 18:07:03 +01:00
Zebediah Figura 655af198df ddraw: Move pitch validation to ddraw_surface_create_wined3d_texture().
It makes use of the wined3d_format, and we want to move wined3d desc creation to
ddraw_surface_create_wined3d_texture() so that we can use it to recreate the
wined3d texture in SetSurfaceDesc().
2023-03-08 18:07:01 +01:00
Zebediah Figura 2f3c7e8725 ddraw: Remove the redundant "desc" parameter to ddraw_surface_create_wined3d_texture(). 2023-03-02 19:43:08 +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
Paul Gofman fffde3ca52 ddraw: Sync draw textures even for hardware device.
Fixes a regression introduced by commit
d2d9f713df.
2022-12-06 17:04:50 +01:00
Anton Baskanov 42503f4ea3 ddraw: Use the wined3d_streaming_buffer helpers to manage the streaming index buffer. 2022-11-24 09:19:55 +01:00
Anton Baskanov e359c1466a ddraw: Use the wined3d_streaming_buffer helpers to manage the streaming vertex buffer. 2022-11-24 09:19:55 +01:00
Anton Baskanov c7f6dc641d wined3d: Introduce a new flag to indicate that indirect draws won't be used. 2022-11-14 13:13:01 +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
Zebediah Figura 1316383268 ddraw: Add FPS tracing in ddraw_surface_update_frontbuffer().
This usually doesn't go through the normal presentation paths.
2022-09-27 18:14:34 +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