From: Giovanni Mascellani Subject: [PATCH vkd3d 3/5] vkd3d-shader/hlsl: Write SM4 logic and instructions. Message-Id: <20220629145555.871548-3-gmascellani@codeweavers.com> Date: Wed, 29 Jun 2022 16:55:53 +0200 In-Reply-To: <20220629145555.871548-1-gmascellani@codeweavers.com> References: <20220629145555.871548-1-gmascellani@codeweavers.com> Signed-off-by: Giovanni Mascellani --- libs/vkd3d-shader/hlsl_sm4.c | 5 +++++ tests/logic-operations.shader_test | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index e806bdee..06a71abf 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1857,6 +1857,11 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, break; } + case HLSL_OP2_LOGIC_AND: + assert(dst_type->base_type == HLSL_TYPE_BOOL); + write_sm4_binary_op(buffer, VKD3D_SM4_OP_AND, &expr->node, arg1, arg2); + break; + case HLSL_OP2_LSHIFT: assert(type_is_integer(dst_type)); assert(dst_type->base_type != HLSL_TYPE_BOOL); diff --git a/tests/logic-operations.shader_test b/tests/logic-operations.shader_test index 87e927f4..032b5b23 100644 --- a/tests/logic-operations.shader_test +++ b/tests/logic-operations.shader_test @@ -35,7 +35,7 @@ float4 main() : SV_TARGET } [test] -todo draw quad +draw quad probe all rgba (0.0, 0.0, 0.0, 1.0) [pixel shader] @@ -88,7 +88,7 @@ float4 main() : SV_TARGET } [test] -todo draw quad +draw quad probe all rgba (0.0, 0.0, 0.0, 1.0) [pixel shader] @@ -141,7 +141,7 @@ float4 main() : SV_TARGET } [test] -todo draw quad +draw quad probe all rgba (0.0, 0.0, 0.0, 1.0) [pixel shader] -- 2.36.1