wined3d: Explicitly convert the condition to bool shader_glsl_if().

In SM4 shaders the condition is likely to be an integer instead of a bool
uniform like in SM3.
This commit is contained in:
Henri Verbeet 2014-11-17 11:29:23 +01:00 committed by Alexandre Julliard
parent 5cc7996b1f
commit 8681999eee
1 changed files with 1 additions and 1 deletions

View File

@ -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)