mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Move lower of non-float expressions with the other SM1 passes.
This commit is contained in:
parent
19fd43214b
commit
8f6f875a59
Notes:
Alexandre Julliard
2024-04-09 15:44:37 -05:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/744
@ -5418,13 +5418,6 @@ int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry
|
||||
remove_unreachable_code(ctx, body);
|
||||
hlsl_transform_ir(ctx, normalize_switch_cases, body, NULL);
|
||||
|
||||
if (profile-> major_version < 4)
|
||||
{
|
||||
lower_ir(ctx, lower_nonfloat_exprs, body);
|
||||
/* Constants casted to float must be folded. */
|
||||
hlsl_transform_ir(ctx, hlsl_fold_constant_exprs, body, NULL);
|
||||
}
|
||||
|
||||
lower_ir(ctx, lower_nonconstant_vector_derefs, body);
|
||||
lower_ir(ctx, lower_casts_to_bool, body);
|
||||
lower_ir(ctx, lower_int_dot, body);
|
||||
@ -5439,6 +5432,11 @@ int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry
|
||||
lower_ir(ctx, lower_ternary, body);
|
||||
if (profile->major_version < 4)
|
||||
{
|
||||
lower_ir(ctx, lower_nonfloat_exprs, body);
|
||||
/* Constants casted to float must be folded, and new casts to bool also need to be lowered. */
|
||||
hlsl_transform_ir(ctx, hlsl_fold_constant_exprs, body, NULL);
|
||||
lower_ir(ctx, lower_casts_to_bool, body);
|
||||
|
||||
lower_ir(ctx, lower_casts_to_int, body);
|
||||
lower_ir(ctx, lower_division, body);
|
||||
lower_ir(ctx, lower_sqrt, body);
|
||||
|
Loading…
Reference in New Issue
Block a user