Mesa (master): mesa: Fix GetUniformLocation while compiling display lists.

Eric Anholt anholt at kemper.freedesktop.org
Fri Aug 20 17:57:19 UTC 2010


Module: Mesa
Branch: master
Commit: 5482eaba6ecd4a581377336b6409019adf67869e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5482eaba6ecd4a581377336b6409019adf67869e

Author: Nick Bowler <nbowler at draconx.ca>
Date:   Thu Aug 19 12:19:55 2010 -0400

mesa: Fix GetUniformLocation while compiling display lists.

This function was apparently missing from the display list dispatch
table, causing the generic no-op function to be called instead.  To make
matters worse, the no-op function is indistinguishable from a successful
call to GetUniformLocation.  GL specifies that GetUniformLocation is
executed immediately when compiling display lists.

Fixes fdo bug 29622.

Signed-off-by: Nick Bowler <nbowler at draconx.ca>

---

 src/mesa/main/dlist.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 727414d..5042e14 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -6070,8 +6070,15 @@ exec_GetAttribLocationARB(GLuint program, const GLchar *name)
    FLUSH_VERTICES(ctx, 0);
    return CALL_GetAttribLocationARB(ctx->Exec, (program, name));
 }
-/* XXX more shader functions needed here */
 
+static GLint GLAPIENTRY
+exec_GetUniformLocationARB(GLuint program, const GLchar *name)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   FLUSH_VERTICES(ctx, 0);
+   return CALL_GetUniformLocationARB(ctx->Exec, (program, name));
+}
+/* XXX more shader functions needed here */
 
 
 #if FEATURE_EXT_framebuffer_blit
@@ -9491,6 +9498,7 @@ _mesa_create_save_table(void)
    /* ARB 30/31/32. GL_ARB_shader_objects, GL_ARB_vertex/fragment_shader */
    SET_BindAttribLocationARB(table, exec_BindAttribLocationARB);
    SET_GetAttribLocationARB(table, exec_GetAttribLocationARB);
+   SET_GetUniformLocationARB(table, exec_GetUniformLocationARB);
    /* XXX additional functions need to be implemented here! */
 
    /* 299. GL_EXT_blend_equation_separate */




More information about the mesa-commit mailing list