Commit Graph

795 Commits

Author SHA1 Message Date
Francisco Casas
460abeb03e vkd3d-shader/ir: Make FOG and PSIZE write masks 0x1 on I/O normalization.
The validator checks that on normalized vsir I/O destination write masks
are always a subset of the element's write mask.

This is currently not always happening for FOG and PSIZE outputs, because
d3dbc input might use the 0xf mask instead, despite these semantics being
scalar.

Note that this problem is hidden when using varying mapping, because in
that case the vsir_program_remap_output_signature() pass, specifically
the remove_unread_output_components() function, fixes the write mask.
2025-11-10 16:15:55 +01:00
Henri Verbeet
fce89133e7 vkd3d-shader/ir: Remove VSIR_OP_DCL_IMMEDIATE_CONSTANT_BUFFER instructions. 2025-10-29 13:27:33 +01:00
Francisco Casas
f616e6c118 vkd3d-shader/ir: Validate I/O destination write masks on normalised vsir. 2025-10-29 13:23:29 +01:00
Giovanni Mascellani
6654b88407 vkd3d-shader/ir: Check that no modifier is added to a vsir program after lowering. 2025-10-27 18:48:33 +01:00
Giovanni Mascellani
b41e99c036 vkd3d-shader/ir: Use VSIR_OP_SATURATE in insert_fragment_fog_before_ret(). 2025-10-27 18:43:33 +01:00
Giovanni Mascellani
d503fbfd79 vkd3d-shader/ir: Use VSIR_OP_SATURATE in vsir_program_normalise_ps1_output(). 2025-10-27 18:43:33 +01:00
Giovanni Mascellani
617ebb9826 vkd3d-shader/ir: Explicitly assert that vsir_program_normalise_ps1_output() runs before I/O normalization. 2025-10-27 18:43:33 +01:00
Giovanni Mascellani
c1991ba785 vkd3d-shader/ir: Use VSIR_OP_SATURATE in vsir_program_lower_texcoord(). 2025-10-27 18:43:33 +01:00
Elizabeth Figura
98ca1ecbda vkd3d-shader: Lower TEXBEML instructions. 2025-10-27 18:23:20 +01:00
Elizabeth Figura
02b0a754bd vkd3d-shader: Lower TEXBEM instructions. 2025-10-27 18:14:13 +01:00
Elizabeth Figura
5363730e17 vkd3d-shader: Lower BEM instructions.
This requires an interface to specify bump mapping constants.
2025-10-27 18:06:26 +01:00
Giovanni Mascellani
86b8f2de35 vkd3d-shader/ir: Error out on unsupported source modifiers. 2025-10-16 15:15:05 +02:00
Giovanni Mascellani
c99c729513 vkd3d-shader/ir: Error out on unsupported destination modifiers. 2025-10-16 15:10:39 +02:00
Giovanni Mascellani
8a100fa06d vkd3d-shader/ir: Ignore and drop PARTIALPRECISION modifiers. 2025-10-16 14:57:56 +02:00
Giovanni Mascellani
8ec4f75654 vkd3d-shader/ir: Process all destinations when lowering SATURATE modifiers.
The instruction iterator should not be advanced when iterating
over more than one destination.
2025-10-16 14:56:30 +02:00
Giovanni Mascellani
737158e7b8 vkd3d-shader/ir: Remove SATURATE modifiers after lowering them. 2025-10-16 14:55:51 +02:00
Henri Verbeet
8df581b2d9 vkd3d-shader: Avoid referencing "ins" after insertion in vsir_program_materialise_phi_ssas_to_temps_in_function(). 2025-10-16 14:30:41 +02:00
Shaun Ren
27f0475dbe vkd3d-shader/ir: Keep source swizzles for registers with fixed masks in temp_allocator_set_src(). 2025-10-16 14:29:11 +02:00
Shaun Ren
b5e2e1dd06 vkd3d-shader/ir: Determine the correct writemask for destinations with fixed masks. 2025-10-16 14:27:29 +02:00
Henri Verbeet
e7f258c622 vkd3d-shader/d3dbc: Get the resource/sampler index from the destination operand in vsir_program_lower_texld_sm1(). 2025-10-15 12:45:39 +02:00
Conor McCarthy
997d445724 vkd3d-shader/ir: Fix the FTOU swizzle for MOVA in vsir_program_normalize_addr(). 2025-10-15 12:41:49 +02:00
Conor McCarthy
13e631779d vkd3d-shader/ir: Use an SSA intermediate in vsir_program_lower_precise_mad(). 2025-10-15 12:41:49 +02:00
Conor McCarthy
1c23976660 vkd3d-shader/ir: Fix the addition swizzle in vsir_program_lower_precise_mad().
The swizzle from vsir_swizzle_from_writemask() is for use with a
contiguous write mask starting at bit zero, but we need the final write
mask to match that of the original MAD instruction.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58746
2025-10-15 12:41:49 +02:00
Giovanni Mascellani
8b8ee542d7 vkd3d-shader/ir: Lower SATURATE modifiers to instructions. 2025-10-14 16:21:05 +02:00
Giovanni Mascellani
835044dd8e vkd3d-shader/ir: Introduce VSIR_OP_SATURATE to represent floating-point clamping to [0, 1]. 2025-10-14 15:53:26 +02:00