Giovanni Mascellani : vkd3d-shader/hlsl: Write SM4 logic and instructions.

Alexandre Julliard julliard at winehq.org
Tue Jul 5 15:52:01 CDT 2022


Module: vkd3d
Branch: master
Commit: 15e4b9bafb74e45db2fdd2dbf8eabcb9ef949cf0
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=15e4b9bafb74e45db2fdd2dbf8eabcb9ef949cf0

Author: Giovanni Mascellani <gmascellani at codeweavers.com>
Date:   Fri Jul  1 11:23:32 2022 +0200

vkd3d-shader/hlsl: Write SM4 logic and instructions.

Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 08f9d12c..0829c5e9 100644
--- a/libs/vkd3d-shader/hlsl_sm4.c
+++ b/libs/vkd3d-shader/hlsl_sm4.c
@@ -1846,6 +1846,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]




More information about the wine-cvs mailing list