Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- libs/vkd3d-shader/hlsl_sm1.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_sm1.c b/libs/vkd3d-shader/hlsl_sm1.c index b9a681a45..d56b6894a 100644 --- a/libs/vkd3d-shader/hlsl_sm1.c +++ b/libs/vkd3d-shader/hlsl_sm1.c @@ -632,6 +632,10 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b write_sm1_binary_op(ctx, buffer, D3DSIO_ADD, &instr->reg, &arg1->reg, &arg2->reg); break;
+ case HLSL_OP2_MAX: + write_sm1_binary_op(ctx, buffer, D3DSIO_MAX, &instr->reg, &arg1->reg, &arg2->reg); + break; + case HLSL_OP2_MUL: write_sm1_binary_op(ctx, buffer, D3DSIO_MUL, &instr->reg, &arg1->reg, &arg2->reg); break;
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- libs/vkd3d-shader/hlsl_sm4.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index b344cf87d..08828b81d 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1031,6 +1031,10 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_binary_op(buffer, VKD3D_SM4_OP_DIV, &expr->node, arg1, arg2); break;
+ case HLSL_OP2_MAX: + write_sm4_binary_op(buffer, VKD3D_SM4_OP_MAX, &expr->node, arg1, arg2); + break; + case HLSL_OP2_MUL: write_sm4_binary_op(buffer, VKD3D_SM4_OP_MUL, &expr->node, arg1, arg2); break;
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 16/09/21 00:43, Zebediah Figura ha scritto:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
libs/vkd3d-shader/hlsl_sm4.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index b344cf87d..08828b81d 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1031,6 +1031,10 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_binary_op(buffer, VKD3D_SM4_OP_DIV, &expr->node, arg1, arg2); break;
case HLSL_OP2_MAX:
write_sm4_binary_op(buffer, VKD3D_SM4_OP_MAX, &expr->node, arg1, arg2);
break;
case HLSL_OP2_MUL: write_sm4_binary_op(buffer, VKD3D_SM4_OP_MUL, &expr->node, arg1, arg2); break;
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Note to myself, mostly: this is only the float version, we still need to generate imax / umax for integers (together with all the other integer ops).
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- libs/vkd3d-shader/hlsl_sm1.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_sm1.c b/libs/vkd3d-shader/hlsl_sm1.c index d56b6894a..ee2870eca 100644 --- a/libs/vkd3d-shader/hlsl_sm1.c +++ b/libs/vkd3d-shader/hlsl_sm1.c @@ -636,6 +636,10 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b write_sm1_binary_op(ctx, buffer, D3DSIO_MAX, &instr->reg, &arg1->reg, &arg2->reg); break;
+ case HLSL_OP2_MIN: + write_sm1_binary_op(ctx, buffer, D3DSIO_MIN, &instr->reg, &arg1->reg, &arg2->reg); + break; + case HLSL_OP2_MUL: write_sm1_binary_op(ctx, buffer, D3DSIO_MUL, &instr->reg, &arg1->reg, &arg2->reg); break;
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 16/09/21 00:43, Zebediah Figura ha scritto:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
libs/vkd3d-shader/hlsl_sm1.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_sm1.c b/libs/vkd3d-shader/hlsl_sm1.c index d56b6894a..ee2870eca 100644 --- a/libs/vkd3d-shader/hlsl_sm1.c +++ b/libs/vkd3d-shader/hlsl_sm1.c @@ -636,6 +636,10 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b write_sm1_binary_op(ctx, buffer, D3DSIO_MAX, &instr->reg, &arg1->reg, &arg2->reg); break;
case HLSL_OP2_MIN:
write_sm1_binary_op(ctx, buffer, D3DSIO_MIN, &instr->reg, &arg1->reg, &arg2->reg);
break;
case HLSL_OP2_MUL: write_sm1_binary_op(ctx, buffer, D3DSIO_MUL, &instr->reg, &arg1->reg, &arg2->reg); break;
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Makefile.am | 1 - libs/vkd3d-shader/hlsl_sm4.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index c745dbab1..67dcbba4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -279,7 +279,6 @@ XFAIL_TESTS = \ tests/conditional.shader_test \ tests/hlsl-array-dimension.shader_test \ tests/hlsl-bool-cast.shader_test \ - tests/hlsl-clamp.shader_test \ tests/hlsl-comma.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \ tests/hlsl-for.shader_test \ diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 08828b81d..24c586c20 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1035,6 +1035,10 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_binary_op(buffer, VKD3D_SM4_OP_MAX, &expr->node, arg1, arg2); break;
+ case HLSL_OP2_MIN: + write_sm4_binary_op(buffer, VKD3D_SM4_OP_MIN, &expr->node, arg1, arg2); + break; + case HLSL_OP2_MUL: write_sm4_binary_op(buffer, VKD3D_SM4_OP_MUL, &expr->node, arg1, arg2); break;
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 16/09/21 00:43, Zebediah Figura ha scritto:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
Makefile.am | 1 - libs/vkd3d-shader/hlsl_sm4.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index c745dbab1..67dcbba4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -279,7 +279,6 @@ XFAIL_TESTS = \ tests/conditional.shader_test \ tests/hlsl-array-dimension.shader_test \ tests/hlsl-bool-cast.shader_test \
- tests/hlsl-clamp.shader_test \ tests/hlsl-comma.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \ tests/hlsl-for.shader_test \
diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 08828b81d..24c586c20 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1035,6 +1035,10 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_binary_op(buffer, VKD3D_SM4_OP_MAX, &expr->node, arg1, arg2); break;
case HLSL_OP2_MIN:
write_sm4_binary_op(buffer, VKD3D_SM4_OP_MIN, &expr->node, arg1, arg2);
break;
case HLSL_OP2_MUL: write_sm4_binary_op(buffer, VKD3D_SM4_OP_MUL, &expr->node, arg1, arg2); break;
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
From: Zebediah Figura zfigura@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2 (Matteo): Fix trivial whitespace error.
Makefile.am | 2 ++ libs/vkd3d-shader/hlsl.y | 9 +++++++++ tests/saturate.shader_test | 10 ++++++++++ 3 files changed, 21 insertions(+) create mode 100644 tests/saturate.shader_test
diff --git a/Makefile.am b/Makefile.am index 67dcbba4..45db1a16 100644 --- a/Makefile.am +++ b/Makefile.am @@ -87,6 +87,7 @@ vkd3d_shader_tests = \ tests/preproc-invalid.shader_test \ tests/preproc-macro.shader_test \ tests/preproc-misc.shader_test \ + tests/saturate.shader_test \ tests/swizzle-0.shader_test \ tests/swizzle-1.shader_test \ tests/swizzle-2.shader_test \ @@ -295,6 +296,7 @@ XFAIL_TESTS = \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/math.shader_test \ tests/max.shader_test \ + tests/saturate.shader_test \ tests/trigonometry.shader_test \ tests/writemask-assignop-1.shader_test endif diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 8f634728..fe3c3289 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1577,6 +1577,14 @@ static bool intrinsic_max(struct hlsl_ctx *ctx, return !!add_expr(ctx, params->instrs, HLSL_OP2_MAX, args, &loc); }
+static bool intrinsic_saturate(struct hlsl_ctx *ctx, + const struct parse_initializer *params, struct vkd3d_shader_location loc) +{ + struct hlsl_ir_node *args[3] = {params->args[0]}; + + return !!add_expr(ctx, params->instrs, HLSL_OP1_SAT, args, &loc); +} + static const struct intrinsic_function { const char *name; @@ -1588,6 +1596,7 @@ intrinsic_functions[] = { {"clamp", 3, true, intrinsic_clamp}, {"max", 2, true, intrinsic_max}, + {"saturate", 1, true, intrinsic_saturate}, };
static int intrinsic_function_name_compare(const void *a, const void *b) diff --git a/tests/saturate.shader_test b/tests/saturate.shader_test new file mode 100644 index 00000000..0a954e7f --- /dev/null +++ b/tests/saturate.shader_test @@ -0,0 +1,10 @@ +[pixel shader] +float4 main(uniform float2 u) : sv_target +{ + return float4(saturate(u), saturate(u.x + 0.5), saturate(-1.2)); +} + +[test] +uniform 0 float4 0.7 -0.1 0.0 0.0 +draw quad +probe all rgba (0.7, 0.0, 1.0, 0.0)
On Thu, Sep 16, 2021 at 8:56 PM Matteo Bruni mbruni@codeweavers.com wrote:
From: Zebediah Figura zfigura@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com
v2 (Matteo): Fix trivial whitespace error.
Makefile.am | 2 ++ libs/vkd3d-shader/hlsl.y | 9 +++++++++ tests/saturate.shader_test | 10 ++++++++++ 3 files changed, 21 insertions(+) create mode 100644 tests/saturate.shader_test
diff --git a/Makefile.am b/Makefile.am index 67dcbba4..45db1a16 100644 --- a/Makefile.am +++ b/Makefile.am @@ -87,6 +87,7 @@ vkd3d_shader_tests = \ tests/preproc-invalid.shader_test \ tests/preproc-macro.shader_test \ tests/preproc-misc.shader_test \
tests/saturate.shader_test \ tests/swizzle-0.shader_test \ tests/swizzle-1.shader_test \ tests/swizzle-2.shader_test \
@@ -295,6 +296,7 @@ XFAIL_TESTS = \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/math.shader_test \ tests/max.shader_test \
tests/saturate.shader_test \ tests/trigonometry.shader_test \ tests/writemask-assignop-1.shader_test
endif diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 8f634728..fe3c3289 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1577,6 +1577,14 @@ static bool intrinsic_max(struct hlsl_ctx *ctx, return !!add_expr(ctx, params->instrs, HLSL_OP2_MAX, args, &loc); }
+static bool intrinsic_saturate(struct hlsl_ctx *ctx,
const struct parse_initializer *params, struct vkd3d_shader_location loc)
+{
- struct hlsl_ir_node *args[3] = {params->args[0]};
- return !!add_expr(ctx, params->instrs, HLSL_OP1_SAT, args, &loc);
+}
static const struct intrinsic_function { const char *name; @@ -1588,6 +1596,7 @@ intrinsic_functions[] = { {"clamp", 3, true, intrinsic_clamp}, {"max", 2, true, intrinsic_max},
- {"saturate", 1, true, intrinsic_saturate},
};
static int intrinsic_function_name_compare(const void *a, const void *b) diff --git a/tests/saturate.shader_test b/tests/saturate.shader_test new file mode 100644 index 00000000..0a954e7f --- /dev/null +++ b/tests/saturate.shader_test @@ -0,0 +1,10 @@ +[pixel shader] +float4 main(uniform float2 u) : sv_target +{
- return float4(saturate(u), saturate(u.x + 0.5), saturate(-1.2));
+}
+[test] +uniform 0 float4 0.7 -0.1 0.0 0.0 +draw quad
+probe all rgba (0.7, 0.0, 1.0, 0.0)
2.26.3
I didn't mean to drop Giovanni's sign-off...
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Makefile.am | 2 ++ libs/vkd3d-shader/hlsl.y | 9 +++++++++ tests/saturate.shader_test | 11 +++++++++++ 3 files changed, 22 insertions(+) create mode 100644 tests/saturate.shader_test
diff --git a/Makefile.am b/Makefile.am index 67dcbba4e..45db1a16d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -87,6 +87,7 @@ vkd3d_shader_tests = \ tests/preproc-invalid.shader_test \ tests/preproc-macro.shader_test \ tests/preproc-misc.shader_test \ + tests/saturate.shader_test \ tests/swizzle-0.shader_test \ tests/swizzle-1.shader_test \ tests/swizzle-2.shader_test \ @@ -295,6 +296,7 @@ XFAIL_TESTS = \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/math.shader_test \ tests/max.shader_test \ + tests/saturate.shader_test \ tests/trigonometry.shader_test \ tests/writemask-assignop-1.shader_test endif diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 8f634728c..fe3c3289d 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1577,6 +1577,14 @@ static bool intrinsic_max(struct hlsl_ctx *ctx, return !!add_expr(ctx, params->instrs, HLSL_OP2_MAX, args, &loc); }
+static bool intrinsic_saturate(struct hlsl_ctx *ctx, + const struct parse_initializer *params, struct vkd3d_shader_location loc) +{ + struct hlsl_ir_node *args[3] = {params->args[0]}; + + return !!add_expr(ctx, params->instrs, HLSL_OP1_SAT, args, &loc); +} + static const struct intrinsic_function { const char *name; @@ -1588,6 +1596,7 @@ intrinsic_functions[] = { {"clamp", 3, true, intrinsic_clamp}, {"max", 2, true, intrinsic_max}, + {"saturate", 1, true, intrinsic_saturate}, };
static int intrinsic_function_name_compare(const void *a, const void *b) diff --git a/tests/saturate.shader_test b/tests/saturate.shader_test new file mode 100644 index 000000000..29461e73f --- /dev/null +++ b/tests/saturate.shader_test @@ -0,0 +1,11 @@ +[pixel shader] +float4 main(uniform float2 u) : sv_target +{ + return float4(saturate(u), saturate(u.x + 0.5), saturate(-1.2)); +} + +[test] +uniform 0 float4 0.7 -0.1 0.0 0.0 +draw quad +probe all rgba (0.7, 0.0, 1.0, 0.0) +
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 16/09/21 00:43, Zebediah Figura ha scritto:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
Makefile.am | 2 ++ libs/vkd3d-shader/hlsl.y | 9 +++++++++ tests/saturate.shader_test | 11 +++++++++++ 3 files changed, 22 insertions(+) create mode 100644 tests/saturate.shader_test
diff --git a/Makefile.am b/Makefile.am index 67dcbba4e..45db1a16d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -87,6 +87,7 @@ vkd3d_shader_tests = \ tests/preproc-invalid.shader_test \ tests/preproc-macro.shader_test \ tests/preproc-misc.shader_test \
- tests/saturate.shader_test \ tests/swizzle-0.shader_test \ tests/swizzle-1.shader_test \ tests/swizzle-2.shader_test \
@@ -295,6 +296,7 @@ XFAIL_TESTS = \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/math.shader_test \ tests/max.shader_test \
- tests/saturate.shader_test \ tests/trigonometry.shader_test \ tests/writemask-assignop-1.shader_test endif
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 8f634728c..fe3c3289d 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1577,6 +1577,14 @@ static bool intrinsic_max(struct hlsl_ctx *ctx, return !!add_expr(ctx, params->instrs, HLSL_OP2_MAX, args, &loc); }
+static bool intrinsic_saturate(struct hlsl_ctx *ctx,
const struct parse_initializer *params, struct vkd3d_shader_location loc)
+{
- struct hlsl_ir_node *args[3] = {params->args[0]};
- return !!add_expr(ctx, params->instrs, HLSL_OP1_SAT, args, &loc);
+}
- static const struct intrinsic_function { const char *name;
@@ -1588,6 +1596,7 @@ intrinsic_functions[] = { {"clamp", 3, true, intrinsic_clamp}, {"max", 2, true, intrinsic_max},
{"saturate", 1, true, intrinsic_saturate}, };
static int intrinsic_function_name_compare(const void *a, const void *b)
diff --git a/tests/saturate.shader_test b/tests/saturate.shader_test new file mode 100644 index 000000000..29461e73f --- /dev/null +++ b/tests/saturate.shader_test @@ -0,0 +1,11 @@ +[pixel shader] +float4 main(uniform float2 u) : sv_target +{
- return float4(saturate(u), saturate(u.x + 0.5), saturate(-1.2));
+}
+[test] +uniform 0 float4 0.7 -0.1 0.0 0.0 +draw quad +probe all rgba (0.7, 0.0, 1.0, 0.0)
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Makefile.am | 1 - libs/vkd3d-shader/hlsl_sm4.c | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 45db1a16d..c9ad38893 100644 --- a/Makefile.am +++ b/Makefile.am @@ -296,7 +296,6 @@ XFAIL_TESTS = \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/math.shader_test \ tests/max.shader_test \ - tests/saturate.shader_test \ tests/trigonometry.shader_test \ tests/writemask-assignop-1.shader_test endif diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 24c586c20..8a1d36322 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1023,6 +1023,12 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_unary_op(buffer, VKD3D_SM4_OP_MOV, &expr->node, arg1, VKD3D_SM4_REGISTER_MODIFIER_NEGATE); break;
+ case HLSL_OP1_SAT: + write_sm4_unary_op(buffer, VKD3D_SM4_OP_MOV + | (VKD3D_SM4_INSTRUCTION_FLAG_SATURATE << VKD3D_SM4_INSTRUCTION_FLAGS_SHIFT), + &expr->node, arg1, 0); + break; + case HLSL_OP2_ADD: write_sm4_binary_op(buffer, VKD3D_SM4_OP_ADD, &expr->node, arg1, arg2); break;
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 16/09/21 00:43, Zebediah Figura ha scritto:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
Makefile.am | 1 - libs/vkd3d-shader/hlsl_sm4.c | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 45db1a16d..c9ad38893 100644 --- a/Makefile.am +++ b/Makefile.am @@ -296,7 +296,6 @@ XFAIL_TESTS = \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/math.shader_test \ tests/max.shader_test \
- tests/saturate.shader_test \ tests/trigonometry.shader_test \ tests/writemask-assignop-1.shader_test endif
diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 24c586c20..8a1d36322 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1023,6 +1023,12 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_unary_op(buffer, VKD3D_SM4_OP_MOV, &expr->node, arg1, VKD3D_SM4_REGISTER_MODIFIER_NEGATE); break;
case HLSL_OP1_SAT:
write_sm4_unary_op(buffer, VKD3D_SM4_OP_MOV
| (VKD3D_SM4_INSTRUCTION_FLAG_SATURATE << VKD3D_SM4_INSTRUCTION_FLAGS_SHIFT),
&expr->node, arg1, 0);
break;
case HLSL_OP2_ADD: write_sm4_binary_op(buffer, VKD3D_SM4_OP_ADD, &expr->node, arg1, arg2); break;
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 16/09/21 00:43, Zebediah Figura ha scritto:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
libs/vkd3d-shader/hlsl_sm1.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_sm1.c b/libs/vkd3d-shader/hlsl_sm1.c index b9a681a45..d56b6894a 100644 --- a/libs/vkd3d-shader/hlsl_sm1.c +++ b/libs/vkd3d-shader/hlsl_sm1.c @@ -632,6 +632,10 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b write_sm1_binary_op(ctx, buffer, D3DSIO_ADD, &instr->reg, &arg1->reg, &arg2->reg); break;
case HLSL_OP2_MAX:
write_sm1_binary_op(ctx, buffer, D3DSIO_MAX, &instr->reg, &arg1->reg, &arg2->reg);
break;
case HLSL_OP2_MUL: write_sm1_binary_op(ctx, buffer, D3DSIO_MUL, &instr->reg, &arg1->reg, &arg2->reg); break;