Problem with PyQt, SIP openGL on macos ARM

Iván Yossi ghevan at gmail.com
Mon Jul 26 16:06:37 BST 2021


Working versions this was before sip and pyqt changed build systems:
Sip 4.19.19
PyQt5  version with pkg name PyQt5_gpl-5.13.1.tar.gz
Qt 5.12.11


Versions that shows the problem
Sip 6.1.1
PyQt-builder 1.10.0
PyQt5 5.15.4
PyQt5_sip 12.9.0
Qt 5.12.11

Sip + pyqt works correctly when run and compiled as x86+64, but provokes the black texture load if compiled and run as arm.

Iván Yossi
<ghevan at gmail.com>
IRC: ivanyossi

El 26 de jul de 2021 9:16 -0500, Phil Thompson <phil at riverbankcomputing.com>, escribió:
> On 26/07/2021 15:08, Iván Yossi wrote:
> > Hi, Im a developer at krita and we use sip an pyqt extensively,
> > however after upgrading  SIP to version 6.1.1 and PyQt to 5.15 openGL
> > we encountered a problem only on macos on arm arquitecture.
> >
> > The problem in question is a black texture loaded and is shown on
> > terminal as:
> >
> > qt.qpa.openglcontext: Could not create NSOpenGLContext with shared
> > context, falling back to unshared context.
> > Warning: Photoshop IRB data is not padded to even size
> > qt.qpa.openglcontext: Could not create NSOpenGLContext with shared
> > context, falling back to unshared context.
> > UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is
> > unloadable and bound to sampler type (Float) - using zero texture
> > because texture unloadable
> > CoreSVG has logged an error. Set environment variabe "CORESVG_VERBOSE"
> > to learn more.
> >
> > digging around it seems the problem is that on arm macOS the M1 chip
> > openGL initialization is very sensitve needing the QSurfaceFormat
> > initialization (version 4.1 is prefered and Coreprofile) be
> > done  before any openGL context is loaded.
> >
> > The code in krita loads openGL like this and using SIP 4.19.19 does
> > show the correct textures on arm native binaries, however this is not
> > the case when moving to the more recent SIP. I tried to dig on pyqt
> > and sip code but im unfamiliar and could not come up with anything
> > useful. However I can test any patch or idea that could lead to a
> > successful texture loading on arm macOS when using current SIP.
>
> You will need to provide more version information: SIP, PyQt5.sip, PyQt
> and Qt for the working versions and the non-working versions.
>
> Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210726/ba1a963e/attachment.htm>


More information about the PyQt mailing list