Stefan Dösinger : wined3d: Only glBindAttribLocation used attributes.

Alexandre Julliard julliard at winehq.org
Tue Nov 6 08:24:39 CST 2007


Module: wine
Branch: master
Commit: 672ed031ce1a9d74967772de380421f6a6cd7bac
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=672ed031ce1a9d74967772de380421f6a6cd7bac

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Mon Oct 22 14:08:23 2007 +0200

wined3d: Only glBindAttribLocation used attributes.

---

 dlls/wined3d/glsl_shader.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 14ac4e3..7e79e27 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -2697,8 +2697,10 @@ static void set_glsl_shader_program(IWineD3DDevice *iface, BOOL use_ps, BOOL use
          * in order to make the bindings work, and it has to be done prior
          * to linking the GLSL program. */
         for (i = 0; i < max_attribs; ++i) {
-             snprintf(tmp_name, sizeof(tmp_name), "attrib%i", i);
-             GL_EXTCALL(glBindAttribLocationARB(programId, i, tmp_name));
+            if (((IWineD3DBaseShaderImpl*)vshader)->baseShader.reg_maps.attributes[i]) {
+                snprintf(tmp_name, sizeof(tmp_name), "attrib%i", i);
+                GL_EXTCALL(glBindAttribLocationARB(programId, i, tmp_name));
+            }
         }
         checkGLcall("glBindAttribLocationARB");
 




More information about the wine-cvs mailing list