vkd3d-shader/hlsl: Do not try to lower ternaries of types other than scalar or vector.

This commit is contained in:
Zebediah Figura 2023-11-09 19:41:00 -06:00 committed by Alexandre Julliard
parent e0b1f2e273
commit a5549bae38
Notes: Alexandre Julliard 2024-01-17 22:43:18 +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/463

View File

@ -2890,6 +2890,12 @@ static bool lower_ternary(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, stru
first = expr->operands[1].node;
second = expr->operands[2].node;
if (cond->data_type->class > HLSL_CLASS_VECTOR || instr->data_type->class > HLSL_CLASS_VECTOR)
{
hlsl_fixme(ctx, &instr->loc, "Lower ternary of type other than scalar or vector.\n");
return false;
}
if (ctx->profile->major_version < 4 && ctx->profile->type == VKD3D_SHADER_TYPE_PIXEL)
{
struct hlsl_ir_node *abs, *neg;