537d7c27a2
vkd3d-shader/hlsl: Error out when a semantic is used with incompatible types.
...
Considering row vectors from row_major matrices as having a different
layout as regular vectors, and error out in that case, is left as todo.
2023-05-01 22:18:24 +02:00
d96e9665b1
vkd3d-shader/hlsl: Error out when an output semantic is used more than once.
...
The use of the hlsl_semantic.reported_duplicated_output_next_index field
allows reporting multiple overlapping indexes, such as in the following
vertex shader:
void main(out float1x3 x : OVERLAP0, out float1x3 y : OVERLAP1)
{
x = float3(1.0, 2.0, 3.2);
y = float3(5.0, 6.0, 5.0);
}
apple.hlsl:1:41: E5013: Output semantic "OVERLAP1" is used multiple times.
apple.hlsl:1:13: First use of "OVERLAP1" is here.
apple.hlsl:1:41: E5013: Output semantic "OVERLAP2" is used multiple times.
apple.hlsl:1:13: First use of "OVERLAP2" is here.
While at the same time avoiding reporting overlaps more than once for
large arrays:
struct apple
{
float2 p : sv_position;
};
void main(out apple aps[4])
{
}
apple.hlsl:3:8: E5013: Output semantic "sv_position0" is used multiple times.
apple.hlsl:3:8: First use of "sv_position0" is here.
2023-05-01 22:18:22 +02:00
edc72fdefc
vkd3d-shader/hlsl: Support semantics for array types.
2023-05-01 22:18:21 +02:00
a488889494
vkd3d-shader/hlsl: Don't create semantic vars more than once.
2023-05-01 22:18:20 +02:00
b589c2b32d
vkd3d-shader/hlsl: Move get_array_size() and get_array_type() to hlsl.c.
2023-05-01 22:18:19 +02:00
d5068fd3ff
tests: Test duplicated semantics.
2023-05-01 22:18:19 +02:00
f1276f9fb9
tests: Test array types with semantics.
2023-05-01 22:18:19 +02:00
61c72a4fd1
vkd3d-shader/hlsl: Avoid invalid input/output copies for non-numeric types.
2023-05-01 22:18:17 +02:00
627678a632
tests: Map unindentified hrs on compilation.
2023-05-01 22:18:17 +02:00
9cc1c7fe9d
tests: Allow invalid vertex shader tests.
2023-05-01 22:18:17 +02:00
877fd3f0b4
tests: Expect S_OK result on [vertex shader].
2023-05-01 22:18:16 +02:00
7ba373946b
vkd3d-shader/hlsl: Implement D3DCOLORtoUBYTE4() function.
2023-04-28 21:04:13 +02:00
4b3707aeb4
vkd3d-shader/hlsl: Partially implement trunc().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2023-04-28 21:04:11 +02:00
5366ca7001
vkd3d: Synchronise concurrent descriptor heap binding by multiple command lists.
...
It is possible for multiple command lists to use the same heap, and
submit it simultaneously to multiple d3d12 queues.
2023-04-28 21:04:02 +02:00
fa63da6030
vkd3d: Track all descriptor heaps bound during command list recording and flush their writes.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54895
2023-04-28 21:04:02 +02:00
d3876e49bc
tests: Add tests for ddx(), ddy() intrinsics.
...
Thanks to Giovanni for the second set of tests! Note that the
tolerance for the final pixel was set much higher than the others;
this test seems to be an issue for some devices (in my case, a 7900
XTX running RADV).
Co-authored-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com >
2023-04-28 21:03:43 +02:00
138c32ce88
vkd3d-shader/hlsl: Add support for ddx(), ddy() intrinsics.
...
SPIR-V already handled DSX/DSY, so only D3DBC/TPF needed new case blocks.
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com >
2023-04-28 21:03:40 +02:00
af4bb03795
vkd3d-shader/hlsl: Implement SampleBias() method.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2023-04-26 22:46:55 +02:00
c166ab9727
vkd3d-shader/hlsl: Add separate helpers to generate object methods.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2023-04-26 22:46:53 +02:00
4fe4784e8a
tests: Add a simple test for "discard".
...
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com >
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2023-04-26 22:46:52 +02:00
e541e71532
tests: Remove rtv clears in Vulkan runner.
...
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com >
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2023-04-26 22:46:52 +02:00
c74d148cbe
tests: Remove rtv clears in d3d12 runner.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2023-04-26 22:46:52 +02:00
59c63ec584
vkd3d-shader/hlsl: Handle discard statement.
...
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com >
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2023-04-26 22:46:50 +02:00
6da7d16d4c
vkd3d-shader/trace: Add separate id for discard.
...
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com >
2023-04-26 22:46:49 +02:00
06cc2e1aee
vkd3d: Collect multiple descriptor writes in a buffer and update in one call.
...
Reduces the cost of calling vkUpdateDescriptorSets() via winevulkan
and its thunks. The performance gain can be as high as 20%.
2023-04-25 22:20:17 +02:00