[Wine] Re: White screen after some time in WoW

Cloudef wineforum-user at winehq.org
Fri Feb 5 21:46:36 CST 2010


I don't know, could be a hit or miss. But I've got similar problems with some games, and found out the issue was the new Nvidia drivers that cause some shader functions to return NaN instead of INF+ so could you try this patch which fixes these kind of problems in Source engine games.

Like Garry's Mod dxlevel 95


Code:

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index ca05ebf..babca9b 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -2231,13 +2231,11 @@ static void shader_glsl_rcp(const struct wined3d_shader_instruction *ins)
 
     if (mask_size > 1)
     {
-        shader_addline(ins->ctx->buffer, "vec%d(%s == 0.0 ? FLT_MAX : 1.0 / %s));\n",
-                mask_size, src_param.param_str, src_param.param_str);
+	shader_addline(ins->ctx->buffer, "vec%d(1.0 / %s));\n", mask_size, src_param.param_str);
     }
     else
     {
-        shader_addline(ins->ctx->buffer, "%s == 0.0 ? FLT_MAX : 1.0 / %s);\n",
-                src_param.param_str, src_param.param_str);
+	shader_addline(ins->ctx->buffer, "%s == 0.0 ? 0.0 : 1.0 / %s);\n",src_param.param_str, src_param.param_str);
     }
 }
 









More information about the wine-users mailing list