Commit graph

566 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
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 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
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
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
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
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 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 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 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 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 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
Henri Verbeet e2f30db4c2 d3d11/tests: Declare "data_size" as UINT in test_device_context_state().
ID3DDeviceContextState_GetPrivateData() takes an UINT parameter, not a DWORD.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:35:11 +02:00
Francois Gouget 6c25edfe24 d3d11/tests: Fix the spelling of a couple of comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:42 +01:00
Zebediah Figura 301065b1ff d3d11/tests: Don't run the 32-bit tests multithreaded.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 17:31:36 +01:00
Nikolay Sivov a3c65a329e d3d11: Always initialize out view pointer in CreateDepthStencilView().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 20:35:09 +01:00
Nikolay Sivov f467ebadd6 d3d11: Always initialize out view pointer in CreateUnorderedAccessView().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 20:35:06 +01:00
Nikolay Sivov db6d549837 d3d11: Always initialize out view pointer in CreateShaderResourceView().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 20:35:04 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Zebediah Figura ff94b838fd wined3d: Handle structured buffers in wined3d_unordered_access_view_vk_clear().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Henri Verbeet 8305c597b9 d3d11/tests: Add some tests for ID3DUserDefinedAnnotation.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Zebediah Figura 9206277105 d3d11: Report D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER.
This fixes a black screen in The Unfinished Swan.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Zebediah Figura 59636714e7 d3d11: Report D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Stefan Dösinger d741742e32 d3d11/tests: Ignore random WARP failures in test_pipeline_statistics_query.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 18:17:21 +01:00
Stefan Dösinger 36d206008c d3d11/tests: Disable cross-device ContextState tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51103
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 16:19:07 +01:00
Zebediah Figura 0d901c1cf1 d3d11: Implement ID3D11Device1::CreateRasterizerState1().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52294
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 16:19:07 +01:00
Zebediah Figura 7bf9e8382f d3d11: Implement ID3D11RasterizerState1.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 16:19:07 +01:00