Commit graph

2284 commits

Author SHA1 Message Date
Akihiro Sagawa 98b053a5b8 d3d9: Update presentation parameters when creating a swap chain.
Fixes regression introduced by 215a32d643.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56070
2024-01-10 10:35:00 +01:00
Akihiro Sagawa 059b3ac77f d3d9/tests: Test the presentation parameters after creating an additional swap chain. 2024-01-10 10:35:00 +01:00
Akihiro Sagawa 45ea10c71f d3d9/tests: Test the presentation parameters after creating a device. 2024-01-10 10:35:00 +01:00
Zebediah Figura c93440b700 d3d9: Upload mapped dynamic vertex and index buffers before every draw.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55591
2023-12-04 22:10:22 +01:00
Zebediah Figura 346f783ccc d3d9/tests: Add another test for drawing from a mapped buffer. 2023-12-04 22:10:22 +01:00
Zebediah Figura ff30b54791 d3d9: Use wined3d_texture_acquire_identity_srv(). 2023-12-01 18:45:46 +01:00
Zebediah Figura a328728702 wined3d: Record a dirty rect in wined3d_texture_create_dc(). 2023-11-09 11:21:18 +01:00
Zebediah Figura 8fa82bd1f8 d3d9/tests: Test that GetDC() records a dirty rect. 2023-11-09 11:21:18 +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
Zebediah Figura 4e1da07b27 d3d9/tests: Do not test sysmem textures in test_mipmap_upload().
This does not work reliably on Windows. The application in question uses a managed texture.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53743
2023-11-07 11:05:37 +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 7ccb5df0fc makefiles: Always use the global SOURCES variable for .rc files. 2023-11-01 22:43:56 +01:00
Alex Henrie 042f9304cc d3d9/tests: Use CRT allocation functions. 2023-10-31 18:48:51 +01:00
Alex Henrie 9a5b854e2b d3d9: Use CRT allocation functions. 2023-10-31 18:48:36 +01: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
Stefan Dösinger b059052ece d3d9/tests: Mark hidden window WM_WINDOWPOSCHANGED tests unconditionally flaky.
kwin resizes hidden windows most of the time. I see the existing flaky
markers triggered on Windows 11 occasionally.
2023-09-14 11:13:50 +02:00
Stefan Dösinger b14d7f2fa8 d3d9/tests: Fix skipping ATI2N in test_resource_access. 2023-09-14 11:13:36 +02:00
Stefan Dösinger ac85fa8d0f d3d9/tests: Request a 3 mip level cube texture in test_getdc().
If we let d3d9 decide we get a single-level texture on HW that does not
support mipmapped cubes, e.g. r200 GPUs. By explicitly requesting the 3
levels we need we'll skip the test.

The test demonstrates that only one subresource can be locked / have a
DC, so it makes sense to show that this applies to the whole texture and
not just one level.
2023-09-14 11:13:33 +02:00
Stefan Dösinger da264c4d00 d3d9/tests: Zero stride tests crash on Windows XP, r200 GPU. 2023-09-14 11:13:33 +02:00
Stefan Dösinger 49e1d2ea21 d3d9/tests: Don't check messages when doing the minimization workaround dance. 2023-09-08 11:29:18 +02:00
Stefan Dösinger 4bc8b73cf3 d3d9/tests: Don't fail test_reset_fullscreen if the WM resizes us.
fvwm does that for two independent reasons. The important thing is that
we don't receive a WM_SIZE during the reset call itself.
2023-09-08 11:29:16 +02:00
Stefan Dösinger 08177b1b5e d3d9/tests: Don't fail d3d9ex if the window manager restores focus too soon. 2023-09-08 11:05:15 +02:00
Stefan Dösinger 1356f253b9 d3d9/tests: Skip big test_query loops if the d3d implementation is too slow. 2023-09-05 15:20:39 +02:00
Alexandre Julliard 20afe43832 Remove unused NONAMELESS defines. 2023-08-15 18:56:45 +02:00
Alexandre Julliard 43d4956c27 d3d9/tests: Use nameless unions/structs. 2023-08-15 18:56:45 +02:00
Jeff Smith a6d828b367 d3d9/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:52:40 +09:00
Zebediah Figura 5323042f7a wined3d: Add helpers to retrieve shader constants from a wined3d_stateblock. 2023-07-27 11:54:21 +09:00
Alistair Leslie-Hughes fb4d36c661 d3d9: Remove DECLSPEC_HIDDEN usage. 2023-07-11 22:39:35 +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
Zebediah Figura ebaa0a9426 wined3d: Recreate swapchain textures in wined3d_swapchain_resize_buffers().
Instead of using wined3d_texture_update_desc(). This is safe, because:

