diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 8551cfd8..dd95c308 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1581,6 +1581,7 @@ static void write_sm4_cast(struct hlsl_ctx *ctx, switch (dst_type->base_type) { + case HLSL_TYPE_HALF: case HLSL_TYPE_FLOAT: switch (src_type->base_type) { @@ -1662,10 +1663,6 @@ static void write_sm4_cast(struct hlsl_ctx *ctx, } break; - case HLSL_TYPE_HALF: - hlsl_fixme(ctx, &expr->node.loc, "SM4 cast to half."); - break; - case HLSL_TYPE_DOUBLE: hlsl_fixme(ctx, &expr->node.loc, "SM4 cast to double."); break; diff --git a/tests/cast-to-half.shader_test b/tests/cast-to-half.shader_test index e2b66d4b..81d6bc5d 100644 --- a/tests/cast-to-half.shader_test +++ b/tests/cast-to-half.shader_test @@ -1,7 +1,7 @@ [require] shader model >= 4.0 -[pixel shader todo] +[pixel shader] float4 main(uniform int i, uniform uint u, uniform bool b, uniform float f) : sv_target { @@ -13,7 +13,7 @@ uniform 0 int -1 uniform 1 uint 3 uniform 2 int -2 uniform 3 float 0.5 -todo draw quad +draw quad probe all rgba (0.5, 0.5, 0.5, 0.5) [pixel shader]