glfw icon indicating copy to clipboard operation
glfw copied to clipboard

Apple software renderer retry

Open HinTak opened this issue 1 year ago • 10 comments

Implement automatic software renderer re-try, and run glfwinfo post-build in the headless environment.

Fixes #2080 and #2570

HinTak avatar Jun 04 '24 01:06 HinTak

If it's still useful to know, I can confirm that this works for me on macOS Apple Silicon.

It is painfully slow as the software renderer appears to use only a single core. Sadly it also seems to have a mesh render bug with a few of my examples.

jonathanhogg avatar Jul 29 '24 17:07 jonathanhogg

Correctly uses accelerated graphics for me on my M2 Macbook Air 👍

WerWolv avatar Jan 01 '25 21:01 WerWolv

I can confirm the exact same build as Werwolv runs in a virtual machine with the "Apple Software Renderer" renderer (while a regular glfw release would not work)

iTrooz avatar Jan 04 '25 10:01 iTrooz

Thanks for PR @HinTak

I'm using it for running my tiny GLFW project inside of VM with macOS Ventura 13.6.9 x86_64 and it works quite well there. I've recently started messing with setting GLFW_CONTEXT_RENDERER explicitly (and also on Linux) and found some issues which made me look into the code more carefully. I've left few notes here and there. Hope you don't mind.

sleeptightAnsiC avatar Jun 08 '25 02:06 sleeptightAnsiC

I explained at the beginning that this is mainly about Apple github CI https://github.com/glfw/glfw/issues/2570 . I can't remember why I have WGL or EGL code in there. As for headless Linux, I have already got an alternative: https://github.com/kyamagu/skia-python/blob/17a97a0e547c42acac6d9d6e0ec91960685d89a9/.github/workflows/ci.yml#L215 .

There is a EGL issue (and even a stale EGL branch) here, I believe. Linux / Mesa related comments should go there instead.

HinTak avatar Jun 08 '25 02:06 HinTak

There is a (stale) EGL branch https://github.com/glfw/glfw/tree/egldevice .

HinTak avatar Jun 08 '25 02:06 HinTak

this is mainly about Apple github CI https://github.com/glfw/glfw/issues/2570 . I can't remember why I have WGL or EGL code in there.

This is quite confusing... Not gonna lie 👀

Sorry, I simply looked at the diffs and since they show that PR touches way more code and adds more hints I though it's not only about what mentioned in the description (and not only about Apple platform itself).

I believe I know what is the source our of confusion, see commit history: Screenshot_20250608_050647 Screenshot_20250608_050727 I think you did merge glfw/context-renderer into this PR by mistake, right (?) It seems like this brings all the code that I was refering to in my comments.

Sorry once again for not noticing this in the first place. I'm not near my workstation at the moment (writing this from phone). I'll try to move my comments to proper PRs per your request, as soon as I can.

In the meantime could you take a look at the commits? It really seems like the old commit was merged into this by mistake.

sleeptightAnsiC avatar Jun 08 '25 03:06 sleeptightAnsiC

Look, can you comment on the other issue instead? https://github.com/glfw/glfw/issues/1592 . I am going to block you if you keep making unrelated comments.

HinTak avatar Jun 08 '25 03:06 HinTak

@HinTak, Your PR includes changes for more than just Apple Software Rendering. Maybe this was unintentional and a result of merging upstream, or maybe it accidentally pushes changes you didn't intend to be pushed?

Either way, it is important to review the changes before they are pulled. I suggest, if you can, simplifying the changes down to only the ones relevant to the PR (e.g., Apple Software Rendering). I hope that explains that confusion.

ColleagueRiley avatar Jun 08 '25 04:06 ColleagueRiley

@ColleagueRiley it was intentional. Explained in #1592 . It is offensive to click on "review" when not qualified to do so. Please stop now.

HinTak avatar Jun 08 '25 04:06 HinTak