Commit Graph

630 Commits

Author SHA1 Message Date
f6c35144e4 vkd3d-shader/hlsl: Support patch arrays in hlsl_reg_from_deref(). 2025-03-12 17:10:32 +01:00
261b5120f6 vkd3d-shader/hlsl: Allow non-constant indices in register_deref_usage(). 2025-03-12 17:10:32 +01:00
1c2434f4d3 vkd3d-shader/hlsl: Allow uint1-typed deref path nodes.
When derefs with non-constant indices are copy-propagated, it is
possible to end up with uint1-typed path nodes.

Also, introduce hlsl_is_vec1().
2025-03-12 17:09:35 +01:00
8f28956108 vkd3d-shader/hlsl: Fix writing the sincos extra constants.
Fixes: 4ed16108f0
2025-03-10 15:17:19 +01:00
d075c3c274 vkd3d-shader/hlsl: Fix temp allocation for ps 1.x.
Iterate over the extern vars, not the parameters. The synthesized inputs and
output don't go in the function parameters.

Fixes: 8b57a612d7
2025-03-10 15:17:19 +01:00
62196b2bf1 vkd3d-shader/hlsl: Add a hlsl_block_add_if() helper. 2025-03-10 14:56:11 +01:00
20aa37237d vkd3d-shader/hlsl: Add a hlsl_block_add_jump() helper. 2025-03-10 14:56:11 +01:00
18ca7affad vkd3d-shader/hlsl: Make min16uint into a first-class type.
And properly implement translation into some binary enumerations.
2025-03-06 17:15:15 +01:00
16be9181a0 vkd3d-shader/hlsl: Pass the correct type to base_type_get_semantic_equivalent(). 2025-03-06 17:15:15 +01:00
3cf4a4e95e vkd3d-shader/hlsl: Use common hlsl_type_is_integer() and hlsl_base_type_is_integer() helpers. 2025-03-06 17:15:15 +01:00
c2ca6b6bdf vkd3d-shader/hlsl: Emit the minimum-precision global flag when minimum-precision semantics are used.
There are other things we need to check, but this is a start.
2025-03-06 17:15:15 +01:00
055625448b vkd3d-shader/hlsl: Add a hlsl_block_add_simple_load() helper. 2025-03-05 14:12:12 +01:00
d52df527ba vkd3d-shader/hlsl: Add a hlsl_block_add_load_index() helper. 2025-03-05 14:12:12 +01:00
7b486fe239 vkd3d-shader/hlsl: Return an error expr from hlsl_add_load_component() on allocation failure. 2025-03-05 14:12:12 +01:00
009f5765df vkd3d-shader/hlsl: Return void from hlsl_block_add_store_component(). 2025-03-05 14:12:12 +01:00
9e3ac35669 vkd3d-shader/hlsl: Pass the target block to hlsl_new_store_component(). 2025-03-05 14:12:12 +01:00
e76c596d56 vkd3d-shader/hlsl: Add a hlsl_block_add_simple_store() helper. 2025-03-03 17:48:03 +01:00
fc4f440245 vkd3d-shader/hlsl: Add a hlsl_block_add_store_index() helper. 2025-03-03 17:48:03 +01:00
662d60ad6b vkd3d-shader/hlsl: Add a hlsl_block_add_expr() helper. 2025-03-03 17:48:03 +01:00
f24cc55c14 vkd3d-shader/hlsl: Remove lower_nonfloat_exprs().
The only purpose it has at this point is wrapping integer DIV in casts,
which can be moved to lower_division().
2025-03-03 17:47:42 +01:00
7cb1970952 vkd3d-shader/hlsl: Don't cast all expressions to float.
Instead, allow half, bool, int, and uint, expressions that map to the
same float op to reach sm1_generate_vsir_instr_expr().
2025-03-03 17:26:15 +01:00
2989373212 vkd3d-shader/hlsl: Add a hlsl_block_add_binary_expr() helper. 2025-02-24 16:19:07 +01:00
858b6a3e0b vkd3d-shader/hlsl: Add a hlsl_block_add_cast() helper. 2025-02-24 16:19:07 +01:00
2e09257d94 vkd3d-shader/hlsl: Add a hlsl_block_add_unary_expr() helper. 2025-02-24 16:19:07 +01:00
b7ea23303e vkd3d-shader/hlsl: Add a hlsl_block_add_float_constant() helper. 2025-02-24 16:19:07 +01:00