Bug 29622 - glGetUniformLocation does not work between glNewList and glEndList
Summary: glGetUniformLocation does not work between glNewList and glEndList
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 13:13 UTC by Nick Bowler
Modified: 2010-08-20 11:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.