vkd3d-shader/hlsl: Always go through implicit conversion in assignments.

Otherwise we silently skip some type checks.
This commit is contained in:
Francisco Casas 2022-10-12 14:43:26 -03:00 committed by Alexandre Julliard
parent e56db9bda5
commit 5a1b0dbf44
Notes: Alexandre Julliard 2022-10-18 00:13:00 +02:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/29
2 changed files with 3 additions and 5 deletions

View File

@ -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;
}
while (lhs->type != HLSL_IR_LOAD)
{

View File

@ -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;