Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com --- Makefile.am | 1 - libs/vkd3d-shader/hlsl_sm4.c | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 20fee06d..cfff09eb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -287,7 +287,6 @@ XFAIL_TESTS = \ tests/cast-to-half.shader_test \ tests/cast-to-int.shader_test \ tests/cast-to-uint.shader_test \ - tests/conditional.shader_test \ tests/hlsl-array-dimension.shader_test \ tests/hlsl-bool-cast.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \ diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 8bb3dc2e..f0aa5dbf 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1562,6 +1562,31 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, break; }
+ case HLSL_OP2_GREATER: + { + const struct hlsl_type *src_type = arg1->data_type; + + switch (src_type->base_type) + { + case HLSL_TYPE_FLOAT: + write_sm4_binary_op(buffer, VKD3D_SM4_OP_LT, &expr->node, arg2, arg1); + break; + + case HLSL_TYPE_BOOL: + case HLSL_TYPE_INT: + write_sm4_binary_op(buffer, VKD3D_SM4_OP_ILT, &expr->node, arg2, arg1); + break; + + case HLSL_TYPE_UINT: + write_sm4_binary_op(buffer, VKD3D_SM4_OP_ULT, &expr->node, arg2, arg1); + break; + + default: + break; + } + break; + } + default: hlsl_fixme(ctx, &expr->node.loc, "SM4 bool "%s" expression.\n", debug_hlsl_expr_op(expr->op)); break;