From: Giovanni Mascellani Subject: [PATCH vkd3d v2 2/5] vkd3d-shader/hlsl: Write SM4 logic not instructions. Message-Id: <20220701092334.1075714-2-gmascellani@codeweavers.com> Date: Fri, 1 Jul 2022 11:23:31 +0200 In-Reply-To: <20220701092334.1075714-1-gmascellani@codeweavers.com> References: <20220701092334.1075714-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 1edc5818..08f9d12c 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1648,6 +1648,11 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_unary_op(buffer, VKD3D_SM4_OP_LOG, &expr->node, arg1, 0); break; + case HLSL_OP1_LOGIC_NOT: + assert(dst_type->base_type == HLSL_TYPE_BOOL); + write_sm4_unary_op(buffer, VKD3D_SM4_OP_NOT, &expr->node, arg1, 0); + break; + case HLSL_OP1_NEG: switch (dst_type->base_type) { diff --git a/tests/logic-operations.shader_test b/tests/logic-operations.shader_test index f888e831..87e927f4 100644 --- a/tests/logic-operations.shader_test +++ b/tests/logic-operations.shader_test @@ -22,7 +22,7 @@ float4 main() : SV_TARGET } [test] -todo draw quad +draw quad probe all rgba (0.0, 0.0, 0.0, 1.0) [pixel shader] @@ -75,7 +75,7 @@ float4 main() : SV_TARGET } [test] -todo draw quad +draw quad probe all rgba (0.0, 0.0, 0.0, 1.0) [pixel shader] @@ -128,7 +128,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