[PATCH 4/6] wined3d: Implement SM4 ineg instruction.

Józef Kucia jkucia at codeweavers.com
Tue Jan 26 10:49:13 CST 2016


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/wined3d/glsl_shader.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 7c3041c..c8ba074 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -3015,6 +3015,16 @@ static void shader_glsl_relop(const struct wined3d_shader_instruction *ins)
     }
 }
 
+static void shader_glsl_ineg(const struct wined3d_shader_instruction *ins)
+{
+    struct glsl_src_param src_param;
+    DWORD write_mask;
+
+    write_mask = shader_glsl_append_dst(ins->ctx->buffer, ins);
+    shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src_param);
+    shader_addline(ins->ctx->buffer, "-%s);\n", src_param.param_str);
+}
+
 static void shader_glsl_imul(const struct wined3d_shader_instruction *ins)
 {
     struct wined3d_string_buffer *buffer = ins->ctx->buffer;
@@ -8015,7 +8025,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
     /* WINED3DSIH_IMIN                  */ shader_glsl_map2gl,
     /* WINED3DSIH_IMUL                  */ shader_glsl_imul,
     /* WINED3DSIH_INE                   */ NULL,
-    /* WINED3DSIH_INEG                  */ NULL,
+    /* WINED3DSIH_INEG                  */ shader_glsl_ineg,
     /* WINED3DSIH_ISHL                  */ shader_glsl_binop,
     /* WINED3DSIH_ITOF                  */ shader_glsl_to_float,
     /* WINED3DSIH_LABEL                 */ shader_glsl_label,
-- 
2.4.10




More information about the wine-patches mailing list