vkd3d-shader/hlsl: Write SM4 uint modulus 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:46 +02:00 committed by Alexandre Julliard
parent e37f1ed26d
commit ed921151b0
2 changed files with 12 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/arithmetic-uint.shader_test \
tests/bitwise.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 \

View File

@ -1808,6 +1808,18 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
} }
break; break;
case HLSL_OP2_MOD:
switch (dst_type->base_type)
{
case HLSL_TYPE_UINT:
write_sm4_binary_op_with_two_destinations(buffer, VKD3D_SM4_OP_UDIV, &expr->node, 1, arg1, arg2);
break;
default:
hlsl_fixme(ctx, &expr->node.loc, "SM4 %s modulus expression.", dst_type_string->buffer);
}
break;
case HLSL_OP2_MUL: case HLSL_OP2_MUL:
switch (dst_type->base_type) switch (dst_type->base_type)
{ {