Bug 29622

Summary: glGetUniformLocation does not work between glNewList and glEndList
Product: Mesa Reporter: Nick Bowler <nbowler>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Nick Bowler 2010-08-17 13:13:41 UTC
Calling glGetUniformLocation between glNewList and glEndList always returns 0,
even if the variable being requested does not exist in the program.

Occurs with at least swrast and i965.  I tested both mesa 7.8.2 and git master.
Restructuring the program so that the glGetUniformLocation is called outside
of the list makes it work.

For example:

  glNewList(1, GL_COMPILE_AND_EXECUTE);
  var = glGetUniformLocation(program, "something");
  /* var will now be zero, regardless of the program or "something" */
  /* do other stuff */
  glEndList();
Comment 1 Nick Bowler 2010-08-20 11:21:05 UTC
commit 5482eaba6ecd4a581377336b6409019adf67869e
Author: Nick Bowler <nbowler@draconx.ca>
Date:   Thu Aug 19 12:19:55 2010 -0400

    mesa: Fix GetUniformLocation while compiling display lists.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.