Commit Graph

723 Commits

Author SHA1 Message Date
Giovanni Mascellani
b7c951ba78 tests: Compile HLSL shaders at runtime in test_scissor(). 2023-09-22 11:06:41 +02:00
Giovanni Mascellani
15c5ef5bb5 tests: Compile HLSL shaders at runtime in test_fractional_viewports(). 2023-09-22 11:06:40 +02:00
Giovanni Mascellani
61b403a032 tests: Compile HLSL shaders at runtime in test_unknown_dsv_format(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
264ff9e2da tests: Compile HLSL shaders at runtime in test_unknown_rtv_format(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
b1cae0dd1e tests: Compile HLSL shaders at runtime in test_multiple_render_targets(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
f7354ff9e3 tests: Compile HLSL shaders at runtime in test_create_compute_pipeline_state(). 2023-09-13 23:11:04 +02:00
Evan Tang
f374934281 tests: Test CopyResource depth to color. 2023-08-24 21:43:59 +02:00
Conor McCarthy
1e178efa01 tests/d3d12: Add tests for GetResourceTiling().
Based on vkd3d-proton patches by Philip Rebohle and
Hans-Kristian Arntzen.
2023-07-31 21:07:56 +09:00
Conor McCarthy
31ff1fa9b6 tests: Test releasing the command signature immediately after use.
D3D12 docs are silent on a required lifetime and immediate release
works in Windows.
2023-07-24 22:40:54 +02:00
Conor McCarthy
9014183100 vkd3d: Return a null handle from GetGPUDescriptorHandleForHeapStart() for non-shader-visible heaps. 2023-07-20 22:33:17 +02:00
Conor McCarthy
981034e6e4 tests: Test GetGPUDescriptorHandleForHeapStart() on a non-shader-visible heap. 2023-07-20 22:33:07 +02:00
Conor McCarthy
6835e8176f vkd3d-shader/ir: Normalise signatures and input/output registers to the Shader Model 6 pattern.
In Shader Model 6 each signature element can span a range of register
indices, or 'rows', and system values do not share a register index with
non-system values. Inputs and outputs are referenced by element index
instead of register index. This patch merges multiple signature elements
into a single element under the following conditions:

- The register index in a load or store is specified dynamically by
  including a relative address parameter with a base register index. The
  dcl_index_range instruction is used to identify these.
- A register declaration is split across multiple elements which declare
  different components of the register.
- A patch constant function writes tessellation factors. These are an
  array in SPIR-V, but in SM 5.x each factor is declared as a separate
  register, and these are dynamically indexed by the fork/join instance
  id. Elimination of multiple fork/join phases converts the indices to
  constants, but merging the signature elements into a single arrayed
  element matches the SPIR-V output.

All references to input/output register indices are converted to element
indices. If a relative address is present, the element index is moved up
a slot so it cannot be confused with a constant offset. Existing code
only handles register index relative addressing for tessellation factors.
This patch adds generic support for it.
2023-05-24 22:00:29 +02:00
Nikolay Sivov
f470c00453 tests: Add support for UAV buffers to d3d12 runner.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-22 22:03:36 +02:00
Nikolay Sivov
74c0ad0a7a tests: Rename readback helper to be more generic.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-22 22:03:28 +02:00
Conor McCarthy
7917a68241 tests/d3d12: Test register relative addressing in vertex and pixel shaders. 2023-05-03 21:12:09 +02:00
Conor McCarthy
db7359f36a tests: Test index buffer location zero in test_draw_indexed_instanced().
Only verify it doesn't crash.
2023-04-19 20:46:53 +02:00
Conor McCarthy
5244fa572f tests: Test null addresses in test_update_root_descriptors(). 2023-04-19 20:46:00 +02:00
Conor McCarthy
6db9ed14dc vkd3d: Support 1D UAV. 2023-04-18 22:00:17 +02:00
Conor McCarthy
7d0aaea4f8 tests: Test 1D UAV clear. 2023-04-18 22:00:01 +02:00
Zebediah Figura
94ff9ba5e7 tests: Add a test for readback map stability.
Resident Evil 2 accesses a resource immediately after unmapping it.
2023-04-10 21:00:26 +02:00
Zebediah Figura
dfa4bfdd03 include: Make test context information nestable.
Based on Wine.
2023-04-04 21:59:58 +02:00
Zebediah Figura
8186b75228 tests: Use a pixel shader that consumes SV_Position in test_query_pipeline_statistics().
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.

Cf. 34bd0dd0704c613abef8a9aa3ba2a2507ed02843 in wine.
2023-04-03 18:00:37 +02:00
Giovanni Mascellani
9a27df3a8c tests: Read integer uniforms with strtol() and strtoul().
Because %i sscanf() converters are deprecated, and in practice
clamp to [-2^31, 2^31) on 32 bit.
2023-04-03 18:00:14 +02:00
Conor McCarthy
c87a292f98 tests: Release and then use a heap which contains resources.
The expected use case where a heap is freed before its contained
resources is not reasonably testable, so the ability to place a new
resource is tested instead.
2023-04-03 17:59:43 +02:00
Zebediah Figura
9ea84ae8c9 tests/shader_runner: Use the global test_options structure.
Inspired by a patch by Giovanni Mascellani.
2023-03-10 21:13:05 +01:00
Giovanni Mascellani
c8a05a8b10 tests: Collect D3D12 test options in a dedicated structure. 2023-03-10 21:12:46 +01:00
Zebediah Figura
809a43f06b tests: Add a test for compute thread IDs. 2023-01-25 22:10:30 +01:00
Conor McCarthy
fc652d2b27 tests: Test a typed UAV buffer in test_atomic_instructions().
Until vkd3d-shader is patched, an atomic op on a typed buffer where
StorageImageReadWithoutFormat is available will cause SPIR-V validation
failure, and assertion in Mesa debug builds, because the image will be
declared with Unknown format.
2022-11-21 18:28:42 +01:00
Zebediah Figura
75494a4ae6 tests: Add a basic shader test for compute shaders. 2022-10-19 21:59:29 +02:00
Zebediah Figura
53d6966a5d tests: Mark test_hull_shader_relative_addressing() as broken on radv.
Broken for me with "AMD Radeon RX 560 Series (RADV POLARIS11)" (1002:67ef) but works with llvmpipe; Mesa 22.2.0-rc3.
2022-09-19 21:51:30 +02:00
Zebediah Figura
7393e6ed13 tests: Transition back to D3D12_RESOURCE_STATE_RENDER_TARGET in test_bufinfo_instruction(). 2022-09-19 20:13:57 +02:00
Conor McCarthy
4afe69d04a vkd3d: Send typed UAV unknown format read support info to vkd3d-shader.
Fixes reflections in Control appearing with only their red component.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52146
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
2022-08-09 22:14:28 +02:00
Conor McCarthy
d7554accbc tests: Test float4 UAV buffer load/store.
This currently fails if the shader loads from the UAV, because it causes
vkd3d-shader to specify the R32f format instead of Unknown.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
2022-08-09 22:14:08 +02:00
Giovanni Mascellani
6ff6cb4ed2 tests/shader_runner: Allow probing a single component.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
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-05-31 21:53:26 +02:00
Zebediah Figura
b5e773058c tests: Separate generic and d3d12-specific readback fields.
Move the "resource" field to a new "d3d12_resource_readback" structure
encapsulating struct resource_readback.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-31 21:52:49 +02:00
Conor McCarthy
8cae046803 vkd3d: Map timeline semaphore values to fence virtual values and buffer out-of-order waits.
Strictly increasing timeline values must be mapped to fence virtual values
to avoid invalid use of Vulkan timeline semaphores. In particular, non-
increasing values and value jumps of >= 4G are permitted in d3d12.

Different virtual D3D12 command queues may map to the same Vulkan queue.
If a wait of value N is submitted on one command queue, and then a signal
for >= N is submitted on another, but they are sent to the same Vk queue,
the wait will never complete. The solution is to buffer out-of-order waits
and any subsequent queue commands until an unblocking signal value is
submitted to a different D3D12 queue, or signaled on the CPU.

Buffering out-of-order waits also fixes the old fence implementation so it
is fully functional, though a bit less efficient than timeline semaphores.

Based in part on vkd3d-proton patches by Hans-Kristian Arntzen. Unlike the
vkd3d-proton implementation, this patch does not use worker threads for
submissions to the Vulkan queue.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-13 18:20:10 +02:00
Zebediah Figura
eb2c3b0b90 tests: Test depth comparison sampling with cubemap array textures.
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-04-26 16:02:13 +02:00
Zebediah Figura
08d198ba6f tests: Make test_shader_interstage_interface() into a shader test.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 17:50:22 +02:00
Conor McCarthy
889e5af5dd tests: Test signalling a fence to a lower value after a GPU wait.
Ensures the new fence implementation using timeline semaphores handles
this correctly.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 23:23:15 +01:00
Conor McCarthy
22d8665300 vkd3d: Use Vulkan timeline semaphores for D3D12 fences.
D3D12 supports signalling a fence to a lower value, while Vulkan timeline
semaphores do not. On the GPU side this is handled by simply submitting
the signal anyway, if a test for this passes on device creation, because
working around this is impractical. For CPU signals the Vulkan semaphore
is replaced with a new one at the lower value only if no waits and/or
signals are pending on the GPU. Otherwise, a fixme is emitted.

Partly based on a vkd3d-proton patch by Hans-Kristian Arntzen (not
including the handling of lower fence values).

The old implementation is used if KHR_timeline_semaphore is not
available or GPU signals do not work for a lower value.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 19:47:24 +01:00
Conor McCarthy
2b71ea406f vkd3d: Back descriptor heaps with Vulkan descriptor sets if descriptor indexing is available.
The existing implementation using virtual descriptor heaps, where Vk
descriptor sets are created for the bindings in the root descriptor tables,
is inefficient when multiple command lists are used with large descriptor
heaps. It also cannot support updating a descriptor set after it is bound.

This patch creates Vk sets for each D3D12 heap. Because D3D12 heaps
can contain CBV, SRV and UAV descriptors in the same heap, multiple Vk sets
are needed for each heap, however the total number of populated descriptors
is never more than (heap size + UAV counter count).

A new 'virtual_heaps' config option is introduced to make the old
implementation available when needed. It's not always possible to determine
if this is necessary when the device is created.

Up to nine Vk descriptor sets may be used. It's theoretically possible to
reduce this to eight by placing immutable samplers in the push descriptor
set layout, but contradictions in earlier versions of the Vulkan spec made
driver support inconsistent. The documentation was corrected in version
1.2.203.

This patch also adds support for UAV counter descriptor arrays. It's not
practical to add this in a separate patch due to complications with
combining the old UAV counter implementation with the new descriptor heap
implementation.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47713
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47154
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-18 12:38:53 +01:00
Giovanni Mascellani
500ce146c3 tests: Mark atomic operations as done on AMD.
They seem to work with mesa 21.3.7. Since some developers are
using older releases where the bug is not yet fixed, I am leaving
it marked as a bug.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-17 20:52:30 +01:00
Giovanni Mascellani
90827313f5 tests: Mark NaN conversion as todo on NVIDIA.
D3D mandates that NaN becomes zero when converted to unsigned[1],
while it doesn't look like that SPIR-V's OpConvertFToU has a similar
provision[2]. In practice, this seems to work on AMD and fails on
NVIDIA, where 0x80000000 is produced instead.

 [1] https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm#22.17.4%20dtou
 [2] https://www.khronos.org/registry/SPIR-V/specs/unified1/SPIRV.html#Conversion

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-17 20:52:30 +01:00
Giovanni Mascellani
8efbd4de51 tests: Work around a rounding difference between NVIDIA and AMD.
NVIDIA and AMD round differently the assignment of 0.5f to a UAV
of type R16G16_UNORM. NVIDIA rounds to 0x7fff and AMD to 0x8000.
According to both Vulkan and D3D12 specifications, both values
are acceptable, but the discrepancy currently appears as a
failure on NVIDIA cards.

Work around the issue by using 0.25f instead of 0.5f, which is
rounded as 0x4000 on both implementations.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-17 20:52:30 +01:00
Henri Verbeet
fd28eb8199 tests: Properly compare integers in compare_id().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-01 22:25:14 +01:00
Zebediah Figura
22e6581ffc tests: Add a D3D11 shader runner backend.
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-27 18:00:49 +01:00
Conor McCarthy
31a1026d3e vkd3d/tests: Revert "Enable on vkd3d the tests for ID3D12CommandQueue::Wait().".
This reverts commit 41230b6e76.

The tests can hang and the Wait() implementation has issues.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 10:57:14 +01:00
Conor McCarthy
8727b9a435 tests: Add tests for NULL event handles in SetEventOnCompletion().
Testing this before NULL event handling is patched results in a crash.
Based on a vkd3d-proton patch by Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 22:47:13 +01:00
Conor McCarthy
ecb854c6c1 vkd3d: Add DXGI_FORMAT_UNKNOWN to the array of vkd3d_format objects.
This results in a valid format instead of NULL being returned for
buffers and any other case where DXGI_FORMAT_UNKNOWN is specified.
In some cases invalid use of a buffer or DXGI_FORMAT_UNKNOWN will
not result in E_INVALIDARG, and would need to be tested explicitly
if proven to be an issue.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 17:33:42 +01:00
Conor McCarthy
b93edeccfd tests: Test a texture with format DXGI_FORMAT_UNKNOWN in test_create_committed_resource().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 17:33:39 +01:00
Conor McCarthy
66bc2672a1 vkd3d: Implement ID3D12CommandQueue_GetClockCalibration().
Extends vkd3d_instance_create_info with struct vkd3d_host_time_domain_info
to allow host ticks per second to be changed from the default 10000000.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-18 09:22:56 +01:00
Conor McCarthy
3d044c4453 tests: Add tests for ID3D12CommandQueue_GetClockCalibration().
Based on a vkd3d-proton patch by Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-14 19:28:11 +01:00
Conor McCarthy
2047bfa664 tests: Avoid -Wstringop-overread warnings from GCC 11.1+.
It's technically correct in warning about overwriting the entire
vec4 from the address of .x, if a bit overzealous. It's probably a
good warning to keep enabled.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-14 19:28:09 +01:00
Conor McCarthy
fa8956940c tests: Set the wrong descriptor heaps in test_descriptor_tables().
Has no effect in Windows at least on AMD. Not calling SetDescriptorHeaps()
at all has no effect in Windows on any hardware so this is likely to be
universal too.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-14 19:27:00 +01:00
Conor McCarthy
2566b8dd8c vkd3d: Handle depth/stencil planes in GetCopyableFootprints().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-13 17:21:08 +01:00
Conor McCarthy
c6e46f84df vkd3d/tests: Add tests for GetCopyableFootprints() depth/stencil planes.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-13 17:21:03 +01:00
Conor McCarthy
41230b6e76 vkd3d/tests: Enable on vkd3d the tests for ID3D12CommandQueue::Wait().
The Wait() implementation was added some time ago and these tests succeed.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-13 17:21:00 +01:00
Conor McCarthy
dbd7e18364 vkd3d-shader/spirv: Shift the private variable destination mask instead of the source mask.
Otherwise if the input is located above position 0 in the private array
it will be swizzled incorrectly, e.g. a.yz instead of a.xy in
test_domain_shader_inputs().

Based on a vkd3d-proton patch by Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:27:31 +01:00
Conor McCarthy
5357ab78b9 vkd3d-shader/spirv: Fix the outer tessellation level indices for isoline tessellation.
For isoline tessellation, "density" is specified by OL0, and "detail" by OL1.

Based on a vkd3d-proton patch by Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:27:27 +01:00
Conor McCarthy
462bbfaa74 tests: Add tests for a domain shader using a single patch constant input value.
This specifically tests the case where "count" would end up being one for
arrayed builtins in needs_private_io_variable().

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:27:25 +01:00
Conor McCarthy
db10a63a2e tests: Add tests for domain shader patch constant inputs.
Based on a vkd3d-proton patch by Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:27:22 +01:00
Conor McCarthy
a1df197561 tests: Add a test for an unconditional break instruction at the end of a loop block.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 22:39:54 +01:00
Conor McCarthy
b8ab71e4dc tests: Add a test for exporting SV_StencilRef from a pixel shader.
Based on a vkd3d-proton patch by Philip Rebohle.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-18 18:36:58 +02:00
Conor McCarthy
fed21a1245 vkd3d: Implement output merger logic ops.
Using vk_logic_op_from_d3d12() from a vkd3d-proton patch by Philip
Rebohle.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-18 18:36:56 +02:00
Conor McCarthy
90d564f798 tests: Add tests for output merger logic ops.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-18 18:36:55 +02:00
Conor McCarthy
1edbd3d698 vkd3d: Pass descriptor offset info to vkd3d-shader for compute pipelines.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-15 22:38:15 +02:00
Philip Rebohle
ea1b01b1f8 vkd3d-shader/spirv: Implement texel offset support for sample_c instructions.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-15 22:38:15 +02:00
Conor McCarthy
ebc82a622c tests: Add tests for sample_c texel offsets.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-15 22:38:15 +02:00
Conor McCarthy
a86a681912 vkd3d: Reject 0 sample count textures in d3d12_resource_validate_desc().
Buffers with 0 sample counts were already rejected here.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-15 22:38:15 +02:00
Conor McCarthy
a36dfef004 tests: Add a test for 0 sample count resources to test_create_committed_resource().
Windows returns E_INVALIDARG at least on AMD and Intel.
Psychonauts 2 attempts to create resources with this argument.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-15 22:38:15 +02:00
Conor McCarthy
2bf4539c0d tests: Add tests for d3d12_command_list_IASetVertexBuffers() calls with NULL views.
Part of a vkd3d-proton patch by Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-15 22:38:15 +02:00
Conor McCarthy
832e740248 vkd3d: Reject overflowing descriptor ranges.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-13 22:38:06 +02:00
Conor McCarthy
8239064826 vkd3d: Reject empty descriptor ranges.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-13 22:38:06 +02:00
Conor McCarthy
36f6af1570 tests: Add more tests for invalid descriptor tables.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-13 22:38:06 +02:00
Conor McCarthy
41685c374a tests: Add a UINT_MAX layer count test to test_clear_depth_stencil_view().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-12 18:38:13 +02:00
Conor McCarthy
dbb07a40f8 tests: Add UINT_MAX layer count tests to test_clear_render_target_view().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-12 18:38:09 +02:00
Conor McCarthy
e3495613fb tests: Test a UINT_MAX layer count in test_clear_unordered_access_view_image().
Testing without the fixes in vkd3d_create_texture_uav() has nasty results in
radv and possibly others.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-12 18:38:06 +02:00
Conor McCarthy
0c3fb46a7a tests: Add a test for 5-bit masking of shader bit shift operands.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-12 18:37:51 +02:00
Conor McCarthy
8fbe785c11 tests: Use D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER for constant buffers in test_unbounded_resource_arrays().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-11 21:25:27 +02:00
Conor McCarthy
58b52f6950 tests: Use a bounded range between unbounded ranges in test_unbounded_resource_arrays().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-11 21:25:25 +02:00
Conor McCarthy
821bb0c5cf vkd3d-shader/spirv: Add non-uniform decorations.
Based in part on vkd3d-proton patches by Philip Rebohle and Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-11 21:25:22 +02:00
Giovanni Mascellani
64bd7f677c tests: Mark WriteToSubresource test as todo on NVIDIA.
Similarly to ReadFromSubresource, WriteToSubresource is currently
implemented only for images with linear tiling, which NVIDIA drivers
currently do not support.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 22:27:04 +02:00
Conor McCarthy
104626cc1d vkd3d: Create and write descriptor sets for root signature unbounded ranges.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:28:44 +02:00
Conor McCarthy
d3090699c5 vkd3d: Reject descriptor tables containing register collisions.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:28:41 +02:00
Conor McCarthy
c5fdd2f404 vkd3d: Reject OFFSET_APPEND after unbounded ranges in d3d12_root_signature_info_count_descriptors().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:28:38 +02:00
Henri Verbeet
441d8e24b2 tests: Add root signature tests for unbounded descriptor ranges.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:28:35 +02:00
Conor McCarthy
39ec44f345 tests: Add root signature tests for descriptor register range collisions.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:28:30 +02:00
Zebediah Figura
b1889215ee tests: Add a test for texture load instructions.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 21:09:20 +02:00
Conor McCarthy
ce07710f49 tests: Add tests for an unbounded sampler array.
Based on a vkd3d-proton patch by Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-08 17:41:43 +02:00
Conor McCarthy
9afbe598e9 tests: Add tests for unbounded resource arrays.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-08 17:41:40 +02:00
Conor McCarthy
f3c19dfedb vkd3d-shader: Implement UTOD instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:44:36 +02:00
Conor McCarthy
3623a99cf6 vkd3d-shader: Implement ITOD instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:44:32 +02:00
Conor McCarthy
88c08df03b vkd3d-shader: Implement DTOU instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:44:30 +02:00
Conor McCarthy
c61b573d9c vkd3d-shader: Implement DTOI instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:44:26 +02:00
Conor McCarthy
580747b224 vkd3d-shader: Implement DTOF instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:44:22 +02:00
Conor McCarthy
821389d274 vkd3d-shader: Implement FTOD instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:44:18 +02:00
Conor McCarthy
9cc4b38236 tests: Add a test for the shader DTOF instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 11:38:33 +02:00
Conor McCarthy
00752b8fa6 vkd3d-shader: Implement DMOVC instruction.
Based in part on a vkd3d-proton patch by Joshua Ashton.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 11:38:29 +02:00
Conor McCarthy
c3363faba2 vkd3d-shader: Implement DRCP instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 11:38:27 +02:00
Conor McCarthy
6656a92c45 vkd3d-shader: Implement DDIV instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 11:38:25 +02:00
Conor McCarthy
25b559ba25 vkd3d-shader: Implement DMUL instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 11:38:23 +02:00
Conor McCarthy
408295e336 tests: Add a test for the shader DMUL instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 11:38:18 +02:00
Conor McCarthy
242261bc52 vkd3d-shader: Implement DFMA instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 21:43:40 +02:00
Conor McCarthy
ca82a379f5 tests: Add a test for the shader DFMA instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 21:43:38 +02:00
Conor McCarthy
74a9a0b167 vkd3d-shader: Implement DMIN instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 21:43:36 +02:00
Conor McCarthy
fabadf584f vkd3d-shader: Implement DNE instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 18:21:43 +02:00
Conor McCarthy
4ea3da3067 vkd3d-shader: Implement DLT instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 18:21:41 +02:00
Conor McCarthy
df60cffef1 vkd3d-shader: Implement DGE instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 18:21:38 +02:00
Conor McCarthy
f21510a9fc tests: Add tests for DGE and DLT instructions.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 18:21:36 +02:00
Conor McCarthy
9ffe362641 vkd3d: Use Vulkan descriptor arrays if descriptor indexing is available.
Descriptor indexing is required for its partial binding feature. Separate
buffer and image descriptor arrays are needed for implementing D3D12 SRV and
UAV descriptor ranges, so not all of the Vulkan descriptors will be populated.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 15:57:36 +02:00
Conor McCarthy
1c96f76afc vkd3d: Return E_INVALIDARG if a descriptor range overflows.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 15:57:34 +02:00
Conor McCarthy
50c4e43eaa tests: Test for range overflow in test_root_signature_limits().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 15:57:32 +02:00
Conor McCarthy
eb804a5a9f vkd3d-shader: Implement DADD instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 15:57:27 +02:00
Chip Davis
d44c8e9feb tests: Do not use llabs(3) on an unsigned difference.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 13:01:49 +02:00
Conor McCarthy
4e63842a73 vkd3d-shader: Implement DMOV instruction.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 19:59:03 +02:00
Conor McCarthy
e292351fa9 vkd3d: Return E_INVALIDARG if a heap is too small for a placed resource.
Otherwise vkBindBufferMemory() or vkBindImageMemory() will fail, which
can result in a generic E_FAIL.

Based on a vkd3d-proton patch by Samuel Pitoiset which fixes a GPU hang
with Cyberpunk 2077.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 17:35:45 +02:00
Conor McCarthy
7cd4cf8aba tests: Test a buffer larger than the destination heap.
As per vkd3d-proton commit 72d9b322, E_INVALIDARG should be returned to
indicate the type of failure.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 17:35:42 +02:00
Conor McCarthy
b01104e47d vkd3d-shader: Compute XfbOffset for the slot of the specified element.
Fixes NVIDIA HairWorks GPU crash on Metro Exodus, and test failures
in test_line_tessellation().
Based on a vkd3d-proton patch by Hans-Kristian Arntzen.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 17:35:35 +02:00
Conor McCarthy
8860c4d077 vkd3d: Add support for UAV counters in pixel shaders.
Allows GRID (2019) to run in D3D12 mode.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49107
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 17:35:28 +02:00
Conor McCarthy
2924a481a7 vkd3d-shader: Find bindings for descriptor arrays.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 17:35:01 +02:00
Conor McCarthy
bb0ae18efb tests: Use multiple stream output slots in test_line_tessellation().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 21:11:25 +02:00
Conor McCarthy
59cf70142a vkd3d-shader: Implement DEQ instruction.
Source modifiers and immediate constants are not supported.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 21:11:13 +02:00
Conor McCarthy
76ed601b69 tests: Add tests for a UAV counter in a graphics pipeline.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:14:53 +02:00
Conor McCarthy
3c4163a1b0 tests: Use D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT in test_uav_counters().
CounterOffsetInBytes must be a multiple of the required alignment,
and must be zero if no counter buffer is specified. This allows the
test to succeed in Windows.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:14:41 +02:00
Conor McCarthy
751d9342f5 tests: Delete spurious HLSL source line.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:14:35 +02:00
Conor McCarthy
1a542a4bba tests: Add tests for shader double-precision floating point instructions.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:14:14 +02:00
Henri Verbeet
cd233fe018 tests: Add shader tests for dynamically indexed unbounded resource arrays.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 22:00:11 +02:00
Conor McCarthy
cea28ec77e vkd3d: Pad resource allocation size to allow texture placement at a 64kb alignment.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 01:07:10 +02:00
Conor McCarthy
fdad6a9bde tests: Add test for texture placement with a 64kb alignment.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 01:07:08 +02:00
Conor McCarthy
20e0a241b4 tests: Add offset tests to test_uav_counters().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 21:49:07 +02:00
Henri Verbeet
851afc6229 vkd3d-shader: Support patch constant inputs in tessellation control shader join phases.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
6f12553731 tests: Add a test for patch constant inputs in tessellation control shader join phases.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 16:59:18 +01:00
Henri Verbeet
90216bd478 tests: Add tessellation shader tests to test_clip_distance().
Like the Wine d3d11 test it was originally ported from.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 21:01:52 +01:00
Henri Verbeet
0c73afd424 vkd3d-shader: Implement relative addressing of tessellation control shader inputs.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 22:27:57 +01:00
Henri Verbeet
88fd3b3e1b tests: Add a test for relative addressing of tessellation control shader inputs.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 22:27:55 +01:00
Zebediah Figura
68ef1de6ec tests: Introduce a custom format and parser for shader-based tests.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 21:47:49 +02:00
Henri Verbeet
106c76d45e tests: Use descriptor ranges with multiple descriptors in test_register_space().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 22:01:43 +02:00
Zebediah Figura
f9b66ac55c tests: Test using UAV counters with multiple register spaces.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:05:10 +02:00
Zebediah Figura
5d5a458247 tests: Test multiple register spaces with samplers.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 22:05:28 +02:00
Zebediah Figura
6ac880da10 tests: Test multiple register spaces.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 22:05:23 +02:00
Conor McCarthy
91555883ac vkd3d: Add stub for ID3D12GraphicsCommandList2::WriteBufferImmediate().
ID3D12GraphicsCommandList2 and WriteBufferImmediate() are used by
Hitman 2, but implementing the function on top of an AMD extension has
no effect on game behaviour. It's commonly used to write debug info.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:11:15 +01:00
Conor McCarthy
0d43c776c5 vkd3d/tests: Add tests for ID3D12GraphicsCommandList2::WriteBufferImmediate().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 20:11:13 +01:00
Conor McCarthy
a303482acc vkd3d/tests: Add and modify tests for GetResourceAllocationInfo().
Test large DepthOrArraySize for small resources, and test compressed
textures at the 64KB limit.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:08:39 +01:00
Conor McCarthy
23c4dc26e2 vkd3d/tests: Add tests for block-compressed texture dimensions.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:08:35 +01:00
Philip Rebohle
a204a681a1 vkd3d: Handle DXGI_FORMAT_R11G11B10_FLOAT in d3d12_command_list_ClearUnorderedAccessViewUint().
There is no bit-compatible UINT format, so we'll use DXGI_FORMAT_R32_UINT.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 16:07:07 +01:00
Philip Rebohle
207ca12725 vkd3d: Re-implement d3d12_command_list_ClearUnorderedAccessViewUint().
Addresses the following limitations of the previous implementation:
    - Only R32_{UINT,TYPELESS} were supported for buffers.
    - Clearing an image UAV did not behave correctly for images with non-UINT formats.
    - Due to the use of transfer operations, extra memory barriers were needed.

If necessary, this will create a temporary view with a bit-compatible
UINT format for the resource in order to perform a bit-exact clear.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 16:07:04 +01:00
Philip Rebohle
126a789019 vkd3d: Implement d3d12_command_list_ClearUnorderedAccessViewFloat().
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 16:06:59 +01:00
Philip Rebohle
736dd8203d tests: Add a test for image UAV clears.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 22:04:46 +01:00
Philip Rebohle
f7f6073436 tests: Test more view formats in the UAV clear test.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 22:04:44 +01:00
Derek Lesho
1d955506a3 vkd3d: Implement d3d12_device_GetCustomHeapProperties().
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 21:07:18 +01:00