diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 7c3041c2195..c8ba074aef8 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,