<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 4, 2016 at 10:26 AM, Lawrence Rust <span dir="ltr"><<a href="mailto:lvr@softsystem.co.uk" target="_blank">lvr@softsystem.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Jim,<br>
<br>
Thanks for finding this. Apologies for causing you the problem. As you<br>
have a system which demonstrates this problem perhaps you would help<br>
debug the problem?<br>
<br>
1. Can you add this '-O UIPainterMaxCacheHW=96' to the FE command line<br>
and see if the problem continues.<br></blockquote><div><br></div><div>Behavior is the same with this option.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
2. If no change then would you add this patch:<br>
<br>
--- a/mythtv/libs/libmythui/mythrender_opengl.cpp<br>
+++ b/mythtv/libs/libmythui/mythrender_opengl.cpp<br>
@@ -1461,6 +1461,7 @@ bool MythRenderOpenGL::ClearTexture(uint tex)<br>
<br>
memset(scratch, 0, tmp_size);<br>
<br>
+ glCheck();<br>
if ((m_textures[tex].m_type == GL_TEXTURE_1D) && m_glTexImage1D)<br>
{<br>
m_glTexImage1D(m_textures[tex].m_type, 0,<br>
<br>
<br></blockquote><div><br></div><div>This does make the caption drawing problem go away, though obviously it just masks the root problem.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
If the problem is resolved by this patch then the GL error is occurring<br>
in some previous code but being detected in ClearTexture. In which case<br>
would you move the glCheck() to various lines in<br>
MythRenderOpenGL::CreateTexture to track which GL call is failing. My<br>
guess is it's in EnableTextures.<br><br></blockquote><div><br></div><div>After sprinkling glCheck() calls everywhere, it turns out the problem is calling glLineWidth(0), which happens in MythRenderOpenGL1::DrawRectPriv(). Applying std::max(1, ...) to the argument "fixes" the problem. This makes sense in the context of the behavior in the unmodified code - all the subtitle black background rectangles are drawn first, each of which gives this error, and then when all the text lines are drawn, the first one fails because of the new glCheck().</div><div><br></div><div>This is in part due to my commits eda5d2e2460d739ba9410c74f949b177865763f2 and 0bd79053bc7476bab4d7e71a86b37dc6b27ad05f which deliberately set the line pen width to 0 to deal with some Qt behavioral change, with the same rationale as your 521b12bb52ddc7282745d7dbbdd8ea2433c95dcb commit.</div><div><br></div><div>The std::max(1, ...) solution seems appropriate, and I'll commit it if you agree.</div><div><br></div><div>I guess my next puzzle is to figure out why my systems are falling back to the MythRenderOpenGL1 renderer...</div><div><br></div><div>Thanks for your help!</div><div><br></div><div>Jim</div></div></div></div>