Commit Graph

1586 Commits

Author SHA1 Message Date
Józef Kucia
c6477964a3 vkd3d-shader: Translate eval_centroid shader instructions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:53:29 +01:00
Józef Kucia
38f5081496 vkd3d-shader: Translate eval_sample_index shader instructions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:53:27 +01:00
Józef Kucia
6c141d7457 tests: Introduce assert_that().
This allows us to put a bug_if() or todo_if() in the front of functions
that check other conditions not directly related to the actual test.

assert_that() is similar to ok(). The main difference is that it ignores
bug_if() and todo_if().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 19:17:29 +01:00
Józef Kucia
b0c8561cff vkd3d: Fix feature queries for depth/stencil formats.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 19:17:27 +01:00
Józef Kucia
f1bfb1305e vkd3d: Update command list to ID3D12GraphicsCommandList1.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:14 +01:00
Józef Kucia
d0f8443ac5 vkd3d: Do not crash on NULL views in IASetIndexBuffers().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:12 +01:00
Józef Kucia
a844d8f0a8 vkd3d: Validate image views before creating framebuffers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:10 +01:00
Józef Kucia
fd48757d25 vkd3d: Allow more memory types for custom heaps.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:08 +01:00
Józef Kucia
3629787aad vkd3d: Add more formats.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:06 +01:00
Józef Kucia
cb2a9b2611 tests: Use vkd3d_test_set_context() in test_null_cbv().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:42 +01:00
Józef Kucia
1941491823 tests: Add test for hull shader fork phase.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:41 +01:00
Józef Kucia
19f9745adf vkd3d-shader: Use epilogue functions for fork and join phases.
In order to handle packed outputs properly.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:39 +01:00
Józef Kucia
74c8ca0f64 vkd3d-shader: Add basic support for vocp registers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:37 +01:00
Józef Kucia
7fc98ade64 vkd3d-shader: Use SPIR-V built-ins for hull shader inputs.
I missed this case before because apps don't seem to use SV_Position
for hull shader inputs. vkd3d_siv_from_sysval() needs to be restored
for hull shaders.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:34 +01:00
Józef Kucia
67a160683d vkd3d-shader: Take into account dst write mask for scalar stores.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:32 +01:00
Józef Kucia
702cdccf53 tests: Get rid of vk_driver_id static variable.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:31 +01:00
Józef Kucia
68222e458d tests: Implement --adapter option for Vulkan tests.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:29 +01:00
Józef Kucia
f640602ce8 vkd3d: Add feature level 11_1.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:27 +01:00
Józef Kucia
38e3c5d2d3 vkd3d: Rework Vulkan queues initialisation.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:25 +01:00
Józef Kucia
f4ba057279 tests: Skip DXGI_FORMAT_R24G8_TYPELESS tests on radv.
Allows running all tests cleanly on radv. We have to implement formats
emulation in vkd3d to fix the test.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:35 +01:00
Józef Kucia
af50b9d2a0 tests: Mark driver-specific test failures as bugs.
Allows running all tests cleanly on Intel and Nvidia.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:31 +01:00
Józef Kucia
e36024c87d tests: Print driver info from VK_KHR_driver_properties.
In preparation for the next commit.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:24 +01:00
Józef Kucia
085456005c vkd3d: Set Vulkan object names for NULL CBV resources.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:20 +01:00
Józef Kucia
f91422eb40 tests: Accumulate coverage mask from all fragments.
Clipping may divide the triangle and produce multiple fragments per
pixel.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:16 +01:00
Józef Kucia
7858eb6a83 vkd3d: Prefer cached memory for readback heaps.
Reading uncached memory is slow.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:12 +01:00
Józef Kucia
e20ddc48a6 tests: Add basic test for NULL CBV descriptors.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:09 +01:00
Józef Kucia
401739a387 vkd3d: Emulate NULL CBV descriptors.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:05 +01:00
Józef Kucia
02ca005ada vkd3d: Use vkCmdResolveImage() to resolve typeless resources if possible.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 16:37:52 +01:00
Józef Kucia
98d89c09fe tests: Fix domain shader code in test_tessellation_dcl_index_range().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:23 +01:00
Józef Kucia
5bfd2b8ed4 tests: Add test for hull shader control point phase.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:21 +01:00
Józef Kucia
0ffaf4a2b7 vkd3d-shader: Introduce is_control_point_phase() helper.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:19 +01:00
Józef Kucia
ff132543c1 vkd3d-shader: Index control point phase outputs by InvocationId.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:16 +01:00
Józef Kucia
0328118947 vkd3d-shader: Handle partial shader output updates in epilogue functions.
Fork and join phases quite often write only a few components of an
output variable.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:14 +01:00
Józef Kucia
bc441fd6c6 vkd3d-shader: Add more advanced helper for vector shuffle.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:10 +01:00
Józef Kucia
6c70edf511 vkd3d-shader: Remove output register symbols while leaving control point phase.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:08 +01:00
Józef Kucia
9eebb38e56 tests: Add test for SV_RenderTargetArrayIndex in pixel shader.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:01 +01:00
Józef Kucia
b277b12f5f tests: Add test for vkd3d shader function pointers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:08:08 +01:00
Józef Kucia
d96076a919 include: Add typedefs for vkd3d-shader function pointers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:08:06 +01:00
Józef Kucia
02cbc53b96 vkd3d-shader: Get rid of vkd3d_dxbc_compiler_emit_swizzle_ext().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:08:05 +01:00
Józef Kucia
cb24be8e83 vkd3d-shader: Do not assume float type for arrayed shader outputs.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:08:03 +01:00
Józef Kucia
04e2091afa vkd3d-shader: Do not assume vec4 destination in vkd3d_dxbc_compiler_emit_store().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:08:01 +01:00
Józef Kucia
95b6d5222d vkd3d-shader: Call vkd3d_dxbc_compiler_leave_shader_phase() also for last phase.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:59 +01:00
Józef Kucia
38f75846b4 vkd3d-shader: Emit epilogue functions while leaving shader phases.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:57 +01:00
Józef Kucia
61aeaae0c2 vkd3d-shader: Factor out vkd3d_dxbc_compiler_emit_store().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:55 +01:00
Józef Kucia
64f7ff3898 vkd3d-shader: Merge ifs in vkd3d_dxbc_compiler_emit_swizzle_ext().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:52 +01:00
Philip Rebohle
c560fdfa26 vkd3d-shader: Decorate integer fragment shader builtins as flat.
From the Vulkan spec, 8.13 "Interpolation Decorations":

    Fragment shader inputs that are signed or unsigned integers,
    integer vectors, or any double-precision floating-point type
    must be decorated with Flat.

This also matches glslang behaviour.

Specifically, this fixes tone-mapping in Unreal Engine 4 on RADV
and AMDGPU-PRO, where gl_Layer is used as a fragment shader input.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:50 +01:00
Józef Kucia
d1e0ac115c vkd3d-shader: Avoid generating unique array types for immediate constant buffers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:44 +01:00
Józef Kucia
992dfb1a55 tests: Add more tessellation tests.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:42 +01:00
Józef Kucia
a0069d9fb7 vkd3d-shader: Use correct base index for relative addressing of aggregates.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:39 +01:00
Józef Kucia
d300e6f84c vkd3d-shader: Remove v{Fork, Join}InstanceID from symbol table when leaving shader phase.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:37 +01:00