Commit graph

2896 commits

Author SHA1 Message Date
Alexandre Julliard 540219df96 ddraw: Use SecureZeroMemory to clear the clipper vtbl. 2023-11-07 22:58:40 +01:00
Zebediah Figura 0e39cd65cb wined3d: Translate sampler states to sampler objects in wined3d_device_apply_stateblock(). 2023-11-07 20:55:09 +01:00
Jacek Caban 82d3fd0ac5 ddraw: Use designated initializers in tss_lookup. 2023-11-07 11:04:20 +01:00
Zhiyi Zhang 9092a4ccca ddraw: Restore WS_EX_TOPMOST in exclusive fullscreen mode if it got removed.
Tests show that there is a ~1.5s timer that checks for the presence of WS_EX_TOPMOST and restore it
if it got removed when the timer times out. Manual tests that skip WM_TIMER handling show there is a
1.5s timer of ID 0x4242 keeps firing. The timer stops when its WM_TIMER message gets handled.

Fix Deus Ex: Game of the Year Edition missing WS_EX_TOPMOST after changing resolutions in fullscreen
mode. The application removes WS_EX_TOPMOST from its game window after entering fullscreen.
2023-11-02 22:25:17 +01:00
Zhiyi Zhang a87c1d251e ddraw/tests: Test WS_EX_TOPMOST restoration.
Test that there is a ~1.5s timer after entering fullscreen mode and restores WS_EX_TOPMOST if it's
missing when the timer times out.
2023-11-02 22:25:15 +01:00
Alexandre Julliard acad49573a makefiles: Always use the global SOURCES variable for .c files. 2023-11-01 22:44:03 +01:00
Alexandre Julliard c432eac726 makefiles: Always use the global SOURCES variable for .idl files. 2023-11-01 22:43:50 +01:00
Alex Henrie 1b7b948a16 ddraw/tests: Use CRT allocation functions. 2023-10-31 18:49:06 +01:00
Alex Henrie e3ac58558f ddraw: Use CRT allocation functions. 2023-10-31 18:49:00 +01:00
Zebediah Figura ee7d047dd5 ddraw: Always create surfaces with WINED3D_BIND_SHADER_RESOURCE if possible. 2023-10-10 23:15:05 +02:00
Zebediah Figura 9cd6a43fef ddraw: Refactor how bind flags are computed.
Try to do it in one place instead of two.
2023-10-10 23:15:05 +02:00
Zebediah Figura 379f592cca ddraw: Do not check for DDRAW_NO3D in wined3d_resource_desc_from_ddraw().
NO3D implies SYSTEMMEMORY, and is incompatible with TEXTUREMANAGE, so this case is unreachable.
2023-10-10 23:15:05 +02:00
Alex Henrie 8f02157bc8 ddraw: Use the debugstr_fourcc function instead of reimplementing it. 2023-10-06 20:49:53 +02:00
Zebediah Figura 3e51b67e31 wined3d: Pass a wined3d_stateblock_state to wined3d_device_validate_device().
Revert the use of wined3d_state_uses_depth_buffer() in this function to the
version before 8b4e07d5f3.
2023-09-20 22:15:29 +02:00
Alexandre Julliard 62cd08f387 ddraw/tests: Use nameless unions/structs. 2023-08-15 18:56:45 +02:00
Jeff Smith 287eb4e84b ddraw/tests: Use compare_uint() in compare_float() instead of abs().
The result of abs(INT_MIN) is INT_MIN, which breaks the ulps comparison.
2023-08-10 09:54:02 +09:00
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