<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Qt Programs occasionally fail to render with new Mesa (glGetProgramBinary)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105065#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Qt Programs occasionally fail to render with new Mesa (glGetProgramBinary)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105065">bug 105065</a>
from <span class="vcard"><a class="email" href="mailto:scott.d.phillips@intel.com" title="Scott D Phillips <scott.d.phillips@intel.com>"> <span class="fn">Scott D Phillips</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>