Commit graph

1198 commits

Author SHA1 Message Date
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
Paul Gofman 2a9af6ae3b d3d11: Validate layout description in d3d_input_layout_create(). 2022-08-12 22:13:43 +02:00
Nikolay Sivov b951c37b87 d3d11: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-22 19:56:59 +02:00
Zebediah Figura c59d25d3ae d3d11: Check for WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING with WINED3D_RTYPE_TEXTURE_2D.
This fixes rendering in Raft.
2022-06-24 21:05:25 +02:00
Zebediah Figura fcc276ecb1 d3d11/tests: Add tests for D3D11_FORMAT_SUPPORT_BLENDABLE. 2022-06-24 21:05:25 +02:00
Nikolay Sivov f6f66661b3 d3d11: Remove null dxgi object checks.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-20 23:26:50 +02:00
Nikolay Sivov 5beba20e8f d3d11: Create dxgi resource objects for buffers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-15 21:44:47 +02:00
Nikolay Sivov 204126ec4c d3d11: Create dxgi resource object for 3D textures.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-15 21:44:47 +02:00
Nikolay Sivov 9b220b8079 d3d11: Always use dxgi resource private store for 1D and 2D textures.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-15 21:44:47 +02:00
Nikolay Sivov 0492f8cf0d d3d11: Add a helper to create DXGI resource objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-15 21:44:47 +02:00
Nikolay Sivov 184ff3bfbb dxgi: Create DXGI resource object, optionally supporting surface interfaces.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-15 21:44:47 +02:00
Nikolay Sivov bf8171a3a9 d3d11/tests: Add some tests for IDXGIResource support.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-15 21:44:46 +02:00
Nikolay Sivov 4ecf938d67 d3d11: Do not return uninitialized values on Map() failure.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-08 10:49:33 +02:00
Nikolay Sivov 7d7d166233 d3d11: Always initialize out shader pointer in CreateComputeShader().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-05-27 23:16:55 +02:00
Nikolay Sivov 72046ad7c4 d3d11: Always initialize out shader pointer in CreateDomainShader().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-05-27 23:16:55 +02:00
Nikolay Sivov 1a869de187 d3d11: Always initialize out shader pointer in CreateHullShader().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-05-27 23:16:55 +02:00
Nikolay Sivov 3dd9a78a1a d3d11: Always initialize out shader pointer in CreatePixelShader().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-05-27 23:16:55 +02:00
Nikolay Sivov 6c81816525 d3d11: Always initialize out shader pointer in CreateGeometryShaderWithStreamOutput().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-05-27 23:16:55 +02:00
Nikolay Sivov ec8f304bcf d3d11: Always initialize out shader pointer in CreateGeometryShader().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-05-27 23:16:55 +02:00
Nikolay Sivov be4a332e47 d3d11: Always initialize out shader pointer in CreateVertexShader().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-05-27 23:16:55 +02:00
Zebediah Figura ab88f9b518 d3d11/tests: Add a test for 2D partial RTV slices of a 3D texture.
This succeeds with the Vulkan renderer.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-24 12:12:57 +02:00
Chip Davis ff80861b4f d3d11: Implement ID3D11Device1::CreateBlendState1().
Signed-off-by: Chip Davis <cdavis5x@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Chip Davis 5bdccb53ad d3d11/tests: Test logic op.
Signed-off-by: Chip Davis <cdavis5x@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Eric Pouech 46aa3fafaa d3d11: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:35:27 +02:00
Eric Pouech 0a31c4058d d3d11/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:35:17 +02:00