From 94cf432035e05188676f86be7c8921681fb9128d Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Thu, 29 Aug 2024 12:48:23 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Handle error expressions in conditions. --- libs/vkd3d-shader/hlsl.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index cd938fd5..9870eaeb 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -332,6 +332,9 @@ static void check_condition_type(struct hlsl_ctx *ctx, const struct hlsl_ir_node { const struct hlsl_type *type = cond->data_type; + if (type->class == HLSL_CLASS_ERROR) + return; + if (type->class > HLSL_CLASS_LAST_NUMERIC || type->dimx > 1 || type->dimy > 1) { struct vkd3d_string_buffer *string;