[Bug 105065] Qt Programs occasionally fail to render with new Mesa (glGetProgramBinary)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 13 02:12:51 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=105065

--- Comment #1 from Scott D Phillips <scott.d.phillips at intel.com> ---
I've traced through the failure. Here is what I see happen
(line numbers are from the qt 5.10 branch):

1) qopenglshaderprogram.cpp:3825: if (binCache.load(cacheKey, q->programId()))
{

does glProgramBinary(). Mesa doesn't like the binary and sets the link
status to failure.

2) qopenglshaderprogram.cpp:3825: bool ok = q->link();

To check link status

3) qopenglshaderprogram.cpp:1297: d->glfuncs->glGetProgramiv(program,
GL_LINK_STATUS, &value);

Sees that glProgramBinary set link status to failed.

4) qopenglshaderprogram.cpp:1303: d->glfuncs->glLinkProgram(program);

Links the program, however no shaders have been attached. Because a
compat context is being used, this is valid and linking succeeds.

5) qopenglshaderprogram.cpp:1324: return d->linked;

returns true;

6) qopenglshaderprogram.cpp:3831: needsCompile = false;

Won't try to compile, have a program with no shaders at this point.


It seems like either checking link status in
QOpenGLProgramBinaryCache::setProgramBinary or not linking a program
with no shaders in QOpenGLShaderProgram::link would fix this.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180213/1ffcb0e3/attachment.html>


More information about the intel-3d-bugs mailing list