Commit Graph

770 Commits

Author SHA1 Message Date
Henri Verbeet
c89fd93859 vkd3d-shader/ir: Require signed operands for IREM instructions. 2025-10-14 15:49:18 +02:00
Henri Verbeet
320bdd6759 vkd3d-shader/ir: Validate IDIV instructions. 2025-10-14 15:49:18 +02:00
Giovanni Mascellani
b5b5c67b34 vkd3d-shader/ir: Lower ABSNEG modifiers to instructions. 2025-10-13 19:25:51 +02:00
Giovanni Mascellani
968eb7467c vkd3d-shader/ir: Use VSIR_OP_NEG in insert_fragment_fog_before_ret(), in the common part.
The NEG source modifier is not generated any more during vsir
transformation, so it can be dropped in backends.
2025-10-13 19:13:05 +02:00
Giovanni Mascellani
ca23db5bae vkd3d-shader/ir: Use VSIR_OP_NEG in insert_fragment_fog_before_ret(), in the doubly exponential case. 2025-10-13 19:13:01 +02:00
Giovanni Mascellani
b2d47693b4 vkd3d-shader/ir: Use VSIR_OP_NEG in insert_fragment_fog_before_ret(), in the exponential case. 2025-10-13 19:12:56 +02:00
Giovanni Mascellani
786ffe69f7 vkd3d-shader/ir: Use VSIR_OP_NEG in insert_fragment_fog_before_ret(), in the linear case. 2025-10-13 19:12:51 +02:00
Giovanni Mascellani
eb1210f517 vkd3d-shader/ir: Lower NEG modifiers to instructions. 2025-10-13 19:07:01 +02:00
Giovanni Mascellani
79736ae6ff vkd3d-shader/ir: Introduce VSIR_OP_NEG to represent floating-point negation. 2025-10-13 19:06:34 +02:00
Henri Verbeet
9de229925d vkd3d-shader/ir: Handle integer division by zero in vsir_program_lower_udiv().
This achieves two things:
  - The GLSL backend no longer needs to handle this by itself. Likwise, the
    MSL backend won't have to either.
  - We no longer handle division by zero for DXIL UDiv and URem instructions,
    which leave this undefined.
2025-10-13 19:00:05 +02:00
Elizabeth Figura
dd55b15865 vkd3d-shader/ir: Implement an initial vsir copy propagation pass. 2025-10-13 18:55:42 +02:00
Elizabeth Figura
0bb8272f26 vkd3d-shader: Introduce an interface to specify sm1 shadow samplers. 2025-10-13 18:40:52 +02:00
Elizabeth Figura
8d8132b2c7 vkd3d-shader/d3dbc: Create vsir descriptor information in the parser. 2025-10-13 18:14:41 +02:00
Francisco Casas
b1672fd3fe vkd3d-shader/ir: Don't preallocate instructions in vsir_cfg_structure_list_emit_loop(). 2025-10-08 13:43:52 +02:00
Francisco Casas
aa8c935030 vkd3d-shader/ir: Don't preallocate instructions in vsir_cfg_structure_list_emit_block(). 2025-10-08 13:43:52 +02:00
Francisco Casas
26d1f4c78d vkd3d-shader/ir: Don't preallocate in vsir_program_materialise_phi_ssas_to_temps(). 2025-10-08 13:43:52 +02:00
Francisco Casas
9af4ec2b28 vkd3d-shader/ir: Don't preallocate instructions in vsir_cfg_structure_list_emit_jump(). 2025-10-08 13:43:52 +02:00
Francisco Casas
0c3828e8c9 vkd3d-shader/ir: Don't preallocate instructions in vsir_program_lower_switch_to_selection_ladder(). 2025-10-08 13:43:52 +02:00
Francisco Casas
aefa22a063 vkd3d-shader/ir: Don't preallocate instructions in cf_flattener_iterate_instruction_array(). 2025-10-08 13:43:52 +02:00
Giovanni Mascellani
112bbbb161 vkd3d-shader/ir: Lower ABS modifiers to instructions. 2025-10-08 13:30:17 +02:00
Elizabeth Figura
322c91e3f8 vkd3d-shader/ir: Introduce a vsir DCE pass. 2025-10-06 14:38:32 +02:00
Giovanni Mascellani
3c117e2331 vkd3d-shader/ir: Execute PHI SSA to TEMP materialization in each function. 2025-10-03 00:22:05 +02:00
Conor McCarthy
2d508a2fa6 vkd3d-shader: Set the program block count to the maximum for any function.
The block count is intended to be used for allocation of block info.
2025-10-03 00:22:03 +02:00
Francisco Casas
da4d5ef339 vkd3d-shader/dxil: Get rid of sm6_parser_require_space().
It's not obvious what this last remaining use of
sm6_parser_require_space() is preallocating space for, and that's as
good of a reason as any to get rid of it.
2025-10-03 00:10:06 +02:00
Francisco Casas
aa943c51ea vkd3d-shader/dxil: Handle sm6_parser_add_instruction() returning NULL.
Only calls to sm6_parser_add_instruction() where we are using the
returned vkd3d_shader_instruction are checked for, since these return
values might cause NULL dereferences if unchecked.

Other calls to sm6_parser_add_instruction() can be left alone since the
error is still recorded via sm6->p.status.
2025-10-02 23:40:56 +02:00