Commit Graph

2151 Commits

Author SHA1 Message Date
89c99cccce vkd3d-shader/hlsl: Add constant folding for 'exp2'.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-22 11:06:34 +02:00
c16c5caad8 vkd3d-shader/hlsl: Add constant folding for 'fract'.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-22 11:06:33 +02:00
c69562128a vkd3d-shader/hlsl: Correctly fold casts from double. 2023-09-22 11:06:29 +02:00
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
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
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
34b1c0fe5d vkd3d-shader/ir: Validate source parameters. 2023-09-22 11:06:18 +02:00
603170106c vkd3d-shader/ir: Validate destination parameters. 2023-09-22 11:06:17 +02:00
585e60ad3b vkd3d-shader/ir: Validate register types. 2023-09-22 11:06:16 +02:00
b09cfbda90 vkd3d-shader/ir: Validate instruction handlers. 2023-09-22 11:06:15 +02:00
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
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
531c41306d vkd3d-shader/dxil: Destroy the SM6 parser on parsing errors. 2023-09-22 11:06:11 +02:00
78220ed07e vkd3d-shader/tpf: Destroy the SM4 parser on parsing errors. 2023-09-22 11:06:10 +02:00
a2fb9588c7 vkd3d-shader/d3dbc: Destroy the SM1 parser on parsing errors. 2023-09-22 11:06:09 +02:00
d1cb6b41b1 vkd3d-shader/d3dbc: Skip DCL semantic tokens properly. 2023-09-22 11:06:08 +02:00
9487cc6ab5 vkd3d-shader/ir: Simplify the control flow in shader_instruction_normalise_io_params(). 2023-09-22 11:06:06 +02:00
5220125c9f vkd3d-shader/ir: Fully reinitialize an instruction when making it a NOP. 2023-09-22 11:06:05 +02:00
05af25eecb vkd3d-shader: Rename shader_instruction_init(). 2023-09-22 11:06:05 +02:00
90d4529f27 Release 1.9. 2023-09-21 19:16:32 +02:00
9417c7cfb7 vkd3d-shader/d3dbc: Translate sm1 fragment outputs to system values. 2023-09-21 19:16:31 +02:00
1615e5a76b vkd3d-shader/dxbc: Map sm4 fragment outputs to system values based on their name. 2023-09-21 19:16:29 +02:00
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
f796d8668e vkd3d-shader: Export vkd3d_shader_build_varying_map. 2023-09-19 21:30:35 +02:00
da89da2bf3 vkd3d-shader: Hide support for DXIL sources.
Unfortunately this is not sufficiently ready to release.
2023-09-18 21:04:19 +02:00