=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Explicitly bind frag data location for fragment shader outputs.
Alexandre Julliard
julliard at winehq.org
Wed Apr 12 15:02:33 CDT 2017
Module: wine
Branch: master
Commit: 9ddc01e0c156cf7c27d395564334b69cefd37b15
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ddc01e0c156cf7c27d395564334b69cefd37b15
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Wed Apr 12 12:42:27 2017 +0200
wined3d: Explicitly bind frag data location for fragment shader outputs.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/directx.c | 2 ++
dlls/wined3d/glsl_shader.c | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 0aaa35e..319805b 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -3172,6 +3172,7 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
USE_GL_FUNC(glBeginTransformFeedback) /* OpenGL 3.0 */
USE_GL_FUNC(glBindAttribLocation) /* OpenGL 2.0 */
USE_GL_FUNC(glBindBuffer) /* OpenGL 1.5 */
+ USE_GL_FUNC(glBindFragDataLocation) /* OpenGL 3.0 */
USE_GL_FUNC(glBindVertexArray) /* OpenGL 3.0 */
USE_GL_FUNC(glBlendColor) /* OpenGL 1.4 */
USE_GL_FUNC(glBlendEquation) /* OpenGL 1.4 */
@@ -3305,6 +3306,7 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
MAP_GL_FUNCTION(glBeginQuery, glBeginQueryARB);
MAP_GL_FUNCTION(glBindAttribLocation, glBindAttribLocationARB);
MAP_GL_FUNCTION(glBindBuffer, glBindBufferARB);
+ MAP_GL_FUNCTION(glBindFragDataLocation, glBindFragDataLocationEXT);
MAP_GL_FUNCTION(glBlendColor, glBlendColorEXT);
MAP_GL_FUNCTION(glBlendEquation, glBlendEquationEXT);
MAP_GL_FUNCTION(glBlendEquationSeparate, glBlendEquationSeparateEXT);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 1631768..2eba072 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -9254,7 +9254,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
{
/* Bind vertex attributes to a corresponding index number to match
* the same index numbers as ARB_vertex_programs (makes loading
- * vertex attributes simpler). With this method, we can use the
+ * vertex attributes simpler). With this method, we can use the
* exact same code to load the attributes later for both ARB and
* GLSL shaders.
*
@@ -9279,6 +9279,12 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
}
checkGLcall("glBindAttribLocation");
string_buffer_release(&priv->string_buffers, tmp_name);
+
+ if (!needs_legacy_glsl_syntax(gl_info))
+ {
+ GL_EXTCALL(glBindFragDataLocation(program_id, 0, "ps_out"));
+ checkGLcall("glBindFragDataLocation");
+ }
}
if (gshader)
More information about the wine-cvs
mailing list