Giovanni Mascellani
49bbd98a04
vkd3d-shader/hlsl: Correctly fold casts from float.
...
I.e., without invoking undefined behavior in the compiler. The rules
are desumed from the the MSDN documentation for ftoi and ftou.
2023-09-22 11:06:28 +02:00
Nikolay Sivov
d9c984c11a
vkd3d-shader/hlsl: Add constant folding for the ternary operator.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-22 11:06:23 +02:00
Nikolay Sivov
6d1ba83856
vkd3d-shader/hlsl: Use conditional moves for arithmetic operators instead of branching.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-22 11:06:22 +02:00
Giovanni Mascellani
34b1c0fe5d
vkd3d-shader/ir: Validate source parameters.
2023-09-22 11:06:18 +02:00
Giovanni Mascellani
603170106c
vkd3d-shader/ir: Validate destination parameters.
2023-09-22 11:06:17 +02:00
Giovanni Mascellani
585e60ad3b
vkd3d-shader/ir: Validate register types.
2023-09-22 11:06:16 +02:00
Giovanni Mascellani
b09cfbda90
vkd3d-shader/ir: Validate instruction handlers.
2023-09-22 11:06:15 +02:00
Giovanni Mascellani
c052cd8998
vkd3d-shader/ir: Introduce a boilerplate to validate the generated IR.
...
For the moment the validator is trivial, it never fails. Checks will
be added incrementally.
2023-09-22 11:06:13 +02:00
Giovanni Mascellani
cf871d2cb2
vkd3d-shader: Embed the parsing location in vkd3d_shader_instruction.
...
So that it can be used for printing meaningful error locations by
downstream processors.
2023-09-22 11:06:12 +02:00
Giovanni Mascellani
531c41306d
vkd3d-shader/dxil: Destroy the SM6 parser on parsing errors.
2023-09-22 11:06:11 +02:00
Giovanni Mascellani
78220ed07e
vkd3d-shader/tpf: Destroy the SM4 parser on parsing errors.
2023-09-22 11:06:10 +02:00
Giovanni Mascellani
a2fb9588c7
vkd3d-shader/d3dbc: Destroy the SM1 parser on parsing errors.
2023-09-22 11:06:09 +02:00
Giovanni Mascellani
d1cb6b41b1
vkd3d-shader/d3dbc: Skip DCL semantic tokens properly.
2023-09-22 11:06:08 +02:00
Giovanni Mascellani
9487cc6ab5
vkd3d-shader/ir: Simplify the control flow in shader_instruction_normalise_io_params().
2023-09-22 11:06:06 +02:00
Giovanni Mascellani
5220125c9f
vkd3d-shader/ir: Fully reinitialize an instruction when making it a NOP.
2023-09-22 11:06:05 +02:00
Giovanni Mascellani
05af25eecb
vkd3d-shader: Rename shader_instruction_init().
2023-09-22 11:06:05 +02:00
Andrey Gusev
78ff0f3df4
vkd3d: Add ID3D12Device2 interface.
2023-09-22 11:05:59 +02:00
Henri Verbeet
90d4529f27
Release 1.9.
2023-09-21 19:16:32 +02:00
Zebediah Figura
9417c7cfb7
vkd3d-shader/d3dbc: Translate sm1 fragment outputs to system values.
2023-09-21 19:16:31 +02:00
Zebediah Figura
1615e5a76b
vkd3d-shader/dxbc: Map sm4 fragment outputs to system values based on their name.
2023-09-21 19:16:29 +02:00
Zebediah Figura
8c11270940
vkd3d-shader: Add definitions for more fragment output system values.
2023-09-21 19:16:29 +02:00
Zebediah Figura
fd120d8f2d
vkd3d-shader: Rename vkd3d_shader_next_stage_info to vkd3d_shader_varying_map_info.
...
It was originally intended that this structure could hold other information
about the next stage which compilation might depend on. For example, compilation
to GLSL needs to know the type of the next shader in some circumstances.
That was never actualized, and since the API is fixed at this point for 1.9, it
makes the most sense to rename the structure to match its actual scope.
The documentation was written and arranged to imply that the structure would
hold other information about the next shader than the varying map; this is
changed accordingly as well.
2023-09-21 19:16:27 +02:00
Henri Verbeet
46c7f65be8
build: Add vkd3d_shader_utils.h to libvkd3d_la_SOURCES.
2023-09-19 21:30:43 +02:00
Henri Verbeet
054ae10693
vkd3d-shader: Slightly tweak the documentation for VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER.
2023-09-19 21:30:40 +02:00
Henri Verbeet
0f2dd5f9be
vkd3d-shader: Add a \since 1.9 for VKD3D_SHADER_SV_TARGET.
2023-09-19 21:30:40 +02:00
Henri Verbeet
419c6364db
tests: Add a small test for vkd3d_shader_build_varying_map().
...
There's probably room for improvement, but this at least verifies the
function can be called.
2023-09-19 21:30:37 +02:00
Henri Verbeet
74517de783
include: Add a corresponding function pointer type for vkd3d_shader_build_varying_map().
2023-09-19 21:30:37 +02:00
Henri Verbeet
f796d8668e
vkd3d-shader: Export vkd3d_shader_build_varying_map.
2023-09-19 21:30:35 +02:00
Martin Storsjö
e597b0d80f
include: Add UUIDs for use with D3D12EnableExperimentalFeatures.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-18 21:04:59 +02:00
Martin Storsjö
b484a9e1f6
include: Add the ID3D12GraphicsCommandList{5,6,7} interfaces.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-18 21:04:59 +02:00
Martin Storsjö
5d13a90e37
include: Add DirectX 12 Agility SDK definitions.
...
This ports parts of commit 83625459c8227b0bd7b86c18946a35d3a806c80d
from wine.git into vkd3d.
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-18 21:04:56 +02:00
Henri Verbeet
da89da2bf3
vkd3d-shader: Hide support for DXIL sources.
...
Unfortunately this is not sufficiently ready to release.
2023-09-18 21:04:19 +02:00
Giovanni Mascellani
b8f2c3e1f4
tests: Relax the precision of some tests so that they pass on MoltenVK.
2023-09-18 21:04:06 +02:00
Giovanni Mascellani
ee28861837
vkd3d-shader/hlsl: Document some possibly obscure HLSL opcodes.
2023-09-14 20:28:55 +02:00
Giovanni Mascellani
f251da574c
vkd3d-shader/hlsl: Remove HLSL_OP3_LERP.
...
It is unused, and it's not clear whether it would be of any help to
have it.
2023-09-14 20:28:54 +02:00
Giovanni Mascellani
3113f167ba
ci: Do not drop artifacts after 1 day.
...
There is no point in using such a short timeout. We trust the GitLab
instance to already have a sensible default.
2023-09-14 20:28:49 +02:00
Giovanni Mascellani
d72c91ef97
ci: Run the tests on macOS.
2023-09-14 20:28:47 +02:00
Nikolay Sivov
45541dd9b2
vkd3d-shader/asm: Tweak TEXCOORD declaration name.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-13 23:11:16 +02:00
Nikolay Sivov
ee6c66eb1b
vkd3d-shader/d3dbc: Disallow 1D sampler types when writing sampler declaration.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-13 23:11:14 +02:00
Nikolay Sivov
177ea3bcbd
vkd3d-shader/hlsl: Produce 2D resource declarations and loads for tex1D().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-13 23:11:11 +02:00
Giovanni Mascellani
61b403a032
tests: Compile HLSL shaders at runtime in test_unknown_dsv_format().
2023-09-13 23:11:04 +02:00
Giovanni Mascellani
264ff9e2da
tests: Compile HLSL shaders at runtime in test_unknown_rtv_format().
2023-09-13 23:11:04 +02:00
Giovanni Mascellani
b1cae0dd1e
tests: Compile HLSL shaders at runtime in test_multiple_render_targets().
2023-09-13 23:11:04 +02:00
Giovanni Mascellani
f7354ff9e3
tests: Compile HLSL shaders at runtime in test_create_compute_pipeline_state().
2023-09-13 23:11:04 +02:00
Martin Storsjö
06399d128a
include: Add some misc D3D12 structs/enums/macros.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-13 23:10:58 +02:00
Martin Storsjö
b67279394b
include: Add some D3D12 raytracing specific structs.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-13 23:10:58 +02:00
Martin Storsjö
55c6e17fca
include: Add the D3D12_BARRIER_GROUP struct.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-13 23:10:58 +02:00
Martin Storsjö
f1c19e34d8
include: Add the ID3D12Tools interface.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-13 23:10:58 +02:00
Martin Storsjö
e9e9fdbd5e
include: Add the ID3D12VirtualizationGuestDevice interface.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-13 23:10:58 +02:00
Martin Storsjö
602d2f90d7
include: Add the ID3D12Device10 interface.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-13 23:10:58 +02:00