Conor McCarthy
c083b1d0fc
vkd3d-shader/dxil: Implement DX intrinsic GetDimensions.
2024-02-26 23:03:48 +01:00
Conor McCarthy
292bbdefbf
vkd3d-shader/dxil: Move the resource kind helper functions up.
2024-02-26 23:03:46 +01:00
Henri Verbeet
d65f331efc
configure: Build with -Wwrite-strings.
...
libs/vkd3d-shader/hlsl.c: In function ‘declare_predefined_types’:
libs/vkd3d-shader/hlsl.c:3408:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
{"technique", 9},
^~~~~~~~~~~
...
programs/vkd3d-compiler/main.c: In function ‘parse_formatting’:
programs/vkd3d-compiler/main.c:303:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
{"colour", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR},
^~~~~~~~
...
macOS tigetstr() takes a non-const char *, so account for that as well.
2024-02-22 22:46:29 +01:00
Henri Verbeet
7029d821be
configure: Build with -Wtype-limits.
...
libs/vkd3d-shader/tpf.c: In function ‘write_sm4_unary_op_with_two_destinations’:
libs/vkd3d-shader/tpf.c:4489:24: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
assert(1 - dst_idx >= 0);
^~
libs/vkd3d-shader/tpf.c: In function ‘write_sm4_binary_op_with_two_destinations’:
libs/vkd3d-shader/tpf.c:4549:24: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
assert(1 - dst_idx >= 0);
^~
2024-02-22 22:46:22 +01:00
Henri Verbeet
d155071f22
configure: Build with -Wshift-overflow=2.
2024-02-22 22:46:16 +01:00
Henri Verbeet
1ed4767765
configure: Build with -Wempty-body.
2024-02-22 22:46:11 +01:00
Henri Verbeet
773f02d82f
vkd3d: Disable "robustBufferAccess2" as well when we disable "robustBufferAccess".
...
From the validation layers: "If robustBufferAccess2 is enabled then
robustBufferAccess must also be enabled
(https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPhysicalDeviceRobustness2FeaturesEXT-robustBufferAccess2-04000 )"
2024-02-22 22:45:46 +01:00
Conor McCarthy
ba4bd651e5
vkd3d-shader/dxil: Implement DX intrinsics SampleCmp and SampleCmpLevelZero.
2024-02-22 22:45:36 +01:00
Conor McCarthy
2330ffdeda
vkd3d-shader/dxil: Implement DX intrinsics SampleBias and SampleLevel.
2024-02-22 22:45:34 +01:00
Zebediah Figura
87b1de94da
vkd3d-shader/hlsl: Check the resource format for UAVs also in hlsl_types_are_equal().
...
Spotted by Henri Verbeet.
2024-02-22 22:45:31 +01:00
Nikolay Sivov
5474d91804
vkd3d-shader/fx: Write DepthStencilView types.
2024-02-22 22:45:27 +01:00
Nikolay Sivov
371be3b60a
vkd3d-shader/hlsl: Add DepthStencilView object type.
2024-02-22 22:45:26 +01:00
Nikolay Sivov
9632adaaec
vkd3d-shader/fx: Handle fx_4+ UAV types.
2024-02-22 22:45:24 +01:00
Nikolay Sivov
e5f4f60214
vkd3d-shader/fx: Handle fx_4+ texture types.
2024-02-22 22:45:23 +01:00
Nikolay Sivov
a6057a1365
vkd3d-shader/fx: Add initial support for writing object variables.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-02-22 22:45:22 +01:00
Nikolay Sivov
c2b1714c5c
vkd3d-shader/hlsl: Add RenderTargetView object type.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-02-22 22:45:21 +01:00
Giovanni Mascellani
9c678532a7
vkd3d-shader/ir: Dump the domination relationship.
2024-02-22 22:45:16 +01:00
Giovanni Mascellani
04c2852c1a
vkd3d-shader/ir: Compute the domination relationship.
2024-02-22 22:45:15 +01:00
Giovanni Mascellani
2573d86ccf
vkd3d-shader/ir: Dump the control flow graph in the GraphViz format.
2024-02-22 22:45:14 +01:00
Giovanni Mascellani
da037b61ba
vkd3d-shader/ir: Build a representation of the control flow graph.
2024-02-22 22:45:13 +01:00
Conor McCarthy
1dffc281c9
vkd3d-shader/dxil: Implement DX intrinsic RawBufferStore.
2024-02-22 22:45:08 +01:00
Conor McCarthy
cab8b781ab
vkd3d-shader/dxil: Handle raw and structured buffers in sm6_parser_emit_dx_buffer_store().
2024-02-22 22:45:07 +01:00
Conor McCarthy
ce1875c435
vkd3d-shader/dxil: Implement DX intrinsic BufferStore.
2024-02-22 22:45:06 +01:00
Conor McCarthy
b447a725ec
tests/shader-runner: Add a test for a signed int structured buffer UAV.
...
Check for backend type mismatches resulting from the absence of
signedness in SM 6.
2024-02-22 22:45:05 +01:00
Conor McCarthy
9180ea6591
tests/shader-runner: Add a test for a signed int typed buffer UAV.
...
Check for backend type mismatches resulting from the absence of
signedness in SM 6.
2024-02-22 22:45:04 +01:00
Conor McCarthy
081c9dbc96
tests/shader-runner: Support structured buffer UAVs.
2024-02-22 22:45:02 +01:00
Henri Verbeet
edc8e38bd9
ci: Enable colour output for the tests.
...
Autodetection doesn't work, but gitlab does in fact support colour
output. Perhaps more importantly, the "Scroll to next failure" feature
essentially scans the output for red text.
2024-02-21 23:23:34 +01:00
Petrichor Park
02a3667822
vkd3d-shader/hlsl: Implement atan and atan2.
...
Also narrows some more todos on the tests.
2024-02-21 23:23:13 +01:00
Petrichor Park
69294c290b
vkd3d-shader/hlsl: Implement acos and asin trig intrinsics.
...
Tests have already been implemented in 92044d5e; this commit also reduces
the scope of some of the todos (because now they're implemented!).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55154
2024-02-21 23:23:11 +01:00
Henri Verbeet
d4223a03c8
vkd3d-shader/hlsl: Replace HLSL_MODIFIER_RASTERIZER_ORDERED with a hlsl_type.e.resource flag.
2024-02-21 23:23:08 +01:00
Henri Verbeet
49d14613a5
vkd3d-shader/hlsl: Introduce hlsl_type.e.resource.
2024-02-21 23:23:06 +01:00
Conor McCarthy
d9c68ee481
vkd3d-shader/dxil: Handle resource descriptor additional tag/value pairs.
...
These are tag/value pairs, and the current code only works if an element
type or element stride pair is present at index zero.
2024-02-20 22:50:19 +01:00
Conor McCarthy
96a0685ba6
vkd3d-shader/dxil: Implement DX intrinsic AtomicCompareExchange.
2024-02-20 22:50:16 +01:00
Conor McCarthy
560c9413c3
vkd3d-shader/dxil: Implement DX intrinsic AtomicBinOp.
2024-02-20 22:50:15 +01:00
Conor McCarthy
3906c12476
tests/shader-runner: Add tests for UAV atomic ops.
2024-02-20 22:50:13 +01:00
Conor McCarthy
a04f16918f
tests/shader-runner: Support scalar signed int probe values.
2024-02-20 22:50:12 +01:00
Henri Verbeet
54142eb0bd
tests/shader_runner: Print information about the run configuration in run_shader_tests().
2024-02-19 21:12:33 +01:00
Henri Verbeet
f15a0ace3e
tests/shader_runner: Print a summary of the runner capabilities in run_shader_tests().
2024-02-19 21:12:32 +01:00
Henri Verbeet
930fbcbb26
tests/shader_runner: Pass the runner capabilities to run_shader_tests().
...
Allowing these to be checked by run_shader_tests() itself, instead of
reimplementing those checks in each individual runner.
2024-02-19 21:12:30 +01:00
Evan Tang
7b41abaa1b
vkd3d-shader/hlsl: Support SV_PrimitiveID in pixel shaders.
2024-02-19 21:12:23 +01:00
Francisco Casas
8df34fce62
vkd3d-shader/hlsl: Emit fixme on non-direct resource stores.
...
Co-authored-by: Giovanni Mascellani <gmascellani@codeweavers.com>
These may happen when storing to structured buffers, and we are not
handling them properly yet. The included test reaches unreacheable code
before this patch.
Storing to buffers is complicated since we need to split the index
chain in two paths:
- The path within the variable where the resource is.
- The subpath to the part of the resource element that is being stored
to.
For now, we will emit a fixme when the index chain in the lhs is not a
direct resource access.
2024-02-19 21:12:14 +01:00
Nikolay Sivov
315b7c5a42
vkd3d-shader/fx: Do not align structured data section.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-02-19 21:12:09 +01:00
Nikolay Sivov
c107ec03b8
vkd3d-shader/fx: Add initial support for writing buffers descriptions.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-02-19 21:12:08 +01:00
Nikolay Sivov
656c068b32
vkd3d-shader/fx: Do not align strings for fx_4/fx_5 profiles.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-02-19 21:12:07 +01:00
Nikolay Sivov
d5f562d994
vkd3d-shader/fx: Use variable pointer in write_group().
...
The helper will need to access group annotations later, and these are
available for variables.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-02-19 21:12:05 +01:00
Francisco Casas
c249461e97
vkd3d-shader/hlsl: Parse Buffer types.
2024-02-19 21:11:55 +01:00
Francisco Casas
4fe9ab0a90
tests/shader-runner: Change probe directive syntax on shader_test files.
...
For consistency with the previous commit.
2024-02-19 21:11:53 +01:00
Francisco Casas
b08be04465
tests/shader-runner: Change resource declaration syntax on shader_test files.
...
On shader_test files, now resources should be declared this way:
[texture n] -> [srv n]
[srv buffer n] -> [srv n]
[uav n] -> [uav n]
[uav buffer n] -> [uav n]
[vertex buffer n] -> [vb n]
[render target n] -> [rtv n]
The dimension (buffer or 2D) is now specified as an additional parameter
in the "size" directive:
For 2D resources:
size (n, m) -> size (2d, n, m)
For buffers:
size (n, 1) -> size (buffer, n)
2024-02-19 21:11:52 +01:00
Francisco Casas
4d855611b7
tests/shader-runner: Support SRV buffers.
2024-02-19 21:11:51 +01:00
Francisco Casas
22a0f14a2f
tests/shader-runner: Separate resource_type into type and dimension.
...
If in the same shader_test file we have both a [buffer uav n] and a
[uav n] with the same slot "n", we want the last one to override the
first one instead of passing both resources to the backends.
Same for [buffer srv n] and [texture n] after we introduce SRV buffers.
2024-02-19 21:11:49 +01:00