Module: wine
Branch: master
Commit: 14e3f71c7561d46bab0025b07c9ba5ad0dc1ad45
URL: http://source.winehq.org/git/wine.git/?a=commit;h=14e3f71c7561d46bab0025b07…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Fri May 2 12:50:15 2014 +0200
wined3d: Bump ps_1x_max_value.
Shader model 4 hardware should generally have real floats for everything, and
FLT_MAX matches the value from the Windows drivers for that kind of hardware.
OpenGL requires at least 2^10 for colors, and 2^32 for other floats.
---
dlls/wined3d/glsl_shader.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index c86d400..cece6c1 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -34,6 +34,9 @@
#include <limits.h>
#include <stdio.h>
+#ifdef HAVE_FLOAT_H
+# include <float.h>
+#endif
#include "wined3d_private.h"
@@ -6590,7 +6593,10 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
* the shader will generate incorrect results too. Unfortunately, GL deliberately doesn't
* offer a way to query this.
*/
- caps->ps_1x_max_value = 8.0;
+ if (shader_model >= 4)
+ caps->ps_1x_max_value = FLT_MAX;
+ else
+ caps->ps_1x_max_value = 1024.0f;
/* Ideally we'd only set caps like sRGB writes here if supported by both
* the shader backend and the fragment pipe, but we can get called before