Elizabeth Figura
eafc97bcb3
vkd3d-shader/hlsl: Pass the target block to hlsl_new_load_component().
2025-03-03 17:48:03 +01:00
Elizabeth Figura
d053f3665d
vkd3d-shader/hlsl: Pass a block to hlsl_new_void_expr().
2025-03-03 17:48:03 +01:00
Elizabeth Figura
662d60ad6b
vkd3d-shader/hlsl: Add a hlsl_block_add_expr() helper.
2025-03-03 17:48:03 +01:00
Elizabeth Figura
2989373212
vkd3d-shader/hlsl: Add a hlsl_block_add_binary_expr() helper.
2025-02-24 16:19:07 +01:00
Elizabeth Figura
858b6a3e0b
vkd3d-shader/hlsl: Add a hlsl_block_add_cast() helper.
2025-02-24 16:19:07 +01:00
Elizabeth Figura
2e09257d94
vkd3d-shader/hlsl: Add a hlsl_block_add_unary_expr() helper.
2025-02-24 16:19:07 +01:00
Elizabeth Figura
b7ea23303e
vkd3d-shader/hlsl: Add a hlsl_block_add_float_constant() helper.
2025-02-24 16:19:07 +01:00
Elizabeth Figura
e830cdee71
vkd3d-shader/hlsl: Inline add_pow_expr().
...
The helper is used in one place.
2025-02-24 16:19:07 +01:00
Elizabeth Figura
d5a2ff5c12
vkd3d-shader/hlsl: Add a hlsl_block_add_int_constant() helper.
2025-02-20 15:56:31 +01:00
Elizabeth Figura
992d20def3
vkd3d-shader/hlsl: Add a hlsl_block_add_uint_constant() helper.
2025-02-20 15:50:13 +01:00
Elizabeth Figura
602103dcf0
vkd3d-shader/hlsl: Handle error instructions in add_switch().
2025-02-05 13:18:42 +01:00
Elizabeth Figura
fb290f3847
vkd3d-shader/hlsl: Add an add_switch() helper.
2025-02-05 13:18:42 +01:00
Elizabeth Figura
f1412e422c
vkd3d-shader/hlsl: Handle error instructions in add_shader_compilation().
2025-01-29 17:58:00 +01:00
Elizabeth Figura
fbd17266cf
vkd3d-shader/hlsl: Do not abort on variable redefinition.
...
There is no harm in defining two variables with the same name.
2025-01-29 17:58:00 +01:00
Elizabeth Figura
e40d4a0e12
vkd3d-shader/hlsl: Factor out the error message into hlsl_add_var().
2025-01-29 17:58:00 +01:00
Elizabeth Figura
2863d86bcc
vkd3d-shader/hlsl: Do not define a separate scope for function parameters.
...
Remove the no longer needed code to detect redefinition in this case.
2025-01-29 17:58:00 +01:00
Shaun Ren
f4d5e05d96
vkd3d-shader/hlsl: Parse InputPatch and OutputPatch objects.
2025-01-29 17:41:51 +01:00
Shaun Ren
a77dca528a
vkd3d-shader/hlsl: Forbid declaring const variables with no initializer.
2025-01-29 17:36:58 +01:00
Elizabeth Figura
25c6d16b45
vkd3d-shader/hlsl: Use the casted value in exp().
2025-01-28 13:14:50 +01:00
Francisco Casas
4d18fb39b6
vkd3d-shader/hlsl: Don't forbid first base type cast on var assignments.
2025-01-22 14:46:02 +01:00
Francisco Casas
0a15ab702f
vkd3d-shader/hlsl: Don't count cast to param type on IN as part of OUT var's lhs.
...
If the parameter is HLSL_STORAGE_IN, we add a cast from the arg to the
param type so that it can enter the function, however this cast should
not be considered part of the lhs on the implicit assignment that happens
if the var is also HLSL_STORAGE_OUT.
2025-01-22 14:39:20 +01:00
Francisco Casas
b55fe1950e
vkd3d-shader/hlsl: Support non-size-changing lhs casts.
2025-01-22 14:38:10 +01:00
Francisco Casas
c2e224c5fb
vkd3d-shader/hlsl: Delay lowering complex casts until after parse time.
...
While so far it has been posible to do this at parse time, this must
happen after knowing if the complex cast is on the lhs or not.
The modified tests show that before this patch we are currently
miscompiling when this happens, because a complex lhs cast is transformed
into a load, and add_assigment() just stores to the generated "cast"
temp.
2025-01-22 14:34:19 +01:00
Anna (navi) Figueiredo Gomes
c7b209124b
vkd3d-shader/hlsl: Consider conversions across all parameters in function_compare().
...
For example, given two arguments, half3 and float, and two functions,
func(float, float) and func(float3, float3), fxc/d3dcompiler prefers to
widen both arguments to float3.
2025-01-22 14:18:54 +01:00
Shaun Ren
a9d7c65eb8
vkd3d-shader/hlsl: Forbid declaring parameters as both out and const.
...
Note that inout const parameters are allowed.
2025-01-21 14:03:44 +01:00