Commit graph

1723 commits

Author SHA1 Message Date
Alex Henrie 6db89702a3 d3d8/tests: Use CRT allocation functions. 2023-10-31 18:48:30 +01:00
Alex Henrie a70e3059c6 d3d8: Use CRT allocation functions. 2023-10-31 18:48:24 +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 48a4f670d1 d3d8/tests: Mark the hidden test WM_WINDOWPOSCHANGED test flaky. 2023-09-14 11:13:50 +02:00
Stefan Dösinger 7bbf29644c d3d8/tests: Fix skipping ATI2N in test_resource_access. 2023-09-14 11:13:36 +02:00
Stefan Dösinger b3e98cadfa d3d8/tests: Zero stride tests crash on Windows XP, r200 GPU. 2023-09-14 11:13:33 +02:00
Stefan Dösinger 763dc06450 d3d8/tests: Don't check messages when doing the minimization workaround dance. 2023-09-08 11:29:22 +02:00
Alexandre Julliard 20afe43832 Remove unused NONAMELESS defines. 2023-08-15 18:56:45 +02:00
Alexandre Julliard 8d86c6d9d9 d3d8/tests: Use nameless unions/structs. 2023-08-15 18:56:45 +02:00
Jeff Smith f6f25c5ed1 d3d8/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:38 +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 6f8be72bd8 d3d8: Remove DECLSPEC_HIDDEN usage. 2023-07-11 22:39:35 +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
Sebastian Mayr 7a2b34c324 wined3d: Improve d3d8 compatibility of texture filters.
In d3d8, setting texture filters to invalid values does not yield an
error when calling IDirect3DDevice8::ValidateDevice. Some applications,
such as Worms Blast, rely on this behaviour.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54898
2023-05-18 15:40:17 -05:00
Sebastian Mayr 38f3f83943 d3d8/tests: Test IDirect3DDevice8::ValidateDevice() with various min, mag and mip filters.
This test is an adaptation of the corresponding d3d9 test.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54898
2023-05-18 15:40:14 -05:00
Zebediah Figura 3ba9a7f7b4 d3d8: Hold a reference to the wined3d swapchain from d3d8 swapchain surfaces. 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
Zebediah Figura fd3d4d0a93 d3d8: Pass the container to d3d8_surface_create(). 2023-05-04 18:44:48 +02:00
Zebediah Figura 9a6d889b41 d3d8: Create sub-resource surfaces manually. 2023-05-04 18:44:48 +02:00
Zebediah Figura e0828a70b2 d3d8: Move surface allocation to d3d8_surface_create().
Renamed from d3d8_surface_init() accordingly.
2023-05-04 18:44:46 +02:00
Stefan Dösinger 60adbec765 d3d8/test: Accept AMD GPU sysmem sample failure in test_mipmap_upload. 2023-04-25 21:39:07 +02:00
Stefan Dösinger e39c497559 d3d8/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
Francois Gouget d3c32ccfe1 d3d8/tests: Remove an unused call to IDirect3D8_GetAdapterDisplayMode().
It is no longer used now that test_fpu_setup() uses create_device().
2023-03-14 18:34:34 +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 45f69f73bf d3d8/tests: Do not check for WM_MOVE in sc_maximize_messages. 2023-03-03 11:17:02 +01:00
Zebediah Figura 5287d375a6 d3d8/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 379ae701c0 d3d8: Filter out redundant buffer discards.
I was unable to write tests for this; it seems it doesn't consistently work on
Windows. However, Rayman 3 seems to rely on it; it maps the same buffer twice
immediately after creation, with DISCARD flags on both maps, and expects the
same address to be returned.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53752
2023-01-06 13:39:45 +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 798b23d971 d3d8/tests: Test uploading the whole mipmap chain in one map.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
2023-01-06 10:40:20 +01:00
Alexandre Julliard 9761191f1c d3d8/tests: Make sure that the window has focus before testing loss of focus. 2022-12-20 22:37:02 +01:00
Alexandre Julliard 971ef0d3b3 d3d8/tests: Don't require WM_MOVE on window reactivation.
It can be activated without moving.
2022-12-20 22:37:02 +01:00
Alexandre Julliard 28eafda808 d3d8/tests: Mark a zero-size pixel test as todo.
It fails on the Gitlab CI.
2022-12-19 22:25:19 +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
Zebediah Figura 52c35814be d3d8: Build without -DWINE_NO_LONG_TYPES. 2022-11-09 21:23:48 +01:00
Zebediah Figura 9b62f5e57f wined3d: Add a dirty rect to managed textures when resetting.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53798
2022-11-09 21:23:48 +01:00
Zebediah Figura e4d37a452f d3d8/tests: Test drawing from a managed texture after Reset(). 2022-11-09 21:23:48 +01:00
Paul Gofman 4d4a4ff5b9 d3d8/tests: Add test for NULL hDeviceWindow in presentation parameters. 2022-10-11 11:43:39 +02:00
Zebediah Figura ec6b6f38be d3d8: Use a separate draw texture for managed resources. 2022-10-10 11:03:57 +02:00
Zebediah Figura 520daf8630 d3d8: Add reference counting helpers for textures. 2022-10-10 11:03:57 +02:00
Zebediah Figura 99cee90c19 d3d8: Introduce a d3d8_texture_preload() helper. 2022-10-10 11:03:57 +02:00
Zebediah Figura a72e2613ae d3d8: Factor out d3d8_texture_init(). 2022-10-10 11:03:57 +02:00
Zebediah Figura 3178e9095b wined3d: Add a dirty region to the destination texture in wined3d_device_context_blt() if applicable. 2022-09-13 22:07:22 +02:00
Zebediah Figura fdd8c0748b d3d8: Remove an incorrect comment.
This was probably added on the assumption that
IDirect3DDevice8::CopyRects() behaves like the similar
IDirect3DDevice9::UpdateSurface(), but it does not.
2022-09-13 22:07:22 +02:00
Matteo Bruni 1f8431658e wined3d: Introduce WINED3DUSAGE_MANAGED.
We would like to use two different textures for the CPU and GPU parts of managed
textures, which means that wined3d_resource_access_is_managed() as such will no
longer be useful.
2022-08-16 22:27:53 +02:00
Zebediah Figura 6db6df95dc d3d8: Introduce a wined3d_usage_from_d3d() helper. 2022-08-16 22:27:53 +02:00
Zebediah Figura ae05de2c4f d3d8/tests: Add tests for D3DLOCK_NO_DIRTY_UPDATE with vertex buffers. 2022-08-16 22:27:53 +02:00
Zebediah Figura ddfd9ea5ab d3d8/tests: Add more tests for dirty rect handling. 2022-08-15 18:11:11 +02:00
Zebediah Figura 01baee8c60 d3d8/tests: Read back directly from the specified surface if possible. 2022-08-15 18:11:11 +02:00
Zebediah Figura c90c226c16 d3d8/tests: Expand tests for valid pools in UpdateTexture(). 2022-08-15 18:11:10 +02:00