Giovanni Mascellani
172e7edf2d
vkd3d-shader: Refactor common code for vkd3d_shader_compile().
2024-03-08 23:35:54 +01:00
Giovanni Mascellani
0e5d6a97cc
vkd3d-shader: Refactor common code for vkd3d_shader_scan().
2024-03-08 23:35:54 +01:00
Giovanni Mascellani
bbd37a76fc
vkd3d-shader: Treat the HLSL case specially in vkd3d_shader_compile().
2024-03-08 23:35:54 +01:00
Giovanni Mascellani
3a1c32acd4
vkd3d-shader: Treat the HLSL case specially in vkd3d_shader_scan().
...
The other cases are similar and common code can be refactored.
Ideally the HLSL parser will eventually fit the same model, but that
will require more extensive work.
2024-03-08 23:35:53 +01:00
Giovanni Mascellani
b940d79aa8
vkd3d-shader/ir: Keep loops contiguous in the topological sort.
2024-03-08 23:35:48 +01:00
Giovanni Mascellani
cf9a023566
vkd3d-shader/ir: Dump the topological order of the control flow graph.
2024-03-08 23:35:47 +01:00
Giovanni Mascellani
ed40646c8a
vkd3d-shader/ir: Topologically sort the control flow graph.
2024-03-08 23:35:46 +01:00
Giovanni Mascellani
880d781b57
vkd3d-shader/ir: Allow adding to a block list without checking for duplicates.
2024-03-08 23:35:45 +01:00
Nikolay Sivov
75c019074a
vkd3d-shader/hlsl: Allow modifiers on buffer declarations.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-08 23:35:40 +01:00
Francisco Casas
9e9b3d263f
tests: Get detailed information on failing tests.
2024-03-08 23:35:36 +01:00
Francisco Casas
faea8cd7c8
tests: Copy autotool's testsuite driver script.
...
For the driver script to run properly it is necessary to run
"autoreconf" in the source directory and call the configure script again
in the build directory.
2024-03-08 23:35:28 +01:00
Nikolay Sivov
b13d60d805
vkd3d-shader/hlsl: Add determinant() function.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-08 23:35:23 +01:00
Giovanni Mascellani
8723b5d266
vkd3d-shader/ir: Sort each loop by block label.
2024-03-07 23:08:36 +01:00
Giovanni Mascellani
3d4092d9dc
vkd3d-shader/ir: Dump the loops in the control flow graph.
2024-03-07 23:08:35 +01:00
Giovanni Mascellani
8241ca2b67
vkd3d-shader/ir: Keep track of loops by header block.
2024-03-07 23:08:34 +01:00
Giovanni Mascellani
088a6c49a2
vkd3d-shader/ir: Keep a reference to the message context inside struct vsir_cfg.
2024-03-07 23:08:33 +01:00
Giovanni Mascellani
9ac842b36b
vkd3d-shader/ir: Compute the loops in the control flow graph.
2024-03-07 23:08:32 +01:00
Giovanni Mascellani
de15f55477
vkd3d-shader/ir: Introduce a helper to express block domination.
2024-03-07 23:08:31 +01:00
Giovanni Mascellani
c3657c4799
vkd3d-shader/ir: Add a debug buffer to struct vsir_cfg.
2024-03-07 23:08:30 +01:00
Giovanni Mascellani
c5893288d9
vkd3d-shader/ir: Properly handle function-local indexable temps when flattening control flow.
...
They have to be considered code rather than declarations, as required
for instance by the SPIR-V backend.
2024-03-07 23:08:28 +01:00
Giovanni Mascellani
6163d82485
tests: Test emitting the signature.
2024-03-07 23:08:25 +01:00
Giovanni Mascellani
9b0a9f63f7
vkd3d-compiler: Add an option to emit the signature when disassembling.
2024-03-07 23:08:25 +01:00
Giovanni Mascellani
9aa86901e3
vkd3d-shader/d3d-asm: Support emitting the shader signature.
2024-03-07 23:08:24 +01:00
Giovanni Mascellani
01a687a7fc
vkd3d-shader/d3d-asm: Refactor dumping a write mask to a dedicated function.
2024-03-07 23:08:23 +01:00
Giovanni Mascellani
9d99389663
vkd3d-shader/d3d-asm: Describe the ASM dialect with a bunch of flags instead of a plain enum.
2024-03-07 23:08:22 +01:00
Giovanni Mascellani
94d641783b
vkd3d-shader/d3d-asm: Do not make a copy of the buffer before returning it.
2024-03-07 23:08:20 +01:00
Nikolay Sivov
a0d52dc385
vkd3d-shader/hlsl: Improve VertexShader/PixelShader types handling.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:25 +01:00
Nikolay Sivov
4dd1bbae40
tests: Add some tests for shader object type names.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:25 +01:00
Nikolay Sivov
437ef0896f
vkd3d-shader/fx: Make sure to set error message for unimplemented cases.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:22 +01:00
Nikolay Sivov
8c5db57ea7
vkd3d-shader/fx: Reject fx_2_0 output without techniques.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:19 +01:00
Nikolay Sivov
dd5e42d347
vkd3d-shader/hlsl: Allow technique10 {} blocks for fx_2_0.
...
Such techniques are ignored later, but do not cause compilation errors.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:18 +01:00
Nikolay Sivov
5edbccd33b
vkd3d-shader/hlsl: Add keyword tokens for fx_5_0 shader object types.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:16 +01:00
Conor McCarthy
5082893e5d
vkd3d-shader/spirv: Always use a 64-bit write mask for IMMCONST64 src params.
...
There is no way to tell in spirv_compiler_emit_load_reg() if the write
mask is 64-bit. All loads are 32-bit except for IMMCONST64 and SSA, and
the latter ignores the mask, so the only issue lies with IMMCONST64.
2024-03-06 23:04:12 +01:00
Conor McCarthy
13143700b7
tests/shader-runner: Add raw UAV tests.
2024-03-06 23:04:11 +01:00
Francisco Casas
58c456ff2b
vkd3d-shader/d3dbc: Implement bool to float cast as MOV.
...
In SM1, bools are always represented as either 0.0f or 1.0f at runtime.
2024-03-06 23:04:07 +01:00
Francisco Casas
747511131d
vkd3d-shader/hlsl: Lower non-float operators for SM1.
2024-03-06 23:04:05 +01:00
Francisco Casas
a3319339e4
vkd3d-shader/hlsl: Lower casts to int using REINTERPRET instead.
...
I realized that it is better to lower casts to int to FLOOR+REINTERPET
instead of appending a FLOOR to all casts to int and assuming that this
is the case for all of them in d3dbc.c.
This in case we introduce new passes in the future that add casts that
we forget to lower, after the lower_casts_to_bool pass.
2024-03-06 23:04:04 +01:00
Nikolay Sivov
937d76507d
vkd3d-shader/hlsl: Implement ternary operator for older vertex profiles.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56333
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:03:59 +01:00
Henri Verbeet
f866fb95ad
Release 1.11.
2024-03-05 20:39:45 +01:00
Henri Verbeet
22d5e24bad
vkd3d-shader: Update the chained structure list for vkd3d_shader_compile().
2024-03-05 20:39:45 +01:00
Henri Verbeet
f80ae7aef1
vkd3d-shader: Document the newly supported transformations for d3dbc and HLSL sources.
2024-03-05 20:39:45 +01:00
Henri Verbeet
0885bf3082
vkd3d-utils: Restore the \since 1.11 command on D3DReflect().
...
This was effectively dropped by 8c6f5b847b
.
2024-03-05 20:39:40 +01:00
Zebediah Figura
9177df883e
vkd3d-shader/hlsl: Write the SFI0 section and "REQUIRES_ROVS" flag when ROVs are used.
2024-03-04 22:34:46 +01:00
Henri Verbeet
5c637d68da
tests/shader_runner: Set the SPIR-V feature flags based on the runner caps.
2024-03-04 22:34:38 +01:00
Henri Verbeet
015fde5e23
tests/shader_runner: Set the vkd3d-shader API version in the Vulkan runner.
2024-03-04 22:34:37 +01:00
Henri Verbeet
5552be552b
vkd3d-compiler: Compile SPIR-V shaders with the int64 and float64 features.
2024-03-04 22:34:30 +01:00
Henri Verbeet
6acca1f85e
vkd3d-shader: Add documentation for the INT64 and FLOAT64 feature flags.
2024-03-04 22:34:24 +01:00
Giovanni Mascellani
500b61c383
tests: Test how constant folding works on SM1.
2024-02-26 23:04:08 +01:00
Henri Verbeet
0914561f85
vkd3d: Store a D3D12_RESOURCE_DESC structure in struct vkd3d_image_resource_create_info.
...
Like we did before commit 6d4782ed7f
. That
commit somehow managed to change the "desc" field from
D3D12_RESOURCE_DESC to D3D12_RESOURCE_DESC1, but that breaks the ABI.
2024-02-26 23:04:05 +01:00
Victor Chiletto
7e27ae73af
vkd3d-shader/hlsl: Fix hlsl_ir_resource_store::resource cleanup.
2024-02-26 23:03:51 +01:00