Live data from Hacker News

Clip control on the Apple GPU

rosenzweig.io

121–127 of 127 posts

Re: Clip control on the Apple GPU

#121

OpenGL on macOS is so frustrating, that I and many other developers have basically abandoned it, and not in favor of using Metal--the easier alternative is to just no longer support Macs. Yes, OpenGL on macOS is now implemented over Metal, but unfortunately a side effect of this is that implementation-level details that were critical to debugging and profiling OpenGL just no longer exist for tools to work with. Anyth…

  > Also, Vulkan is a waste of time for anyone who isn't a large studio. No one wants to write this stuff. The most common argument is "You only write it once." No, you don't.
this is really intersting. its not my area of much knowledge but i'm really curious why that is? what are the issues exactly?

Re: Clip control on the Apple GPU

#122

OpenGL on macOS is so frustrating, that I and many other developers have basically abandoned it, and not in favor of using Metal--the easier alternative is to just no longer support Macs. Yes, OpenGL on macOS is now implemented over Metal, but unfortunately a side effect of this is that implementation-level details that were critical to debugging and profiling OpenGL just no longer exist for tools to work with. Anyth…

> Also, Vulkan is a waste of time for anyone who isn't a large studio. No one wants to write this stuff. The most common argument is "You only write it once." No, you don't. this is really intersting. its not my area of much knowledge but i'm really curious why that is? what are the issues exactly?

What others have said here is accurate. Vulkan is excessively low-level for most.

OpenGL is not API-machine precise, but widely this isn’t relevant for people who are primarily concerned with shipping products.

APIs like Vulkan, DirectX 12, and WebGPU need to exist, but there is too much fragmentation in the graphics API space now and because of this API decision making that has taken place, the situation will not be smoothed over for probably a decade.

Many people hoped for an OpenGL successor that provided API-machine precision without explicit verbosity that you could simply opt-into if you needed control. Instead what we ended up with were required definitions of API mechanics.

These aren’t obvious to implement. It also debatably moves engineering efforts to the wrong people. There are graphics programmers who should not be involved in adapter-device type programming, who instead should be focusing simply on graphics shader work and the like.

Vulkan is a textbook case of throwing the baby out with the bathwater in pursuit of a more precise API. It throws out development practicality by allowing vendor engineers to wipe their hands of things that some of us want them to take care of.

Imagine if every time you wanted to write software you first needed to probe for what CPU cores existed, and also define how to allocate memory, and also how your program should run.

This is needless. It would also create a scenario where people would say similar things like, “Well sure it’s verbose, but of course you would only write this once.”

And everyone, individually, would do this, because everyone, individually would be forced to, and they’d all have to maintain it.

And along the way, most would get it wrong. Or implement only a subset of desired behavior.

Re: Clip control on the Apple GPU

#123

Earlier quoted context omitted.

OpenCL is not an OS level API. I guarantee you they were basically just redistributing Intel and NVidia implementations. GCD isn't OS level either, it's just a library, but it is at least a new API.

> I guarantee you they were basically just redistributing Intel and NVidia implementations. OpenCL was created and open sourced by Apple. >OpenCL was initially developed by Apple Inc., which holds trademark rights, and refined into an initial proposal in collaboration with technical teams at AMD, IBM, Qualcomm, Intel, and Nvidia. OpenCL 1.0 released with Mac OS X Snow Leopard on August 28, 2009. https://en.wikipedia.…

I think you might not understand what OpenCL is. It's not software, it's a spec. Apple created the original spec and probably an initial reference implementation. Then they brought it to Kronos Group where the spec was changed and made ready for production. Then the vendors made non-reference implementations, which is thr actual code that makes OpenCL more than a curiosity. It makes no sense to say that you open sourced OpenCL because OpenCL isn't software, and it was worked on by more than Apple before its release.

I'm talking about the GPU OpenCL implementation. Implementing OpenCL on the CPU is not really a big deal. I can guarantee you that these implementations were Intel and NVidia and were just redistributed.

Re: Clip control on the Apple GPU

#124

Earlier quoted context omitted.

> I guarantee you they were basically just redistributing Intel and NVidia implementations. OpenCL was created and open sourced by Apple. >OpenCL was initially developed by Apple Inc., which holds trademark rights, and refined into an initial proposal in collaboration with technical teams at AMD, IBM, Qualcomm, Intel, and Nvidia. OpenCL 1.0 released with Mac OS X Snow Leopard on August 28, 2009. https://en.wikipedia.…

I mean, the other poster "guaranteed" it, so I don't know who to believe here.

You don't have to believe anyone. Try to run code on the GPU using OpenCL on Snow Leopard, you will be using NVidia or Intel implementations. I know as much because I've been there done that 13 years ago.

Re: Clip control on the Apple GPU

#125
post #45
post #28

Despite the progress here, for me it raises a question: Most of the old games she mentions are x86 32bit games. What's the story for how these programs are actually going to run in Asahi? Box86 [1] doesn't sound like it's projected to run on M1. Rosetta 2 on macOS allows 32-bit code to be run by a 64-bit process, which is the workaround CrossOver et. al. use (from what I understand), but that obviously won't be avail…

Someone would need to make an x86 -> ARM recompiler like Rosetta 2. That's not an easy task, but also not the task she's tackling with the GPU driver. It's not unprecedented in the open-source space though; the PCSX2 PlayStation 2 emulator for example contains a MIPS -> x86 recompiler, and the RPCS3 PlayStation 3 emulator contains a Cell -> x86 recompiler.

[deleted]

Re: Clip control on the Apple GPU

#126

Earlier quoted context omitted.

> Also, Vulkan is a waste of time for anyone who isn't a large studio. No one wants to write this stuff. The most common argument is "You only write it once." No, you don't. this is really intersting. its not my area of much knowledge but i'm really curious why that is? what are the issues exactly?

What others have said here is accurate. Vulkan is excessively low-level for most. OpenGL is not API-machine precise, but widely this isn’t relevant for people who are primarily concerned with shipping products. APIs like Vulkan, DirectX 12, and WebGPU need to exist, but there is too much fragmentation in the graphics API space now and because of this API decision making that has taken place, the situation will not be…

thanks for the reply!

so if i understand correctly, it would have been better to have an api that had more of an onramp with increasing complexity when you needed it, but instead all we got was fragmented low-level apis?

Re: Clip control on the Apple GPU

#127

Earlier quoted context omitted.

What others have said here is accurate. Vulkan is excessively low-level for most. OpenGL is not API-machine precise, but widely this isn’t relevant for people who are primarily concerned with shipping products. APIs like Vulkan, DirectX 12, and WebGPU need to exist, but there is too much fragmentation in the graphics API space now and because of this API decision making that has taken place, the situation will not be…

thanks for the reply! so if i understand correctly, it would have been better to have an api that had more of an onramp with increasing complexity when you needed it, but instead all we got was fragmented low-level apis?

Yes
Post reply on HN