[PATCH vkd3d 4/5] vkd3d-shader/hlsl: Write SM4 logic or instructions.

Giovanni Mascellani gmascellani at codeweavers.com
Wed Jun 29 09:55:54 CDT 2022


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 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 06a71abf..4d9855ba 100644
--- a/libs/vkd3d-shader/hlsl_sm4.c
+++ b/libs/vkd3d-shader/hlsl_sm4.c
@@ -1862,6 +1862,11 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
             write_sm4_binary_op(buffer, VKD3D_SM4_OP_AND, &expr->node, arg1, arg2);
             break;
 
+        case HLSL_OP2_LOGIC_OR:
+            assert(dst_type->base_type == HLSL_TYPE_BOOL);
+            write_sm4_binary_op(buffer, VKD3D_SM4_OP_OR, &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 032b5b23..360ca03b 100644
--- a/tests/logic-operations.shader_test
+++ b/tests/logic-operations.shader_test
@@ -48,7 +48,7 @@ float4 main() : SV_TARGET
 }
 
 [test]
-todo draw quad
+draw quad
 probe all rgba (0.0, 1.0, 1.0, 1.0)
 
 [pixel shader]
@@ -101,7 +101,7 @@ float4 main() : SV_TARGET
 }
 
 [test]
-todo draw quad
+draw quad
 probe all rgba (0.0, 1.0, 1.0, 1.0)
 
 [pixel shader]
@@ -154,5 +154,5 @@ float4 main() : SV_TARGET
 }
 
 [test]
-todo draw quad
+draw quad
 probe all rgba (0.0, 1.0, 1.0, 1.0)
-- 
2.36.1




More information about the wine-devel mailing list