[PATCH 3/5] wined3d: Explicitly convert the condition to bool shader_glsl_if().
Henri Verbeet
hverbeet at codeweavers.com
Mon Nov 17 04:29:23 CST 2014
In SM4 shaders the condition is likely to be an integer instead of a bool
uniform like in SM3.
---
dlls/wined3d/glsl_shader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 7379ba2..9a0a43b 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -3360,7 +3360,7 @@ static void shader_glsl_if(const struct wined3d_shader_instruction *ins)
struct glsl_src_param src0_param;
shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param);
- shader_addline(ins->ctx->buffer, "if (%s) {\n", src0_param.param_str);
+ shader_addline(ins->ctx->buffer, "if (bool(%s)) {\n", src0_param.param_str);
}
static void shader_glsl_ifc(const struct wined3d_shader_instruction *ins)
--
1.7.10.4
More information about the wine-patches
mailing list