Commit graph

1186 commits

Author SHA1 Message Date
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
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
Zebediah Figura a37b16e4af d3d11: Report support for ConstantBufferPartialUpdate.
Microsoft is not exactly clear what this means, but it seems likely it refers to
the ability to bind a range of a constant buffer [i.e. with
ID3D11DeviceContext::*SetConstantBuffers1()] rather than the whole 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-03-11 19:23:28 +01:00
Zebediah Figura 1ca215ea04 d3d11: Report support for MapNoOverwriteOnDynamicConstantBuffer.
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-03-11 19:23:28 +01:00
Matteo Bruni 3dc960c8cc d3d11: Report support for MapNoOverwriteOnDynamicBufferSRV.
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-03-11 19:23:28 +01:00
Zebediah Figura eea57f4ec0 d3d11: Do not print a FIXME for dynamic linking when zero class instances are passed.
Many applications pass a non-NULL array pointer but a count of zero.

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-03-10 18:27:43 +01:00
Zebediah Figura 6a08d902cc d3d11: Do not print a FIXME for dynamic linking in shader retrieval functions.
Many applications call GetShader functions with non-NULL class instance pointers
despite never using dynamic linking, in an apparent attempt to save all device
state.

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-03-10 18:27:43 +01: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