From d5e2c142252b7771b0310f457521392d168f89f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Sun, 28 Jun 2009 00:16:53 +0200 Subject: [PATCH] wined3d: Add a NOP ret handler to GLSL. --- dlls/wined3d/glsl_shader.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index b7007631c5..501023d7d0 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -2602,6 +2602,13 @@ static void shader_glsl_callnz(const struct wined3d_shader_instruction *ins) shader_addline(ins->ctx->buffer, "if (%s) subroutine%u();\n", src1_param.param_str, ins->src[0].reg.idx); } +static void shader_glsl_ret(const struct wined3d_shader_instruction *ins) +{ + /* No-op. The closing } is written when a new function is started, and at the end of the shader. This + * function only suppresses the unhandled instruction warning + */ +} + /********************************************* * Pixel Shader Specific Code begins here ********************************************/ @@ -4649,7 +4656,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_POW */ shader_glsl_pow, /* WINED3DSIH_RCP */ shader_glsl_rcp, /* WINED3DSIH_REP */ shader_glsl_rep, - /* WINED3DSIH_RET */ NULL, + /* WINED3DSIH_RET */ shader_glsl_ret, /* WINED3DSIH_RSQ */ shader_glsl_rsq, /* WINED3DSIH_SETP */ NULL, /* WINED3DSIH_SGE */ shader_glsl_compare, -- 2.32.0.93.g670b81a890