Matteo Bruni : wined3d: Don' t flag vertex color clamping for changes on core profile.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Mar 28 09:12:36 CDT 2016
Module: wine
Branch: master
Commit: 618e825e57d65e149fa9822dc644122268e2dbde
URL: http://source.winehq.org/git/wine.git/?a=commit;h=618e825e57d65e149fa9822dc644122268e2dbde
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Fri Mar 25 22:50:25 2016 +0100
wined3d: Don't flag vertex color clamping for changes on core profile.
glClampColorARB(GL_CLAMP_VERTEX_COLOR) is not supported on core profile and
we can't use builtin color varyings there anyway.
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/glsl_shader.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 9e6a631..7c367e4 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -7345,14 +7345,24 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
pshader ? min(pshader->limits->constant_float, gl_info->limits.glsl_ps_float_constants) : 0);
checkGLcall("Find glsl program uniform locations");
- if (pshader && pshader->reg_maps.shader_version.major >= 3
- && pshader->u.ps.declared_in_count > vec4_varyings(3, gl_info))
+ if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
{
- TRACE("Shader %d needs vertex color clamping disabled.\n", program_id);
- entry->vs.vertex_color_clamp = GL_FALSE;
+ if (pshader && pshader->reg_maps.shader_version.major >= 3
+ && pshader->u.ps.declared_in_count > vec4_varyings(3, gl_info))
+ {
+ TRACE("Shader %d needs vertex color clamping disabled.\n", program_id);
+ entry->vs.vertex_color_clamp = GL_FALSE;
+ }
+ else
+ {
+ entry->vs.vertex_color_clamp = GL_FIXED_ONLY_ARB;
+ }
}
else
{
+ /* With core profile we never change vertex_color_clamp from
+ * GL_FIXED_ONLY_MODE (which is also the initial value) so we never call
+ * glClampColorARB(). */
entry->vs.vertex_color_clamp = GL_FIXED_ONLY_ARB;
}
More information about the wine-cvs
mailing list