Francisco Casas : vkd3d-shader/hlsl: Always go through implicit conversion in assignments.
Module: vkd3d Branch: master Commit: 5a1b0dbf44dea826a3f95d2c1cad023207c491a5 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/5a1b0dbf44dea826a3f95d2c1cad02... Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Wed Oct 12 14:43:26 2022 -0300 vkd3d-shader/hlsl: Always go through implicit conversion in assignments. Otherwise we silently skip some type checks. --- libs/vkd3d-shader/hlsl.y | 6 ++---- tests/cast-broadcast.shader_test | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index b804b45c..03004c60 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1636,12 +1636,10 @@ static struct hlsl_ir_node *add_assignment(struct hlsl_ctx *ctx, struct list *in } if (lhs_type->type <= HLSL_CLASS_LAST_NUMERIC) - { writemask = (1 << lhs_type->dimx) - 1; - if (!(rhs = add_implicit_conversion(ctx, instrs, rhs, lhs_type, &rhs->loc))) - return NULL; - } + if (!(rhs = add_implicit_conversion(ctx, instrs, rhs, lhs_type, &rhs->loc))) + return NULL; while (lhs->type != HLSL_IR_LOAD) { diff --git a/tests/cast-broadcast.shader_test b/tests/cast-broadcast.shader_test index f60eb758..e21e65b0 100644 --- a/tests/cast-broadcast.shader_test +++ b/tests/cast-broadcast.shader_test @@ -23,7 +23,7 @@ todo draw quad todo probe all rgba (84.0, 84.0, 84.0, 84.0) -[pixel shader fail todo] +[pixel shader fail] struct apple { float3 aa;
participants (1)
-
Alexandre Julliard