[PATCH vkd3d 1/5] vkd3d-shader: Write SM1 subtraction instructions.

Zebediah Figura zfigura at codeweavers.com
Mon May 31 21:41:10 CDT 2021


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 libs/vkd3d-shader/hlsl_codegen.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c
index afa096b0..7395772f 100644
--- a/libs/vkd3d-shader/hlsl_codegen.c
+++ b/libs/vkd3d-shader/hlsl_codegen.c
@@ -1733,6 +1733,10 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct bytecode_buffer *buffer,
             write_sm1_binary_op(ctx, buffer, D3DSIO_MUL, &instr->reg, &arg1->reg, &arg2->reg);
             break;
 
+        case HLSL_IR_BINOP_SUB:
+            write_sm1_binary_op(ctx, buffer, D3DSIO_SUB, &instr->reg, &arg1->reg, &arg2->reg);
+            break;
+
         case HLSL_IR_UNOP_NEG:
             write_sm1_unary_op(ctx, buffer, D3DSIO_MOV, &instr->reg, &arg1->reg, D3DSPSM_NEG);
             break;
-- 
2.31.1




More information about the wine-devel mailing list