<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">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.<br />
<br />
The problem in question is a black texture loaded and is shown on terminal as:<br />
<br />
qt.qpa.openglcontext: Could not create NSOpenGLContext with shared 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 context, falling back to unshared context.<br />
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<br />
CoreSVG has logged an error. Set environment variabe "CORESVG_VERBOSE" to learn more.<br />
<br />
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.<br />
<br />
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.</div>
</div>
<div name="messageSignatureSection"><br />
<div class="matchFont">Iván Yossi
<div><ghevan@gmail.com></div>
<div>IRC: ivanyossi</div>
<div><br /></div>
</div>
</div>
</body>
</html>