[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Problem with PyQt, SIP openGL on macos ARM
From:       Iván_Yossi <ghevan () gmail ! com>
Date:       2021-07-26 15:06:37
Message-ID: 0845de07-3635-47bb-b0df-3b98ef4fd3ba () Spark
[Download RAW message or body]

Working versions this was before sip and pyqt changed build systems:
Sip 4.19.19
PyQt5=C2=A0=C2=A0version with pkg name PyQt5=5Fgpl-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=5Fsip 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=C3=A1n Yossi
<ghevan=40gmail.com>
IRC: ivanyossi

El 26 de jul de 2021 9:16 -0500, Phil Thompson <phil=40riverbankcomputing=
.com>, escribi=C3=B3:
> On 26/07/2021 15:08, Iv=C3=A1n Yossi wrote:
> > Hi, Im a developer at krita and we use sip an pyqt extensively,
> > however after upgrading=C2=A0=C2=A0SIP 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=5FTEXTURE=5FINDEX=5F=
2D is
> > unloadable and bound to sampler type (=46loat) - using zero texture
> > because texture unloadable
> > CoreSVG has logged an error. Set environment variabe =22CORESVG=5FVER=
BOSE=22
> > to learn more.
> >
> > digging around it seems the problem is that on arm macOS the M1 chip
> > openGL initialization is very sensitve needing the QSurface=46ormat
> > initialization (version 4.1 is prefered and Coreprofile) be
> > done=C2=A0=C2=A0before 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

[Attachment #3 (text/html)]

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Working versions this was before sip and pyqt changed build \
systems:<br /> Sip 4.19.19<br />
PyQt5&#160;&#160;version with pkg name PyQt5_gpl-5.13.1.tar.gz<br />
Qt 5.12.11<br />
<br />
<br />
Versions that shows the problem<br />
Sip 6.1.1<br />
PyQt-builder 1.10.0<br />
PyQt5 5.15.4<br />
PyQt5_sip 12.9.0<br />
Qt 5.12.11<br />
<br />
Sip + pyqt works correctly when run and compiled as x86+64, but provokes the black \
texture load if compiled and run as arm.&#160;<br /></div> </div>
<div name="messageSignatureSection"><br />
<div class="matchFont">Iván Yossi
<div>&lt;ghevan@gmail.com&gt;</div>
<div>IRC: ivanyossi</div>
<div><br /></div>
</div>
</div>
<div name="messageReplySection">El 26 de jul de 2021 9:16 -0500, Phil Thompson \
&lt;phil@riverbankcomputing.com&gt;, escribió:<br /> <blockquote type="cite" \
style="border-left-color: grey; border-left-width: thin; border-left-style: solid; \
margin: 5px 5px;padding-left: 10px;">On 26/07/2021 15:08, Iván Yossi wrote:<br /> \
<blockquote type="cite">Hi, Im a developer at krita and we use sip an pyqt \
extensively,<br /> however after upgrading&#160;&#160;SIP to version 6.1.1 and PyQt \
to 5.15 openGL<br /> we encountered a problem only on macos on arm arquitecture.<br \
/> <br />
The problem in question is a black texture loaded and is shown on<br />
terminal as:<br />
<br />
qt.qpa.openglcontext: Could not create NSOpenGLContext with shared<br />
context, falling back to unshared context.<br />
Warning: Photoshop IRB data is not padded to even size<br />
qt.qpa.openglcontext: Could not create NSOpenGLContext with shared<br />
context, falling back to unshared context.<br />
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is<br />
unloadable and bound to sampler type (Float) - using zero texture<br />
because texture unloadable<br />
CoreSVG has logged an error. Set environment variabe "CORESVG_VERBOSE"<br />
to learn more.<br />
<br />
digging around it seems the problem is that on arm macOS the M1 chip<br />
openGL initialization is very sensitve needing the QSurfaceFormat<br />
initialization (version 4.1 is prefered and Coreprofile) be<br />
done&#160;&#160;before any openGL context is loaded.<br />
<br />
The code in krita loads openGL like this and using SIP 4.19.19 does<br />
show the correct textures on arm native binaries, however this is not<br />
the case when moving to the more recent SIP. I tried to dig on pyqt<br />
and sip code but im unfamiliar and could not come up with anything<br />
useful. However I can test any patch or idea that could lead to a<br />
successful texture loading on arm macOS when using current SIP.<br /></blockquote>
<br />
You will need to provide more version information: SIP, PyQt5.sip, PyQt<br />
and Qt for the working versions and the non-working versions.<br />
<br />
Phil<br /></blockquote>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic