Module: wine Branch: master Commit: 2b46c4046ac1aab30075e9470e255c55c93847c8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b46c4046ac1aab30075e9470e...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Oct 9 20:41:47 2012 +0200
wined3d: Implement WINED3DSIH_BREAKP in the GLSL shader backend.
---
dlls/wined3d/glsl_shader.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index e2d2bb9..66c1e9d 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -3120,6 +3120,14 @@ static void shader_glsl_breakc(const struct wined3d_shader_instruction *ins) src0_param.param_str, shader_glsl_get_rel_op(ins->flags), src1_param.param_str); }
+static void shader_glsl_breakp(const struct wined3d_shader_instruction *ins) +{ + struct glsl_src_param src_param; + + shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src_param); + shader_addline(ins->ctx->buffer, "if (bool(%s)) break;\n", src_param.param_str); +} + static void shader_glsl_label(const struct wined3d_shader_instruction *ins) { shader_addline(ins->ctx->buffer, "}\n"); @@ -5131,7 +5139,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_BEM */ shader_glsl_bem, /* WINED3DSIH_BREAK */ shader_glsl_break, /* WINED3DSIH_BREAKC */ shader_glsl_breakc, - /* WINED3DSIH_BREAKP */ NULL, + /* WINED3DSIH_BREAKP */ shader_glsl_breakp, /* WINED3DSIH_CALL */ shader_glsl_call, /* WINED3DSIH_CALLNZ */ shader_glsl_callnz, /* WINED3DSIH_CMP */ shader_glsl_cmp,