Henri Verbeet
56b2f56b86
Release 1.5.
2022-09-21 16:47:49 +02:00
Henri Verbeet
d484a08d10
vkd3d-shader: Add version information to enum vkd3d_shader_compile_option_typed_uav.
2022-09-21 16:47:49 +02:00
Henri Verbeet
6381bc4857
vkd3d-shader: Add a VKD3D_FORCE_32_BIT_ENUM element to enum vkd3d_shader_api_version.
2022-09-21 16:47:49 +02:00
Henri Verbeet
1e559cd51d
vkd3d: Add a VKD3D_FORCE_32_BIT_ENUM element to enum vkd3d_api_version.
2022-09-21 16:47:47 +02:00
Zebediah Figura
b7c94b0213
tests: Check for failure from init_test_context() in the d3d11 runner.
2022-09-19 21:51:30 +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
Francisco Casas
8e07423ba1
vkd3d-shader/hlsl: Add offset parameter to 'Load' method.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
609632279f
vkd3d-shader/hlsl: Properly check argument count in gather methods.
2022-08-23 15:57:54 -05:00
Francisco Casas
32e6f594f2
vkd3d-shader/hlsl: Properly check argument count in SampleLevel method.
...
Also, TextureCube and TextureCubeArray don't support the offset
argument, so this check is updated here too.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
15b19b15c0
vkd3d-shader/hlsl: Use proper dimensions on SampleLevel method offset parameter.
2022-08-23 15:57:54 -05:00
Francisco Casas
c4be4a4ebf
vkd3d-shader/hlsl: Properly check argument count in Sample method.
...
Also, TextureCube and TextureCubeArray don't support the offset
argument, so this check is updated.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
562f647c2a
vkd3d-shader/hlsl: Use proper dimensions on gather methods offset parameter.
2022-08-23 15:57:54 -05:00
Francisco Casas
652906aea7
vkd3d-shader/hlsl: Use proper dimensions on Sample method offset parameter.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Zebediah Figura
d6f45b730f
vkd3d-shader/hlsl: Parse the SampleLevel method.
2022-08-23 15:57:54 -05:00
Francisco Casas
3d9baef321
vkd3d-shader/hlsl: Support initialization of implicit size arrays.
...
HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT (zero) is used as a temporal value
for elements_count for implicit size arrays.
This value is replaced by the correct one after parsing the initializer.
In case the implicit array is not initialized correctly, hlsl_error()
is called but the array size is kept at 0. So the rest of the code
must handle these cases.
In shader model 5.1, unlike in 5.0, declaring a multi-dimensional
object-type array with the last dimension implicit results in
an error. This happens even in presence of an initializer.
So, both gen_struct_fields() and declare_vars() first check if the
shader model is 5.1, the array elements are objects, and if there is
at least one implicit array size to handle the whole type as an
unbounded resource array.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
96a7236700
vkd3d-shader/hlsl: Set objects' register size back to 0.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
6989266e76
vkd3d-shader/hlsl: Check for non-static object references.
...
It is responsibility of the shader's programmer to ensure that
object references can be solved statically.
Resource arrays for ps_5_1 and vs_5_1 are an exception which is not
properly handled yet. They probably deserve a different object type.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
1bba18aa75
vkd3d-shader/hlsl: Invalidate components more precisely in copy propagation.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
b5b08bd8a0
vkd3d-shader/hlsl: Replace register offsets with index paths in copy propagation.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
10bd0c48f8
vkd3d-shader/hlsl: Print halfs in dump_ir_constant().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
a8b77b85ca
vkd3d-shader/hlsl: Skip implicit conversion if types are equal.
...
Otherwise we get false in implicit_compatible_data_types() when passing
types that are equal but not convertible according to
convertible_data_type(); e.g. getting:
"Can't implicitly convert from Texture2D<float4> to Texture2D<float4>."
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
732f1737f4
vkd3d-shader/hlsl: Set component count for objects to 1.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
e9829fdc65
tests: Test object references.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
f3432966da
vkd3d-shader/hlsl: Emit a fixme on complex resource load object derefs.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Francisco Casas
f843a7babb
vkd3d-shader/hlsl: Rename 'inner_type' to 'element_type' in function name.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
2022-08-23 15:57:54 -05:00
Martin Storsjö
1c61b20616
vkd3d-shader/spirv: Fix the signature of vkd3d_spirv_build_op_type_image.
...
Don't assume that enums and uint32_t parameters are identical. Clang
16 changes the diagonstic for incompatible function pointer types
from a warning into an error by default.
This fixes the following error, when built (for aarch64, but probably
also for other architectures) in MSVC mode:
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:1083:13: error: incompatible function pointer types passing 'uint32_t (struct vkd3d_spirv_builder *, uint32_t, SpvDim, uint32_t, uint32_t, uint32_t, uint32_t, SpvImageFormat)' (aka 'unsigned int (struct vkd3d_spirv_builder *, unsigned int, enum SpvDim_, unsigned int, unsigned int, unsigned int, unsigned int, enum SpvImageFormat_)') to parameter of type 'vkd3d_spirv_build7_pfn' (aka 'unsigned int (*)(struct vkd3d_spirv_builder *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)') [-Wincompatible-function-pointer-types]
vkd3d_spirv_build_op_type_image);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:612:68: note: passing argument to parameter 'build_pfn' here
SpvOp op, const uint32_t *operands, vkd3d_spirv_build7_pfn build_pfn)
^
Signed-off-by: Martin Storsjö <martin@martin.st >
2022-08-15 21:59:38 +02:00
Francisco Casas
577014c017
vkd3d-shader/hlsl: Replace register offsets with index paths in split copies.
...
hlsl_new_store() and hlsl_new_load() are deleted, so now there are no more
direct ways to create derefs with offsets in hlsl.c and hlsl.h.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:34:19 +02:00
Francisco Casas
d7d2fe145f
vkd3d-shader/hlsl: Replace register offsets with index paths in input/output copies.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:34:08 +02:00
Francisco Casas
1b69adbd13
vkd3d-shader/hlsl: Add input and output variables using the same function.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:34:05 +02:00
Francisco Casas
c572adbf2a
vkd3d-shader/hlsl: Move register offset functions to hlsl_codegen.c.
...
This can be done now, to ensure that register offsets are no longer used
in hlsl.c and hlsl.h.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:34:01 +02:00
Francisco Casas
349aab2a6a
vkd3d-shader/hlsl: Replace register offsets with index paths in resource loads initialization.
...
At this point, the parse code is free of offsets; it only uses index
paths.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:58 +02:00
Francisco Casas
5b664c7a5c
vkd3d-shader/hlsl: Introduce hlsl_new_store_index().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:55 +02:00
Francisco Casas
f3289e1661
vkd3d-shader/hlsl: Introduce hlsl_new_store_component().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:51 +02:00
Francisco Casas
7515b8255b
vkd3d-shader/hlsl: Print index paths in dump_deref().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:46 +02:00
Francisco Casas
4fede46c9a
vkd3d-shader/hlsl: Replace register offsets with index paths in load initializations.
...
The transform_deref_paths_into_offsets pass turns these index paths back
into register offsets.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:37 +02:00
Zebediah Figura
a2996c2d59
include: Add list_move_after() and list_move_before().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:33 +02:00
Francisco Casas
2dcfc888fb
vkd3d-shader/hlsl: Unify type minor/major size functions.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:29 +02:00
Francisco Casas
039b69ace9
vkd3d-shader/hlsl: Introduce add_load_index().
...
At this point add_load() is split into add_load_component() and
add_load_index(); register offsets are hidden for these functions.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:25 +02:00
Francisco Casas
a32157f586
vkd3d-shader/hlsl: Introduce add_load_component().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
2022-08-10 21:33:19 +02:00
Giovanni Mascellani
4112c36076
vkd3d: Do not store the latch bit in an object that could be overwritten.
...
Once a event is signaled, the corresponding struct vkd3d_waiting_event
entry is considered dead and could be overwritten, so it's not safe to
keep a pointer to it in d3d12_fence_SetEventOnCompletion(). Instead,
keep the latch bit in d3d12_fence_SetEventOnCompletion() and put a
pointer to it in struct vkd3d_waiting_event.
2022-08-09 22:14:30 +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
971ab01add
vkd3d: Check specific formats for typed UAV load feature support.
...
Vulkan's shaderStorageImageExtendedFormats includes more formats than are
required by D3D12.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com >
2022-08-09 22:14:28 +02:00
Conor McCarthy
3dbd2ceca6
vkd3d-shader: Introduce a compile option to use Unknown format for typed UAV loads.
...
Specifying R32 for UAVs created with a vector format, e.g. R32G32B32A32_FLOAT,
results in only the red being loaded/stored, potentially causing images to
contain only the red component.
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
5168929edc
vkd3d: Remove unused field fence_destruction_cond.
2022-08-08 18:55:22 +02:00
Giovanni Mascellani
5749ae4700
vkd3d: Unlock fence worker mutex before exiting.
...
Pthread mandates that a mutex must be unlocked before being destroyed.
In pratice I doubt this make a difference on any platform (certainly
it doesn't on Linux), but let's comply to standards.
2022-08-08 18:55:19 +02:00
Stefan Dösinger
aae4e31ba8
vkd3d-shader: Initialize counter_var_info unconditionally.
2022-07-25 21:09:30 +02:00
Conor McCarthy
3b579f6fe7
vkd3d: Delay unlocking the fence until after the blocked command queue op is written.
...
An unblocking Signal() on the CPU must be handled after the blocked op
is written, or the op will not be flushed until the next signal.
The device is locked while the fence is already locked, so the fence must
never be locked after locking the device. Currently this never occurs.
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-07-20 22:28:53 +02:00
Conor McCarthy
c1071fda52
vkd3d: Delay adding a command queue to the blocked list until after the op is written.
...
Otherwise the following sequence can occur:
1. A command queue is added to the blocked list during a Wait() call.
2. An unblocking Signal() occurs on the CPU in another thread, flushing the
blocked ops, but as no op has been written, the queue is removed from the
blocked list.
3. The blocked op is written.
3. Another op is queued and the queue is not re-added to the blocked
list because this only happens for the first op.
World of Warcraft triggers this 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-07-20 22:28:49 +02:00
Francisco Casas
a7a4eb95e5
vkd3d-shader/hlsl: Introduce function to clean up hlsl_derefs.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-07-18 22:07:42 +02:00
Francisco Casas
b9435fb1ff
vkd3d-shader/hlsl: Pass field to add_record_load() via index.
...
Signed-off-by: Francisco Casas <fcasas@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-07-18 22:07:33 +02:00
Francisco Casas
300a6c8fc3
vkd3d-shader/hlsl: Handle errors in recursive calls in hlsl_type_clone().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-07-18 22:07:30 +02:00
Zebediah Figura
e5905bbf0f
vkd3d-shader/hlsl: Store the struct fields as an array.
...
Signed-off-by: Francisco Casas <fcasas@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-07-18 22:07:26 +02:00
Giovanni Mascellani
2ec6d4d3ff
tests: Test arithmetic int operations without constant operands.
...
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-07-05 22:43:30 +02:00
Giovanni Mascellani
448f856c09
vkd3d-shader/hlsl: Write SM4 logic or instructions.
...
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-07-05 22:43:28 +02:00
Giovanni Mascellani
15e4b9bafb
vkd3d-shader/hlsl: Write SM4 logic and instructions.
...
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-07-05 22:43:25 +02:00
Giovanni Mascellani
02d92c9af6
vkd3d-shader/hlsl: Write SM4 logic not instructions.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-07-05 22:43:22 +02:00
Giovanni Mascellani
3e88a46d4c
vkd3d-shader/hlsl: Write SM4 casts from bool.
...
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-07-05 22:43:18 +02:00
Giovanni Mascellani
98ebe9b69c
vkd3d-shader/hlsl: Fold constant integral bitwise or.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-28 22:20:27 +02:00
Giovanni Mascellani
06c22b6a65
vkd3d-shader/hlsl: Fold constant integral bitwise and.
...
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-06-28 22:20:24 +02:00
Giovanni Mascellani
4016ddff77
vkd3d-shader/hlsl: Fold constant integral bitwise xor.
...
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-06-28 22:20:22 +02:00
Giovanni Mascellani
4a692dca4e
vkd3d-shader/hlsl: Fold constant integral min().
...
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-06-28 22:20:17 +02:00
Giovanni Mascellani
8cb865d65a
vkd3d-shader/hlsl: Fold constant integral max().
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-28 22:20:11 +02:00
Zebediah Figura
0ddaa80616
vkd3d-shader/hlsl: Fold constant swizzles.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-28 22:20:08 +02:00
Giovanni Mascellani
7682da58a8
vkd3d-shader/hlsl: Parse lerp() intrinsic.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-27 21:23:33 +02:00
Zebediah Figura
bb32ffad18
vkd3d-shader/hlsl: Parse the ldexp() intrinsic.
...
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-06-27 21:23:31 +02:00
Giovanni Mascellani
c7198bc964
vkd3d-shader/hlsl: Write SM4 dot product instructions.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-27 21:23:28 +02:00
Giovanni Mascellani
58d017ccc1
vkd3d-shader/hlsl: Parse dot() intrinsic.
...
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-06-27 21:23:26 +02:00
Giovanni Mascellani
80586bf7a9
tests: Test lerp() intrinsic.
...
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-06-27 21:23:24 +02:00
Giovanni Mascellani
0462d81484
tests: Test ldexp() intrinsic.
...
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-06-27 21:23:22 +02:00
Giovanni Mascellani
7b6e782139
tests: Test dot() intrinsic.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-27 21:23:19 +02:00
Henri Verbeet
9d4df5e704
Release 1.4.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-22 18:31:51 +02:00
Henri Verbeet
2cad32d7fa
build: Add tests/vulkan_procs.h to the distribution.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-22 17:28:38 +02:00
Henri Verbeet
780da51b65
build: Add the d3d9 and d3d11 shader runners to the distribution.
...
We don't want to add these to tests_shader_runner_SOURCES, because
they're only supposed to get built for the "crosstest" target.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-22 17:28:35 +02:00
Henri Verbeet
4093fe49bf
vkd3d-compiler: Default to VKD3D_SHADER_SOURCE_HLSL when the source size is smaller than a uint32_t.
...
For example, when the input is an empty file. Leaving the source type as
VKD3D_SHADER_SOURCE_NONE would cause (potential) subsequent
get_source_type_info() calls to return NULL, resulting in a segmentation
fault.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-22 17:28:33 +02:00
Biswapriyo Nath
a021b0a7d3
include: Add ID3D12Device3 declaration in vkd3d_d3d12.idl.
...
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-21 20:16:35 +02:00
Biswapriyo Nath
f9921fc691
include: Add more D3D12_HEAP_FLAGS in vkd3d_d3d12.idl.
...
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-21 20:16:30 +02:00
Biswapriyo Nath
b7fbac1c09
include: Add ID3D12Device2 declaration in vkd3d_d3d12.idl.
...
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-10 11:59:57 +02:00
Biswapriyo Nath
694e5c865b
include: Add ID3D12SharingContract interface declarations in vkd3d_d3d12sdklayers.idl.
...
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-10 11:59:52 +02:00
Biswapriyo Nath
abd82c9e6d
include: Add ID3D12DebugDevice interface declarations in vkd3d_d3d12sdklayers.idl.
...
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-10 11:59:47 +02:00
Giovanni Mascellani
10917a7f47
vkd3d-shader/hlsl: Parse the mul() intrinsic.
...
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-06-09 19:13:29 +02:00
Giovanni Mascellani
62fa53f9b6
vkd3d-shader/hlsl: Split matrix operations.
...
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-06-09 19:13:27 +02:00
Giovanni Mascellani
3a755cb0e2
vkd3d-shader/hlsl: Lower matrix casts.
...
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-06-09 19:13:22 +02:00
Giovanni Mascellani
41df40b4ed
tests: Test how matrix types interact with semantics.
...
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-06-09 19:13:18 +02:00
Zebediah Figura
f821a1b29a
tests: Add a test for multiple render targets.
...
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-06-09 19:13:12 +02:00
Zebediah Figura
08e2a8e9bb
tests: Add a basic shader test for UAVs.
...
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-06-09 19:13:09 +02:00
Zebediah Figura
2b69ee67bd
tests/shader_runner: Make the render target into a resource.
...
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-06-09 19:13:06 +02:00
Zebediah Figura
d2d29d1b88
tests/shader_runner: Create the render pass and framebuffer in vulkan_runner_draw().
...
Prepare to allow for dynamically changing the bound attachments in consecutive
draw calls.
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-06-09 19:13:03 +02:00
Zebediah Figura
ac404afe93
tests/shader_runner: Allow creating UAV resources.
...
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-06-09 19:12:59 +02:00
Giovanni Mascellani
76bb1b7439
vkd3d-shader/hlsl: Have add_expr() return hlsl_ir_node*.
...
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-06-08 18:51:38 +02:00
Giovanni Mascellani
e37ac63813
vkd3d-shader/hlsl: Introduce add_cast() helper.
...
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-06-08 18:51:32 +02:00
Giovanni Mascellani
8cd4995958
vkd3d-shader/hlsl: Allocate enough space for temporary matrices.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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-06-08 18:51:28 +02:00
Zebediah Figura
ea38ecc4ff
vkd3d-shader/hlsl: Split matrices into multiple variables in prepend_input_copy().
...
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-06-08 18:51:03 +02:00
Zebediah Figura
d2d4bc24e9
vkd3d-shader/hlsl: Split matrices into multiple variables in append_output_copy().
...
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-06-08 18:50:52 +02:00
Biswapriyo Nath
4647209f27
include: Add ID3D12Debug interface declarations in vkd3d_d3d12sdklayers.idl.
...
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-06-08 18:50:40 +02:00
Zebediah Figura
14f77294b1
vkd3d-shader/spirv: Do not print a warning for VKD3D_SHADER_COMPILE_OPTION_API_VERSION.
...
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-06-07 19:39:52 +02:00
Zebediah Figura
64b784dbb9
vkd3d-utils: Allow writing log output via a custom callback.
...
When using PE vkd3d through Wine, debug output may be swallowed by writing to
Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine
output.
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-06-07 19:39:01 +02:00
Zebediah Figura
46b1266809
vkd3d: Allow writing log output via a custom callback.
...
When using PE vkd3d through Wine, debug output may be swallowed by writing to
Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine
output.
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-06-07 19:38:57 +02:00
Zebediah Figura
174172887b
vkd3d-shader: Allow writing log output via a custom callback.
...
When using PE vkd3d through Wine, debug output may be swallowed by writing to
Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine
output.
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-06-07 19:38:49 +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
4a9d675c49
tests/shader_runner: Move the check_readback_data_vec4() call to shader_runner.c.
...
Split the probe_vec4() directive into get_rt_readback() and release_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:53:21 +02:00
Zebediah Figura
e6ea409bbf
tests: Move check_readback_data_vec4() to utils.h.
...
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:53:16 +02:00
Zebediah Figura
1e8e0650c9
tests/shader_runner: Use the resource_readback structure in the Vulkan shader runner.
...
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:53:11 +02:00
Zebediah Figura
ccdb702d53
tests/shader_runner: Use the common resource_readback structure in d3d9 and d3d11 readback structures.
...
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:53:08 +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
Giovanni Mascellani
bb49bdba6a
vkd3d-shader/hlsl: Allow majority modifiers on function declarations.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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-13 18:21:15 +02:00
Giovanni Mascellani
e39559690b
vkd3d-shader/hlsl: Offset register id for input/ouput variables.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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-13 18:21:12 +02:00
Francisco Casas
1fc44e7be4
tests: Test textures in initializers.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-13 18:20:45 +02:00
Francisco Casas
719e1bad1d
tests: Add additional subtests to implicit array initialization.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-13 18:20:43 +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
Conor McCarthy
a5c63dc4b9
vkd3d: Always destroy created objects on d3d12_fence_init() 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 >
2022-05-13 18:20:08 +02:00
Matteo Bruni
228f7ab5cd
vkd3d-shader/hlsl: Handle over/underflow when parsing integer literals.
...
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-12 19:33:56 +02:00
Andrey Gusev
a9dc39dd92
include: Add more D3D12_ROOT_SIGNATURE_FLAGS enums.
...
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-12 19:33:01 +02:00
Giovanni Mascellani
e6ce077ad4
vkd3d-shader/hlsl: Handle loops in copy propagation.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-04 18:32:35 +02:00
Giovanni Mascellani
ec85eb538b
vkd3d-shader/hlsl: Remove the location parameter from initialize_var_components().
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-04 18:32:26 +02:00
Giovanni Mascellani
9ad6ad7065
vkd3d-shader/hlsl: Use a more sensible source location in add_constructor().
...
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: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-04 18:32:22 +02:00
Conor McCarthy
07e38212ec
vkd3d: Replace the signaled semaphore list with a resizable array.
...
Order does not need to be preserved here, and another function will add
to this array when mapped timeline semaphores are implemented.
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-02 20:19:35 +02:00
Conor McCarthy
488722b9b5
vkd3d: Create one fence worker thread per command queue.
...
Simplifies the handling of GPU waits, and in vkd3d-proton is reported
to increase performance when support for multiple Vulkan queues is
enabled, because it avoids the problem of fences being signaled while
they sit in the pending buffer waiting to be moved to the wait buffer.
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 >
2022-05-02 20:19:32 +02:00
Conor McCarthy
34e7b87966
vkd3d: Introduce an internal refcount to d3d12_fence to replace the thread waiting mechanism.
...
Simplifies the preservation of fence objects until worker threads are
done with them, and will be needed when threaded queue submission is
added.
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-02 20:19:29 +02:00
Giovanni Mascellani
6167b3a4e2
vkd3d-shader/hlsl: Handle branches in copy propagation.
...
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-02 11:30:21 +02:00
Giovanni Mascellani
38d7913f5f
vkd3d-shader/hlsl: Allow storing to matrices.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-02 11:30:18 +02:00
Francisco Casas
1240a947d2
tests: Test initialization of implicit size arrays.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-02 11:30:04 +02:00
Francisco Casas
4b4537b874
tests: Test complex broadcasts.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-02 11:30:00 +02:00
Francisco Casas
a58c0e7c9d
vkd3d-shader/hlsl: Detect missing loads on rhs when splitting copies of non-numeric types.
...
Otherwise we can get failed assertions:
assert(node->type == HLSL_IR_LOAD);
because broadcasts to these types are not implemented yet.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-05-02 11:29:54 +02:00
Zebediah Figura
f34db84c62
configure: Allow specifying the Vulkan library path with VULKAN_LIBS.
...
Do not define it for the vkd3d build, but restore support for overriding it as a
configure argument.
This partially reverts 99a3adcc19
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52915
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-27 21:46:18 +02:00
Giovanni Mascellani
cf7cf05cb7
vkd3d-shader/hlsl: Parse matrix constructors.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-27 21:45:45 +02:00
Giovanni Mascellani
ff3ec5d4a5
vkd3d-shader/hlsl: Support matrix indexing.
...
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-04-27 21:45:43 +02:00
Francisco Casas
246ff14511
vkd3d-shader/hlsl: Support all complex initalizers.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-04-27 21:45:41 +02:00
Giovanni Mascellani
e2b4f01a9f
vkd3d-shader/hlsl: Simplify flow in add_array_load().
...
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-04-27 21:45:39 +02:00
Giovanni Mascellani
c5c50a8b9b
vkd3d-shader/hlsl: Do not generate useless swizzles.
...
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-04-27 21:45:37 +02:00
Giovanni Mascellani
6b6ff48ece
vkd3d-shader/hlsl: Test the INT_MIN / -1 constant folding special case.
...
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-04-27 21:45:35 +02:00
Giovanni Mascellani
4d181bc622
vkd3d-shader/hlsl: Do not allow NaNs in SM1.
...
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-04-27 21:45:32 +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
9839850b87
vkd3d-shader: Remove the workaround for sample_c.
...
The current workaround is broken for texture cube arrays, which already have 4
components.
Sampling with the components not packed together apparently succeeds with newer
NVidia drivers, so just remove the workaround. Tested with 470.103.01 on a GTX
1060.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52886
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:09 +02:00
Francisco Casas
535bbfa6f8
tests: Test matrix initialization.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-04-25 22:12:59 +02:00
Giovanni Mascellani
74273ccadd
vkd3d-shader/hlsl: Do not handle vector types in major_size() and minor_size().
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-25 22:12:55 +02:00
Giovanni Mascellani
3bbb90a3cb
tests: Test matrix copying with a non-square matrix.
...
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: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-25 22:12:49 +02:00
Giovanni Mascellani
d2ba10a696
vkd3d-shader/hlsl: Update split_copy()'s introductory comment.
...
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: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-25 22:12:39 +02:00
Giovanni Mascellani
0e8098ccfe
vkd3d-shader/hlsl: Add trailing dots to warning messages.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-25 22:12:23 +02:00
Giovanni Mascellani
c680b674d6
vkd3d-shader/hlsl: Do not generate infinities in SM1.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-25 22:12:17 +02:00
Conor McCarthy
6b893b597b
vkd3d: Prevent a null pointer dereference when a descriptor is not a UAV.
...
Fixes crashes in Shadow of the Tomb Raider, GRID 2019 and probably 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 >
2022-04-25 22:12:04 +02:00
Zebediah Figura
cab16fe903
configure: Allow specifying the shared object name of the Vulkan library at configure time.
...
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-25 22:11:55 +02:00
Zebediah Figura
99a3adcc19
configure: Remove the no longer used check for VULKAN_LIBS.
...
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-25 22:11:47 +02:00
Zebediah Figura
f9c7b123d8
demos: Load libvulkan dynamically.
...
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-25 22:11:43 +02:00
Giovanni Mascellani
e38ee49e99
vkd3d-shader/hlsl: Split matrix copies.
...
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: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-20 23:02:14 +02:00
Giovanni Mascellani
d1fac2660c
vkd3d-shader/hlsl: Support vector indexing.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-20 23:02:11 +02:00
Zebediah Figura
aaa743033a
vkd3d-shader/hlsl: Return bool from add_record_load() and add_array_load().
...
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-20 23:02:00 +02:00
Zebediah Figura
367bd15ec5
tests: Simplify "probe" directive syntax and parsing a bit.
...
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
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-04-20 23:01:04 +02:00
Zebediah Figura
f187b48792
tests: Mark individual invalid shaders as todo.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-20 23:00:57 +02:00
Zebediah Figura
0929ec7462
tests: Load libvulkan dynamically in d3d12_crosstest.h.
...
We would like to allow overriding the soname of libvulkan, in which case the
tests and demos should respect that override.
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-20 16:41:46 +02:00
Zebediah Figura
beffe5f367
tests: Load libvulkan dynamically in shader_runner_vulkan.c.
...
We would like to allow overriding the soname of libvulkan, in which case the
tests and demos should respect that override.
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-20 16:41:44 +02:00
Zebediah Figura
bcad6d6997
tests: Load libvulkan dynamically in vkd3d_api.c.
...
We would like to allow overriding the soname of libvulkan, in which case the
tests and demos should respect that override.
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-20 16:41:42 +02:00
Zebediah Figura
d087b9ea5b
include: Implement vkd3d_dl*() wrappers for Win32 platforms.
...
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-20 16:41:39 +02:00
Zebediah Figura
a58e713314
include: Move vkd3d_dl*() helpers to vkd3d_common.h.
...
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-20 16:41:37 +02:00
Giovanni Mascellani
16da0b3300
tests: Add another vector indexing test.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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-04-15 21:18:24 +02:00
Giovanni Mascellani
564883a201
tests: Test matrix indexing.
...
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: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-15 21:18:22 +02:00
Giovanni Mascellani
2b23b7329c
vkd3d-shader/hlsl: Fold constant modulus.
...
This commit includes work by Francisco Casas.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-15 21:18:20 +02:00
Giovanni Mascellani
40b299c727
vkd3d-shader/hlsl: Fold constant division.
...
This commit includes work by Francisco Casas.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-15 21:18:17 +02:00
Francisco Casas
aefadb87b6
vkd3d-shader/hlsl: Support complex numeric initializers.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-15 21:18:15 +02:00
Francisco Casas
9c518b45d1
vkd3d-shader/hlsl: Handle static struct initializer instructions.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-15 21:18:13 +02:00
Francisco Casas
7cee81cf3e
vkd3d-shader/hlsl: Remove instruction list parameter in struct_var_initializer().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-04-15 21:18:11 +02:00
Zebediah Figura
c3a5cd7c13
tests: Do not abort when an invalid shader test fails.
...
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-04-15 21:18:09 +02:00
Zebediah Figura
98a36dfa41
tests: Mark individual test directives as todo.
...
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-04-15 21:18:06 +02:00
Zebediah Figura
c0562e2a1e
tests: Introduce support for marking individual test directives as todo.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-15 21:18:04 +02:00
Zebediah Figura
26b89cc338
tests: Skip probe directives if the last render failed.
...
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-04-15 21:18:01 +02:00
Zebediah Figura
e3f78706ec
tests: Introduce a Vulkan shader runner.
...
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-12 19:00:19 +02:00
Zebediah Figura
3e8b5a9fc3
tests: Store samplers in a fixed-size array.
...
We will need to allocate some structures in the Vulkan backend; this is easier
if we don't need to worry about allocating them dynamically.
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-12 19:00:16 +02:00
Zebediah Figura
e208d87847
tests: Store resources in a fixed-size array.
...
We will need to allocate some structures in the Vulkan backend; this is easier
if we don't need to worry about allocating them dynamically.
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-12 19:00:14 +02:00
Zebediah Figura
02182ce4f7
tests: Transition back to D3D12_RESOURCE_STATE_RENDER_TARGET in d3d12_runner_probe_vec4().
...
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-12 19:00:11 +02:00
Francisco Casas
7d31fd1788
vkd3d-shader/hlsl: Ensure that SM4 endif has 0 source registers.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-11 22:45:59 +02:00
Zebediah Figura
93c6fd0eb0
tests: Introduce a D3D9 shader runner.
...
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-08 11:49:33 +02:00
Zebediah Figura
90b4cbc1f2
tests: Try to avoid using SV_Position from shaders which can be tested with SM1.
...
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-08 11:49:31 +02:00
Zebediah Figura
d2872fa33a
tests: Specify the arguments to "probe rect" as right and bottom, instead of width and height.
...
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-08 11:49:27 +02:00
Zebediah Figura
83a3de8529
tests: Allow skipping shader tests if requirements are not met.
...
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-08 11:49:27 +02:00
Zebediah Figura
c7a7cf498d
tests: Use a vertex buffer to draw quads for shader tests.
...
For compatibility with shader models before 4.0.
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-08 11:49:16 +02:00
Zebediah Figura
94fcd52031
tests: Mark some more tests as requiring shader model 4.0.
...
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-07 18:32:21 +02:00
Giovanni Mascellani
53d7433054
vkd3d-shader/hlsl: Write SM4 right shift instructions.
...
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-07 18:32:13 +02:00
Giovanni Mascellani
95df144c69
vkd3d-shader/hlsl: Assert that bool values are not bit-shifted.
...
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-07 18:32:10 +02:00
Giovanni Mascellani
ed921151b0
vkd3d-shader/hlsl: Write SM4 uint modulus instructions.
...
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-07 18:32:07 +02:00
Giovanni Mascellani
e37f1ed26d
vkd3d-shader/hlsl: Write SM4 uint division instructions.
...
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-07 18:32:04 +02:00
Giovanni Mascellani
f3e81645be
vkd3d-shader/hlsl: Write SM4 uint negation instructions.
...
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-07 18:32:00 +02:00
Giovanni Mascellani
c92897ffd2
vkd3d-shader/hlsl: Write SM4 int multiplication instructions.
...
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-07 18:31:55 +02:00
Giovanni Mascellani
8c086b5c91
vkd3d-shader/hlsl: Lower casts to bool to comparisons.
...
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-07 18:31:52 +02:00
Matteo Bruni
8fa196cf51
vkd3d-shader/hlsl: Handle HLSL_TYPE_DOUBLE in sm4_base_type().
...
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-07 18:31:46 +02:00
Matteo Bruni
233157649c
vkd3d-shader/hlsl: Drop extra '\n' from hlsl_error() messages.
...
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-07 18:31:44 +02:00
Matteo Bruni
4ab4d42468
vkd3d-shader/hlsl: Drop extra '\n' from hlsl_fixme() messages.
...
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-07 18:31:42 +02:00
Zebediah Figura
2e4367a470
build: Do not cross-compile tests if tests are not enabled.
...
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-05 17:52:21 +02:00
Zebediah Figura
2f082de904
build: Do not make cross-compiled import libs an explicit dependency of the "crosstest" targets.
...
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-05 17:52:19 +02:00
Zebediah Figura
113303c730
build: Do not cross-compile demos if demos are not enabled.
...
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-05 17:52:12 +02:00
Zebediah Figura
d3347554a2
configure: Check for xcb-event and xcb-icccm.
...
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-05 17:52:03 +02:00
Giovanni Mascellani
1ec00d8eba
vkd3d-shader/hlsl: Fold constant not-equal expressions.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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:51:07 +02:00
Giovanni Mascellani
d9dc79de66
vkd3d-shader/hlsl: Store boolean constants as unsigned.
...
With this change it is possible to store booleans as 0xffffffff,
similarly as what happens at runtime.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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:51:07 +02:00
Giovanni Mascellani
5b24f7a06c
vkd3d-shader/hlsl: Add a helper to create constants of arbitrary type.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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:51:07 +02:00
Giovanni Mascellani
39bd9b0943
vkd3d-shader/hlsl: Pass a pointer to the location to hlsl_new_*_constant().
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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:51:07 +02:00
Giovanni Mascellani
58956922df
vkd3d-shader/hlsl: Abort on inconsistent types in fold_cast().
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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:51:07 +02:00
Giovanni Mascellani
c63fbbda06
vkd3d-shader/hlsl: Abort on inconsistent types in write_sm4_cast().
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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:51:07 +02:00
Giovanni Mascellani
4739cf1d33
vkd3d-shader/hlsl: Check types when folding constants.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@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:51:07 +02:00
Giovanni Mascellani
bc7c89bc1f
vkd3d-shader/hlsl: Use an unsigned variable for iteration.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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:51:07 +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
Zebediah Figura
6e966bcf23
vkd3d-shader/hlsl: Allow "nointerpolation" to be specified on struct fields.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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:19 +02:00
Matteo Bruni
428a6b4033
vkd3d-shader/hlsl: Report failure when encountering matrix instructions.
...
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:17 +02:00
Zebediah Figura
ea93c5c767
vkd3d-shader/hlsl: Write SM4 integer addition instructions.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-04 21:12:57 +02:00
Zebediah Figura
c9b7669240
vkd3d-shader/hlsl: Declare integer semantics as having constant interpolation.
...
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: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-04 21:12:52 +02:00
Zebediah Figura
e6dabf22bf
vkd3d-shader/hlsl: Respect the 'nointerpolation' modifier.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@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-04 21:12:47 +02:00
Zebediah Figura
8e07f65595
vkd3d-shader/hlsl: Allow mixing "in" and "out" with other modifiers.
...
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: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-04 21:12:41 +02:00
Giovanni Mascellani
8e6c526779
vkd3d-shader/hlsl: Write SM4 bitwise NOT instructions.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@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-04-04 21:12:38 +02:00
Giovanni Mascellani
2959ad74f7
vkd3d-shader/hlsl: Write SM4 bitwise XOR instructions.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-04 21:12:34 +02:00
Giovanni Mascellani
f22d866cee
vkd3d-shader/hlsl: Write SM4 bitwise OR instructions.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-04-04 21:12:30 +02:00
Matteo Bruni
d2104522fe
vkd3d-shader/preproc: Don't add additional spaces after whitespace tokens.
...
This is especially a problem when e.g. it introduces a whitespace
before a #pragma directive, breaking shader compilation.
Signed-off-by: Matteo Bruni <mbruni@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-03-31 21:24:56 +02:00
Francisco Casas
a75560af3d
vkd3d-shader/hlsl: Treat all braceless initializers as assignments.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-03-31 21:24:53 +02:00
Francisco Casas
6284cf7d57
vkd3d-shader/hlsl: Don't check exact number of components for braceless initialization of numeric types.
...
The implicit conversion in add_assignment() takes responsability now.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-03-31 21:24:49 +02:00
Francisco Casas
22f0b1df77
vkd3d-shader/hlsl: Properly free parse_variable_def memory.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-03-31 21:24:46 +02:00
Francisco Casas
426c08eba4
vkd3d-shader/hlsl: Add 'braces' flag to parse initializers.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-03-31 21:24:43 +02:00
Francisco Casas
d9dc1a4554
vkd3d-shader/hlsl: Concatenate nested initializers.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-03-31 21:24:39 +02:00
Francisco Casas
bed085cf9a
vkd3d-shader/hlsl: Avoid leaks on memory allocation failures when parsing initializers.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-03-31 21:24:35 +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
e3045090a8
vkd3d: Write a resource null descriptor to all applicable sets when one set is written.
...
Binding a shader with the wrong null descriptor type works in Windows. The
introduction of Vulkan-backed heaps may cause a regression in clients which
do this, because the written index will remain unpopulated in all other sets,
but a shader may access it in one of them.
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:46:20 +01:00
Conor McCarthy
0627462192
vkd3d: Use Vulkan null descriptors if EXT_robustness2 is available.
...
This implements all remaining unsupported image view dimensions and saves
a small amount of resources because null buffers and images are no longer
needed. It matches the D3D12 requirement that all reads return zero,
which is not strictly true of the existing implementation using resources
of small but non-zero size. Warnings on null view creation are silenced
because there should no longer be a difference from D3D12 behaviour.
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:46:13 +01:00
Conor McCarthy
f34168481d
vkd3d: Remove an invalid NULL check.
...
The pointer is never NULL.
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-23 18:40:58 +01:00
Conor McCarthy
ae2219a7f7
vkd3d: Do not enable Vulkan-backed descriptor heaps if required update-after-bind features are missing.
...
descriptorBindingUniformBufferUpdateAfterBind is false for Intel Skylake
(and maybe 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 >
2022-03-23 18:40:56 +01:00
Zebediah Figura
24a27daf98
tests: Add a test for the "nointerpolation" modifier.
...
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-22 18:41:43 +01:00
Zebediah Figura
c7623262cc
tests: Specify the primitive type from the shader runner frontend.
...
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-22 18:41:41 +01:00
Zebediah Figura
492cd135e3
tests: Specify the vertex count from the shader runner frontend.
...
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-22 18:41:39 +01:00
Zebediah Figura
84c73f82f7
tests: Allow specifying a custom 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-03-22 18:41:37 +01:00
Zebediah Figura
f11f7032cd
tests: Make the "texture" structure more generic.
...
Use it to hold any type of resource, regardless of type and binding.
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-22 18:41:35 +01:00
Zebediah Figura
3ed4c6fe23
tests: Allow specifying a custom input layout.
...
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-22 18:41:32 +01:00
Zebediah Figura
16b383aef5
tests: Specify the default vertex shader in the shader runner frontend.
...
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-22 18:41:29 +01:00
Zebediah Figura
52223250d7
tests: Add support for running shader tests with a custom vertex shader.
...
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-22 18:41:26 +01:00
Zebediah Figura
71db328d38
tests: Remove NULL rect handling from d3d11_runner_probe_vec4().
...
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-21 22:35:05 +01:00
Zebediah Figura
099df706f0
tests: Use a macro to define the render target size.
...
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-21 22:35:03 +01:00
Zebediah Figura
e5be178fe2
tests: Rename struct d3d11_shader_context to struct d3d11_shader_runner.
...
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-21 22:35:01 +01:00
Zebediah Figura
39459d6c3e
tests: Rename struct d3d12_shader_context to struct d3d12_shader_runner.
...
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-21 22:34:59 +01:00
Zebediah Figura
5841e79102
tests: Rename struct shader_context to struct shader_runner.
...
This is a bit clearer, and avoids colliding with other things named "context",
e.g. struct test_context, or d3d11 device contexts.
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-21 22:34:57 +01:00
Zebediah Figura
ead5cc3113
tests: Use SV_VertexID to draw a triangle in d3d11_runner_draw_quad().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@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-03-18 22:20:36 +01:00
Zebediah Figura
41d75fde22
vkd3d-shader/hlsl: Write SM4 left shift instructions.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-03-18 22:20:36 +01:00
Zebediah Figura
ccb3326516
vkd3d-shader/hlsl: Write SM4 bitwise AND instructions.
...
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: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-03-18 22:20:36 +01:00
Zebediah Figura
5251ecff89
vkd3d-shader/hlsl: Parse the sv_vertexid semantic.
...
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: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-03-18 22:20:36 +01:00
Zebediah Figura
6569b37e97
vkd3d-shader/hlsl: Reverse the switch order in write_sm4_expr().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-03-18 22:20:36 +01:00
Zebediah Figura
8fe4d7d37e
vkd3d-shader/hlsl: Cast pow() input to float.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-03-18 22:20:36 +01:00
Francisco Casas
a7e6d6b9d2
vkd3d-shader/hlsl: Remove redundant type check in declare_vars().
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
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-03-18 22:20:36 +01:00
Giovanni Mascellani
84059d61c3
vkd3d-shader/hlsl: Allow offsets for scalar and vector variables.
...
Signed-off-by: Francisco Casas <fcasas@codeweavers.com >
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com >
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com >
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com >
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Alexandre Julliard <julliard@winehq.org >
2022-03-18 22:20:36 +01:00
Zebediah Figura
ee764359d0
vkd3d-shader/hlsl: Correctly calculate offsets for array elements.
...
Signed-off-by: Matteo Bruni <mbruni@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-03-18 22:20:32 +01:00
Conor McCarthy
2b0fd2a055
vkd3d: Do not copy descriptors having identical views.
...
Improves performance in Control, which copies large numbers of descriptors
per frame where often only ~10% are not identical.
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:40:02 +01:00
Conor McCarthy
5e4f1e1ead
vkd3d: Optimise descriptor copying for Vulkan-backed heaps.
...
Source descriptors are copied to separate arrays to facilitate use of
pre-initialised Vulkan structures, and allow arrayed writes where
possible.
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:40:02 +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
Zebediah Figura
fa17a170b1
vkd3d-shader/sm4: Recognise the msad opcode.
...
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-14 18:31:08 +01:00
Zebediah Figura
0ca2444e9b
tests: Use only one heap for textures in the d3d12 shader runner.
...
The d3d12 specification forbids simultaneously binding more than one heap of a
given type.
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-14 18:26:50 +01:00
David Gow
13ca6322c7
vkd3d: Handle D3D12_APPEND_ALIGNED_ELEMENT for <4 byte wide elements.
...
In d3d12, input element alignment needs to be the _minimum_ of 4 and the size of
the type. See the D3D11 spec, section 4.4.6, which behaves similarly:
https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm#4.4.6%20Element%20Alignment
This is correctly taken into account when generating, e.g., the
vertex_buffer_stride_align_mask used for validation, but is not taken
into account when D3D12_APPEND_ALIGNED_ELEMENT is used to automatically
place input elements. Currently, vkd3d always assumes the alignment is
4.
This means that, for example, bytes or shorts should be packed tightly
together when D3D12_APPEND_ALIGNED_ELEMENT is used, but are instead
padded to 4 bytes.
Fixing this makes units appear in Age of Empires IV.
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-09 20:53:15 +01:00
Zebediah Figura
721ea8fa60
tests: Mark some tests as requiring shader model 4.0.
...
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-08 17:45:21 +01:00
Zebediah Figura
1f4056125d
tests: Avoid using non-float uniforms where possible.
...
SM1 encodes these differently.
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-08 17:45:18 +01:00
Zebediah Figura
efd9e9e990
tests: Use SM1-compatible uniform layouts in shader 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 >
2022-03-08 17:45:16 +01:00
Zebediah Figura
9bbce56dad
tests: Avoid depending on float accuracy in the round() test.
...
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-08 17:45:14 +01:00
Zebediah Figura
e9ff88469e
tests: Split hlsl-operations into individual test units.
...
Partly to make the tests easier to navigate, and partly to allow marking some
tests as SM4+.
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-08 17:45:11 +01:00
Francois Gouget
b64482e7c7
vkd3d-shader/spirv: Fix the spelling of some 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-03-07 16:39:09 +01:00
Francois Gouget
ab3855133d
announce: Fix a typo in the libvkd3d-shader new interfaces section.
...
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-03-07 16:31:31 +01:00
Francois Gouget
419c746806
vkd3d: Fix the spelling of a couple of trace message.
...
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-03-07 16:31:28 +01:00
Francois Gouget
c1e376911e
vkd3d: Add a trailing linefeed to a couple of WARN() messages.
...
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-03-07 16:31:25 +01:00
Zebediah Figura
fc5df4d330
vkd3d-utils: Simplify handling of shader messages a bit.
...
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-07 16:30:44 +01:00
Zebediah Figura
e9fd9a79a1
vkd3d-utils: Avoid leaking "messages" when vkd3d_blob_create() fails.
...
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-07 16:30:37 +01:00