Skip to content

vkd3d-shader/hlsl: Fold redudant casts again after lower narrowing casts.

Francisco Casas requested to merge fcasas/vkd3d:extra_fold_redudant_casts into master

lower_narrowing_casts() currently creates a new cast calling hlsl_new_cast(). This cast may be redudant, but it is not folded, which is making SM1 emit an unnecessary fixme in some shaders:

Aborting due to not yet implemented feature: SM1 "cast" expression.

Other passes that call hlsl_new_cast() are lower_int_division() and lower_int_modulus(), so the new fold_redudant_casts() pass is called after these as well.

This is the only thing left required for the HLSL compiler to properly compile the SONIC CD shaders.

Merge request reports

Loading