vkd3d-shader/hlsl: Write SM4 right shift instructions.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Giovanni Mascellani 2022-04-06 21:24:48 +02:00 committed by Alexandre Julliard
parent 95df144c69
commit 53d7433054
2 changed files with 7 additions and 1 deletions

View File

@ -318,7 +318,6 @@ SHADER_TEST_LOG_COMPILER = tests/shader_runner
XFAIL_TESTS = \ XFAIL_TESTS = \
tests/arithmetic-float.shader_test \ tests/arithmetic-float.shader_test \
tests/arithmetic-int.shader_test \ tests/arithmetic-int.shader_test \
tests/bitwise.shader_test \
tests/cast-to-float.shader_test \ tests/cast-to-float.shader_test \
tests/cast-to-half.shader_test \ tests/cast-to-half.shader_test \
tests/cast-to-int.shader_test \ tests/cast-to-int.shader_test \

View File

@ -1866,6 +1866,13 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
break; break;
} }
case HLSL_OP2_RSHIFT:
assert(type_is_integer(dst_type));
assert(dst_type->base_type != HLSL_TYPE_BOOL);
write_sm4_binary_op(buffer, dst_type->base_type == HLSL_TYPE_INT ? VKD3D_SM4_OP_ISHR : VKD3D_SM4_OP_USHR,
&expr->node, arg1, arg2);
break;
default: default:
hlsl_fixme(ctx, &expr->node.loc, "SM4 %s expression.", debug_hlsl_expr_op(expr->op)); hlsl_fixme(ctx, &expr->node.loc, "SM4 %s expression.", debug_hlsl_expr_op(expr->op));
} }