Bug 29844 - (7.8.2) glGetActiveUniform incorrectly handles structs in shaders
Summary: (7.8.2) glGetActiveUniform incorrectly handles structs in shaders
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-27 13:19 UTC by Vladimir Vukicevic
Modified: 2014-04-30 06:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vladimir Vukicevic 2010-08-27 13:19:23 UTC
Given a struct in a shader, e.g.:

struct MyStruct {
  float x;
  float y;
};
uniform MyStruct u_struct;

glGetActiveUniform is supposed to enumerate "u_struct.x" and "u_struct.y" separately.  In Mesa 7.8.2, it only enumerates "u_struct".
Comment 1 Vladimir Vukicevic 2010-08-27 14:17:57 UTC
Just checked mesa from git master, via EGL -- this works correctly there.
Comment 2 Vladimir Vukicevic 2010-08-27 14:21:32 UTC
Argh, ignore that, I had the wrong EGL library in place (ANGLE, not Mesa).
Comment 3 Vladimir Vukicevic 2010-08-27 22:07:30 UTC
Ok, now really was able to run with mesa from git master -- it does not seem to have this problem.  It enumerates "u_struct.x" in my testcase correctly, so this is just a bug in the 7.8.x branch.
Comment 4 Brian Paul 2010-08-30 07:02:29 UTC
It's unlikely we'll fix this for Mesa 7.8.x.
Comment 5 Marek Olšák 2011-02-06 06:49:48 UTC
Is this still an issue with current Mesa git?
Comment 6 Tapani Pälli 2014-04-30 06:19:56 UTC
sweeping over old bugs ... this is not issue with current Mesa. When creating UniformStorage, uniforms are traversed with 'program_resource_visitor' that sets a unique name for each struct member (foo.a, foo.b). These names are returned by glGetActiveUniform call. This issue is unlikely to be fixed for Mesa 7.x so resolving as fixed.


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.