Comment 41 for bug 1583088

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Assuming the current value is 4 might be incorrect in this case but also won't cause the bug unless they also fail to call "glPixelStorei(GL_UNPACK_ALIGNMENT, 4)" somewhere that they need it to be 4.

Where you see Qt code that uses alignment 1, that's not relevant here because it will play perfectly with Mir. The problem is elsewhere... some GL unpacking without a glPixelStorei call is being done and that location expects/requires alignment of 4.

So I guess start by searching for all glTexImage2D calls and ensure they are all /immediately/ preceded by glPixelStorei. It's possible Qt already has some housekeeping for that but then the bind call happens in the middle:

Qt: glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
Qt: calls the offending Mir bind code
Qt: glTexSubImage2D or glTexImage2D

So the fix then would still be in qtdeclarative; either reorder lines 1 & 2, or add another glPixelStorei call in before the glTex*Image2D calls in Qt.