mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Handle scalar values in ternaries.
This commit is contained in:
committed by
Alexandre Julliard
parent
11112798c8
commit
275901557c
Notes:
Alexandre Julliard
2024-01-18 23:20:41 +01:00
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/571
@@ -4115,6 +4115,11 @@ static bool add_ternary(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
||||
if (!(cond = add_implicit_conversion(ctx, block, cond, cond_type, &cond->loc)))
|
||||
return false;
|
||||
}
|
||||
else if (common_type->dimx == 1 && common_type->dimy == 1)
|
||||
{
|
||||
common_type = hlsl_get_numeric_type(ctx, cond_type->class,
|
||||
common_type->base_type, cond_type->dimx, cond_type->dimy);
|
||||
}
|
||||
|
||||
if (!(first = add_implicit_conversion(ctx, block, first, common_type, &first->loc)))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user