Problem with PyQt, SIP openGL on macos ARM

Phil Thompson phil at riverbankcomputing.com
Mon Jul 26 15:16:50 BST 2021


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


More information about the PyQt mailing list