Commit graph

1222 commits

Author SHA1 Message Date
Zebediah Figura 58c680bace wined3d: Recreate buffer textures when renaming the existing buffer storage.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56438
2024-03-26 22:26:51 +01:00
Zebediah Figura 4e13c72f70 d3d11/tests: Test discarding a buffer in test_high_resource_count(). 2024-03-26 22:26:50 +01:00
Andrew Wesie f6a1844dbe wined3d: Use bindless textures for GLSL shaders if possible.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44514
Signed-off-by: Andrew Wesie <awesie@gmail.com>
2024-03-14 10:16:34 +01:00
Zebediah Figura a81bcbe0a9 d3d11/tests: Add a test for using a large number of SRV resources. 2024-03-14 10:16:32 +01:00
Zebediah Figura dc15413585 d3d11/tests: Add a test for shader stencil export.
Ported from b8ab71e4dc in vkd3d by Conor McCarthy.
2024-01-26 23:47:05 +01:00
Zebediah Figura 775812ab11 d3d11: Report support for shader stencil export if available. 2024-01-26 23:47:04 +01:00
Zebediah Figura a586fd080d d3d11: Implement D3D11_FEATURE_D3D11_OPTIONS2. 2024-01-26 23:47:04 +01:00
Zebediah Figura d9342e85db d3d11core/tests: Mark a test as no longer todo.
This was fixed by ef2908462d.
I misremembered when writing that commit's message; we don't actually invalidate
STATE_SAMPLER when binding an SRV. Hence the code was not just "fragile" but in
fact already broken.
2023-12-05 21:24:37 +01:00
Zebediah Figura 15aca90537 d3d11/tests: Use slightly different values in test_sample_c_lz().
For some arcane reason the native AMD driver on Windows seems to fail to clear (or read from?) layer 0. Work around that by using 0.0 there.
2023-11-07 11:05:43 +01:00
Zebediah Figura 1240b27543 d3d11/tests: Do not test GSInvocations in test_pipeline_statistics_query(). 2023-11-07 11:05:41 +01:00
Zebediah Figura 78cbd9a497 d3d11/tests: Do not test the w component for DXGI_FORMAT_B8G8R8X8_UNORM in test_vertex_formats().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54399
2023-11-07 11:05:36 +01:00
Jacek Caban 6119d1d3fa d3d11/tests: Use D3D11_INPUT_CLASSIFICATION variant of D3D10_INPUT_CLASSIFICATION. 2023-11-07 11:04:20 +01:00
Jacek Caban 6555245279 d3d11: Explicitly convert enums in d3d_depthstencil_state_create. 2023-11-07 11:04:20 +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 f2d1734794 d3d11/tests: Use CRT allocation functions. 2023-10-31 18:48:17 +01:00
Zebediah Figura 552a46ea78 d3d11/tests: Avoid POINT sampling exactly halfway between two mip levels.
This gives different results on llvmpipe.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53213
2023-10-23 07:37:17 -05:00
Etaash Mathamsetty 627181d99c gdi32: Add stub for D3DKMTQueryAdapterInfo. 2023-10-09 11:37:49 +02:00
Henri Verbeet d8c3b778a5 d3d11/tests: Properly mark the indexed sample position test as succeeding with the Vulkan backend.
It almost works as-is; we set "sample_shading" to FALSE when running with the
Vulkan backend, which causes the "(1024 <= data && data <= 1056)" test to be
applied, which fails and avoids a "Test succeeded inside todo block" result.
It'll mark the tests as a todo though, while it actually succeeds.
2023-09-20 22:15:29 +02:00
Evan Tang ab9e4dd3fa wined3d: Restart vk render pass on RT clear. 2023-09-05 23:10:22 +02:00
Evan Tang 8de2846c73 d3d11: Add tests for clearing RTs in the middle of a render. 2023-09-05 23:10:22 +02:00
Alexandre Julliard e293a6c669 d3d11/tests: Use nameless unions/structs. 2023-08-15 18:56:45 +02:00
Nikolay Sivov f7157408f2 d3d11/tests: Fix typos in a test cleanup (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-10 09:52:58 +09:00
Jeff Smith c29459c901 d3d11/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:36 +09:00
Paul Gofman e195aafe54 d3d11/tests: Add basic tests for keyed mutexes. 2023-08-05 10:43:24 +09:00
Zebediah Figura 9a19e34bf8 d3d11/tests: Mark test failures specific to the Vulkan or GL renderers. 2023-07-27 11:54:21 +09:00
Alistair Leslie-Hughes 8f360d7434 d3d11: Remove DECLSPEC_HIDDEN usage. 2023-07-20 21:48:39 +02:00
Paul Gofman 4de67d8771 d3d11/tests: Add basic test for shared resources. 2023-07-11 18:34:17 +02:00
Zebediah Figura fdd64782ff d3d11/tests: Use more aligned offsets in test_clear_buffer_unordered_access_view().
Creating a view with an unaligned offset is legal in d3d and
apparently works, both on Windows and Linux, but may violate the
Vulkan specification:

VUID-VkBufferViewCreateInfo-offset-00926(ERROR / SPEC): msgNum: -833749292 - Validation Error: [ VUID-VkBufferViewCreateInfo-offset-00926 ] Object 0: handle = 0x3c000000003c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xce4dfed4 | vkCreateBufferView(): VkBufferViewCreateInfo offset (36) must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment (16). The Vulkan spec states: offset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment (https://www.khronos.org/registry/vulkan/specs/1.2-khr-extensions/html/vkspec.html#VUID-VkBufferViewCreateInfo-offset-00926)

Without any reason to test unaligned buffer views here, just resolve this by changing the test.
2023-06-27 22:14:15 +02:00
Zebediah Figura 0135114951 d3d11/tests: Read back directly from the mipmap texture in test_generate_mips().
This is far simpler than drawing with it.

The immediate motivation here is that the DXGI_FORMAT_R8G8B8A8_UINT test causes
a validation error when drawing, since the shader declares its resource as a
float4 texture, which does not match the UINT view format. This could be fixed
by using a different shader, but it seems more prudent to just simplify the test
to not draw at all.
2023-06-27 11:58:15 +02:00
Zebediah Figura 30a7487b70 d3d11: Hold a reference to the wined3d swapchain from d3d11 swapchain textures. 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 7b7d26a731 dxgi: Create d3d11 swapchain textures directly from d3d11_swapchain_init().
Using the IWineDXGIDeviceParent::swapchain_texture_created() callback.
2023-04-26 22:49:17 +02:00
Zebediah Figura 4413e94908 dxgi: Introduce IWineDXGIDeviceParent::register_swapchain_texture() and use it in IDXGIDevice::CreateSurface().
Instead of having d3d11 create the wined3d texture, create it in dxgi instead,
and let d3d11 create a d3d_texture2d object to wrap it.

This is a step towards getting rid of the create_swapchain_texture() callback,
which is mildly difficult to work with and conceptually complex.
2023-04-26 22:49:17 +02:00
Zebediah Figura bb351c7a78 d3d11/tests: Add a broken() case for WARP in test_occlusion_query().
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53252
2023-03-29 22:29:37 +02:00
Henri Verbeet 890877f145 d3d11: Get rid of the DXBC tag definitions.
These have been unused for a while now.
2023-03-14 18:34:22 +01:00
Zebediah Figura 80bb094e4a d3d11: Expand tests for IDXGIResource. 2023-02-14 20:57:09 +01:00
Michael Stefaniuc b0e65dbe50 d3d11/tests: Actually test the return of CreateRasterizerState(). 2023-02-06 10:33:49 +01:00
Zebediah Figura bb82bc78f4 wined3d: Use a string channel desc to initialize typed formats.
Avoid the need for manually set type attributes, and initialize the component
count for all such formats.

This fixes use of R11G11B10_FLOAT as a vertex attribute format with the GL
backend. Since it has no corresponding typeless format, prior to this commit the
component count was uninitialized and hence use of the format would result in a
GL error.

This fixes a GL error with Dark Souls Remastered. I did not immediately observe
any corresponding rendering errors, however.
2023-01-24 18:17:41 +01:00
Zebediah Figura dc19f5c517 d3d11/tests: Add a basic test for vertex formats. 2023-01-24 18:17:41 +01:00
Conor McCarthy 696515d8d4 d3d11: Apply the 'KEEP' options when sending RTVs and UAVs to wined3d.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53761
2023-01-13 11:17:14 +01:00
Zebediah Figura e7c46ac6b5 d3d11/tests: Do not test deferred contexts in test_dynamic_map_synchronization().
DISCARD maps on deferred contexts do not seem to offer the same synchronization
guarantees as do DISCARD maps on the immediate context, at least not with
respect to subsequent NOOVERWRITE maps on the immediate context. This is not
particularly surprising, seeing as it is probably far more usual to only map a
resource on one kind of context or the other.

The test currently fails on Windows 11 on NVidia drivers, but it also fails on
Mesa, for what I think are the same reasons.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52563
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54023
2023-01-06 10:39:12 +01:00
Eric Pouech 623bc9fa54 d3d11/tests: Introduce a clear_uav() helper.
This fixes warnings with gcc 12.2.

(Copycat of 5fa25d00 about clear_rtv())

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-11-15 21:56:01 +01:00
Zebediah Figura d89a017056 d3d11/tests: Use a pixel shader that consumes SV_Position in test_pipeline_statistics_query().
Some drivers (AMD Radeon RX 6700 XT, with radeonsi from Mesa 22.2.0-rc3) emit
less than one invocation per pixel, presumably because they detect that the
shader control flow is uniform for all pixels. Having the control flow depend on
SV_Position avoids this test failure.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
2022-09-21 21:26:03 +02:00
Eric Pouech 5fa25d00d7 d3d11/tests: Introduce a clear_rtv() helper.
This fixes warnings with gcc 12.2.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-09-15 22:33:42 +02:00
Henri Verbeet e5f5bea390 d3d11/tests: Move the is_warp_device() call out of the loop in check_format_support().
There's no point in querying this multiple times, it's not going to change.

Perhaps more importantly, calling is_warp_device() inside a todo_wine block
will cause "Test succeeded inside todo block: ..." messages from
get_device_adapter_desc(). These appear to have been introduced by commit
fcc276ecb1. Arguably get_device_adapter_desc()
shouldn't use ok() in the first place.
2022-09-15 22:33:18 +02:00
Henri Verbeet 7d20333faf d3d11: Implement d3d11_input_layout_to_wined3d_declaration() on top of vkd3d_shader_parse_input_signature().
This was originally prompted by the fact that
wined3d_extract_shader_input_signature_from_dxbc() allocates elements with
HeapAlloc(), but d3d11_input_layout_to_wined3d_declaration() attempts to free
them with free(). That's a regression introduced by commit
b951c37b87. Since we're touching the code
though, we may as well use vkd3d_shader_parse_input_signature(), and get rid
of wined3d_extract_shader_input_signature_from_dxbc().
2022-09-15 22:33:10 +02:00
Zebediah Figura b34b5da644 d3d11: Implement D3D11_FEATURE_FORMAT_SUPPORT.
This allows Guild Wars 2 to start.
2022-08-16 22:27:53 +02:00
Zebediah Figura 74ad023154 d3d11: Always return E_FAIL for formats which have no support flags. 2022-08-16 22:27:53 +02:00
Zebediah Figura 2208ec0851 d3d11/tests: Use winetest_push_context() to print explicit feature levels. 2022-08-16 22:27:53 +02:00