Bug 78700 - Debug warnings should be generated when BindAttribLocation isn't followed by a re-link
Summary: Debug warnings should be generated when BindAttribLocation isn't followed by ...
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-14 15:12 UTC by Ian Romanick
Modified: 2019-09-18 20:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ian Romanick 2014-05-14 15:12:49 UTC
We have seen applications in the past that do something like:

    glCompileShader(...);
    glAttachShader(...);
    glLinkProgram(...);

    glBindAttribLocation(...);

    draw(...);

However, the glBindAttribLocation doesn't take affect until glLinkProgram is called again.

With separate shader objects, you can't generally re-link the program because glCreateShaderProgramv implicitly deletes the shader after linking.

     glCreateShaderProgramv(...);
     glBindAttribLocation(...);   // can probably never do anything

Both of these cases should get warnings via ARB_debug callbacks.
Comment 1 Kenneth Graunke 2014-05-14 21:30:45 UTC
I actually implemented most of the infrastructure for this while tracking down whether a game actually needed to re-link so much, so I went ahead and implemented this.  Patches incoming assuming they survive Piglit.
Comment 2 Kenneth Graunke 2019-05-09 03:22:45 UTC
I sent these patches in May 2014 but apparently never landed them.  Brian even reviewed them, but had suggested predicating work on the context being a debug context.

I assume they've bitrotten pretty badly by now.

https://gitlab.freedesktop.org/kwg/mesa/tree/relink-v3
https://lists.freedesktop.org/archives/mesa-dev/2014-May/059533.html

Someone should feel free to pick this up, I'm not likely to have time...
Comment 3 Kenneth Graunke 2019-05-09 03:24:07 UTC
Also the "unreleased game" was Witcher 2, but I think they reworked their shader compilation considerably since the build I was using, so I doubt this affects it still.
Comment 4 GitLab Migration User 2019-09-18 20:23:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/979.


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.