* ddraw never exposes wined3d textures directly, and always retrieves them
  directly from wined3d when rendering.

* d3d8 and d3d9 (non-extended) will only resize buffers during a reset, and
  resetting is forbidden if the application holds any references to the
  backbuffers. RTVs are also replaced during a reset, so there is no concern
  about retrieving the old RTVs from the device state.

* d3d9ex allows resetting while holding references to the backbuffers, but tests
  (fixed by this patch) show that the backbuffers should in fact be recreated.

* dxgi forbids holding references to back buffers during ResizeBuffers(),
  including indirect references via command lists or device contexts.
2023-06-29 12:04:35 +02:00
Zebediah Figura f97163f4ea d3d9: Hold a reference to the wined3d swapchain from d3d9 swapchain surfaces. 2023-05-10 17:08:48 +02:00
Zebediah Figura eae8705184 d3d9/tests: Add some more tests for accessing an old backbuffer surface after a reset. 2023-05-10 17:08:48 +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
Paul Gofman 8665935e2f wined3d: Add a comment about mismatched samplers. 2023-04-28 20:55:14 +02:00
Stefan Dösinger 4dce49594f d3d9/tests: Accept random depth when using a 3D texture with a 2D sampler. 2023-04-27 22:35:40 +02:00
Stefan Dösinger 32f6fcbf50 d3d9/tests: AMD GPUs sample the border color of cube textures. 2023-04-27 22:35:37 +02:00
Zebediah Figura ba99b0d77b d3d9: Pass the container to d3d9_surface_create(). 2023-04-26 22:49:17 +02:00
Zebediah Figura 7b7195330d d3d9: Create sub-resource surfaces manually.
Move away from using the sub_resource_created callback to do this.

This is also a step away from using the create_swapchain_texture callback.
2023-04-26 22:49:17 +02:00
Zebediah Figura 8a5b4252c8 d3d9: Move surface allocation to d3d9_surface_create().
Renamed from d3d9_surface_init() accordingly.
2023-04-26 22:49:17 +02:00
Stefan Dösinger 830906f3dc d3d9/tests: Accept AMD GPU sysmem sample failure in test_mipmap_upload. 2023-04-25 21:39:07 +02:00
Stefan Dösinger e5f149a81a d3d9/tests: Radeon GPUs don't draw from sysmem textures. 2023-04-25 21:39:07 +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 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 ff752311cd d3d9/tests: Restore the focus window before sending SC_MAXIMIZE to it.
To match d3d8.

The original patch [1] claims

"WM_SIZE(SIZE_MAXIMIZED) is reliable here. The unreliable behavior
occured only with NOWINDOWCHANGES."

but this doesn't match my testing. Probably when that patch was submitted, this
very fix was applied to the d3d8 tests but forgotten for the d3d9 tests, and
then the wrong conclusions were drawn.

[1] https://www.winehq.org/pipermail/wine-patches/2014-December/135964.html
2023-03-03 11:17:02 +01:00
Illia Polishchuk af65f0c9a0 d3d9: Always draw only a single instance for non-indexed draws.
Windows d3d9 always draws only a single instance for non-indexed draws.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54570
2023-03-02 18:08:51 +01:00
Illia Polishchuk 6df6c7fe0c d3d9/tests: Add test for non-indexed instancing drawing.
Windows d3d9 always draws only a single instance for non-indexed draws.
2023-03-02 18:08:49 +01:00
Zebediah Figura 5535d834ee d3d9/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 d9c369c747 wined3d: Load and invalidate every mipmap level when mapping the top mipmap level.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53743
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
2023-01-06 10:40:20 +01:00
Zebediah Figura 2954d3e4a2 d3d9/tests: Test uploading the whole mipmap chain in one map.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
2023-01-06 10:40:19 +01:00
Alexandre Julliard 6a1e2c1b89 d3d9/tests: Fix some activation/focus test failures.
By backporting the corresponding window management tweaks from the
d3d8:device test.
2022-12-22 20:51:24 +01:00