mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
If program with initial contents doesn't link, try again as separable
* We can't just link ALL programs as separable to be safe, since this hits the same problem of some shaders not being valid as separable :(. * This should fix the case where a separable program with initial state was failing to link before, without breaking non-separable programs.
This commit is contained in:
@@ -628,6 +628,18 @@ bool GLResourceManager::Serialise_InitialState(GLResource res)
|
||||
|
||||
GLint status = 0;
|
||||
gl.glGetProgramiv(initProg, eGL_LINK_STATUS, &status);
|
||||
|
||||
// if it failed to link, try again as a separable program.
|
||||
// we can't do this by default because of the silly rules meaning
|
||||
// shaders need fixup to be separable-compatible.
|
||||
if(status == 0)
|
||||
{
|
||||
gl.glProgramParameteri(initProg, eGL_PROGRAM_SEPARABLE, 1);
|
||||
gl.glLinkProgram(initProg);
|
||||
|
||||
gl.glGetProgramiv(initProg, eGL_LINK_STATUS, &status);
|
||||
}
|
||||
|
||||
if(status == 0)
|
||||
{
|
||||
if(details.shaders.size() == 0)
|
||||
|
||||
Reference in New Issue
Block a user