Module: vkd3d Branch: master Commit: a5549bae3840b25277636a52c8f70ee9c1a0eb44 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/a5549bae3840b25277636a52c8f70e...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Nov 9 19:41:00 2023 -0600
vkd3d-shader/hlsl: Do not try to lower ternaries of types other than scalar or vector.
---
libs/vkd3d-shader/hlsl_codegen.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index d37bef15..1fe141a3 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -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;