Giovanni Mascellani
1c93d706d7
vkd3d-shader/ir: Merge removing I/O declarations in the general instruction lowering pass.
2024-12-03 14:36:13 +01:00
Giovanni Mascellani
4717775abb
vkd3d-shader/ir: Remove I/O declarations before flattening hull shader phases.
2024-12-03 14:19:50 +01:00
Giovanni Mascellani
4ef946287c
vkd3d-shader/ir: Remove I/O declarations before normalising hull shader control point I/O.
2024-12-03 14:19:50 +01:00
Giovanni Mascellani
66382f0d68
vkd3d-shader/ir: Remove I/O declarations before I/O normalisation.
2024-12-03 14:19:50 +01:00
Giovanni Mascellani
18e422dfe4
vkd3d-shader/ir: Encode I/O declarations in vsir_program.
...
Most I/O registers are already described by the shader signatures.
The registers that are not do not have any property other then
being used by the program or not, so they can be collectively
described with a bitmap.
2024-12-03 14:19:24 +01:00
Elizabeth Figura
d56601c8d0
vkd3d-shader/ir: Implement exponential fog.
2024-12-02 17:12:20 +01:00
Elizabeth Figura
1fbbc82f3a
vkd3d-shader/ir: Allow controlling the fog source through a parameter.
2024-12-02 17:12:16 +01:00
Elizabeth Figura
fc98cb482f
vkd3d-shader/ir: Add a couple of traces for signature remapping.
2024-12-02 17:12:13 +01:00
Elizabeth Figura
f86d1e72a4
vkd3d-shader/ir: Allow controlling fog through parameters.
...
Fog requires several parameters to even implement the most basic of
functionality correctly, so this commit is relatively large.
2024-12-02 17:12:06 +01:00
Giovanni Mascellani
9e0c02a0ea
vkd3d-shader/ir: Evaluate OUTCONTROLPOINT usage in the patch constant phase directly.
...
Instead of using DCL_INPUT.
The main goal here is to eventually get rid of the I/O
declaration instructions. A positive side effect is that we don't
add a useless barrier to shaders which have a DCL_INPUT instruction
in the patch constant phase but don't actually read OUTCONTROLPOINT
registers.
2024-11-27 13:59:39 +01:00
Giovanni Mascellani
1cfe23569c
vkd3d-shader/ir: Synthesize the default control point phase in the HS control point I/O normaliser.
...
This makes it available to all backends, without requiring an
ad-hoc solution for each of them. It also gets rid of an
undocumented flag we're currently passing to
DCL_CONTROL_POINT_PHASE.
2024-11-27 13:57:09 +01:00
Giovanni Mascellani
2c3a7b0dd9
vkd3d-shader/ir: Validate the register type for DCL_OUTPUT_SIV instructions.
2024-11-25 20:51:29 +01:00
Giovanni Mascellani
3832e38ce0
vkd3d-shader/ir: Validate the register type for DCL_OUTPUT instructions.
2024-11-25 20:51:25 +01:00
Giovanni Mascellani
e7770eaaf6
vkd3d-shader/ir: Validate the register type for DCL_INPUT_PS_SGV instructions.
2024-11-25 20:48:39 +01:00
Giovanni Mascellani
1d9862261f
vkd3d-shader/ir: Validate the register type for DCL_INPUT_PS_SIV instructions.
2024-11-25 20:48:39 +01:00
Giovanni Mascellani
09ede1e7f2
vkd3d-shader/ir: Validate the register type for DCL_INPUT_PS instructions.
2024-11-25 20:48:39 +01:00
Giovanni Mascellani
31f6b18c84
vkd3d-shader/ir: Validate the register type for DCL_INPUT_SGV instructions.
2024-11-25 20:48:39 +01:00
Giovanni Mascellani
fadaa69b92
vkd3d-shader/ir: Validate the register type for DCL_INPUT_SIV instructions.
2024-11-25 20:48:39 +01:00
Giovanni Mascellani
b007b1dd79
vkd3d-shader/ir: Validate the register type for DCL_INPUT instructions.
2024-11-25 20:48:39 +01:00
Giovanni Mascellani
c22812e20b
vkd3d-shader/ir: Validate index count for OUTSTENCILREF registers.
2024-11-25 20:45:44 +01:00
Giovanni Mascellani
e367dc0783
vkd3d-shader/ir: Validate index count for WAVELANEINDEX registers.
2024-11-25 20:45:44 +01:00
Giovanni Mascellani
5b04a7973b
vkd3d-shader/ir: Validate index count for WAVELANECOUNT registers.
2024-11-25 20:45:44 +01:00
Giovanni Mascellani
820a545950
vkd3d-shader/ir: Validate index count for GSINSTID registers.
2024-11-25 20:45:44 +01:00
Giovanni Mascellani
07b31761fb
vkd3d-shader/ir: Validate index count for SAMPLEMASK registers.
2024-11-25 20:45:44 +01:00
Giovanni Mascellani
9f3bbad6bc
vkd3d-shader/ir: Validate index count for COVERAGE registers.
2024-11-25 20:45:44 +01:00
Giovanni Mascellani
0f362ab720
vkd3d-shader/ir: Check that tessellation system value registers are consecutive.
2024-11-23 23:19:57 +01:00
Giovanni Mascellani
5894e79064
vkd3d-shader/ir: Check that all tessellation system values appear in the patch constant signature.
2024-11-23 23:19:57 +01:00
Giovanni Mascellani
0245d22c83
vkd3d-shader/ir: Validate index count for LOCALTHREADINDEX registers.
2024-11-23 23:15:40 +01:00
Giovanni Mascellani
050840f493
vkd3d-shader/ir: Validate index count for LOCALTHREADID registers.
2024-11-23 23:15:39 +01:00
Giovanni Mascellani
595fe9a7aa
vkd3d-shader/ir: Validate index count for THREADGROUPID registers.
2024-11-23 23:15:39 +01:00
Giovanni Mascellani
fd9da5db2d
vkd3d-shader/ir: Validate index count for THREADID registers.
2024-11-23 23:15:39 +01:00
Giovanni Mascellani
26251d02a9
vkd3d-shader/ir: Validate index count for TESSCOORD registers.
2024-11-23 23:15:39 +01:00
Giovanni Mascellani
f2659c14a2
vkd3d-shader/ir: Validate index count for JOININSTID registers.
2024-11-23 23:15:39 +01:00
Giovanni Mascellani
808b28b425
vkd3d-shader/ir: Validate index count for FORKINSTID registers.
2024-11-23 23:15:39 +01:00
Giovanni Mascellani
860bb59c89
vkd3d-shader/ir: Validate index count for OUTPOINTID registers.
2024-11-23 23:15:39 +01:00
Giovanni Mascellani
0c3c4e0563
vkd3d-shader/ir: Validate index count for PRIMID registers.
2024-11-23 23:15:39 +01:00
Giovanni Mascellani
e383834049
vkd3d-shader/ir: Check that tessellation system values only appear in the patch constant signature.
2024-11-21 19:28:46 +01:00
Giovanni Mascellani
018f3e8094
vkd3d-shader/ir: Validate tessellation system values for the given tessellator domain.
2024-11-21 19:28:46 +01:00
Giovanni Mascellani
1ed8d907b3
vkd3d-shader/ir: Keep track of the tessellator domain in struct vsir_program.
2024-11-21 19:28:46 +01:00
Giovanni Mascellani
49ec9add38
vkd3d-shader/ir: Check that semantic indices for tessellation system values are not duplicated.
2024-11-21 19:28:46 +01:00
Giovanni Mascellani
8d8de1db10
vkd3d-shader/ir: Validate the semantic index for tessellation system values.
2024-11-21 19:28:46 +01:00
Giovanni Mascellani
05c87b02f6
vkd3d-shader/ir: Return an error when the FLAT_INTERPOLATION parameter is invalid.
2024-11-20 14:53:58 +01:00
Giovanni Mascellani
36510cd0be
vkd3d-shader/ir: Move applying flat interpolation to a dedicated pass.
...
I/O normalisation is already a rather complicated pass that does a
lot of things, so it's better to keep anything not strictly
related to it somewhere else.
2024-11-20 14:53:47 +01:00
Elizabeth Figura
0dc07f5cce
vkd3d-shader: Silence a spurious -Wmaybe-uninitialized in vsir_program_insert_alpha_test().
2024-11-14 14:12:13 +01:00
Conor McCarthy
2996ad6bd2
vkd3d-shader/dxil: Implement DX intrinsic SampleIndex.
2024-11-13 16:18:13 +01:00
Conor McCarthy
3d53d90d4b
vkd3d-shader/ir: Add a secondary sort by sysval for signature element register merges.
...
Fixes output signature normalisation failures in Silent Hill 2 caused by
failure of shader_signature_find_element_for_reg().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57359
2024-11-13 13:32:32 +01:00
Elizabeth Figura
fb8660c196
vkd3d-shader/ir: Add an is_pre_rasterization_shader() helper.
2024-11-05 20:00:27 +01:00
Elizabeth Figura
a10ee075ff
vkd3d-shader/ir: Force fog and point size to 1 component when normalizing I/O.
2024-11-05 19:57:41 +01:00
Henri Verbeet
e6c84862a8
vkd3d-shader/ir: Search for SV_TARGET0 vsir_program_insert_alpha_test().
...
As opposed to any SV_TARGET with register index 0. We care about the
semantic index here, not the register index.
2024-11-04 15:32:05 +01:00
Henri Verbeet
1b0248f31b
vkd3d-shader/ir: Specifically search for SV_POSITION0 in vsir_program_insert_clip_planes().
2024-11-04 15:30:44 +01:00