News for hackers. Stuff that matters.
Re:Apple introduces macOS Mojave by jblow on Monday June 04, 2018 @04:37PM (#17232159)
Good riddance. OpenGL has been an awful API for many years now. The drivers are way too complicated, and applications don’t have enough control to deliver smooth performance. All OpenGL does now is let you kind of mediocrily put things on the screen.
Re:Apple introduces macOS Mojave by yulaow on Monday June 04, 2018 @04:40PM (#17232183)
It would be a good riddance IF there was another universal API (Vulkan) and they would adopt it in substitution.

The fact they want to force game developers to use instead Metal is... ridiculous, especially considering the extremely low macos marketshare, particularly outside US.

Re:Apple introduces macOS Mojave by obl on Monday June 04, 2018 @04:57PM (#17232373)
Sometimes at work I daydream about this alternate reality where we let go of the idea of an universal API on top GPUs and just let vendors publish some ISA and hardware-specific libs/drivers/docs. I'm sure people would figure out nice (and less nice) abstract libraries on their own just as well.

It's so frustrating to read what the GPU is actually capable of (for example in the intel PRMs) and to know that there is absolutely no way to get the driver's compiler to do the right thing in a reliable way.

I mean imagine if icc was the only x86 compiler.

Re:Apple introduces macOS Mojave by AnIdiotOnTheNet on Monday June 04, 2018 @06:22PM (#17233169)
It's ok man, we can just keep piling on more turtles.
Re:Apple introduces macOS Mojave by ecuzzillo on Friday June 08, 2018 @05:19PM (#17269786)
I do get the impression the new more-explicit APIs help somewhat with that, no?
Re:Apple introduces macOS Mojave by pjmlp on Monday June 04, 2018 @05:09PM (#17232480)
All game engines that matter already support Metal, plus writing platform specific APIs is something that professional game developers are used to do since Atari 2600.
Re:Apple introduces macOS Mojave by treeform on Monday June 04, 2018 @05:06PM (#17232459)
What do you think about them forcing you to use Swift or Objective-C for this? Forcing you to use languages that use ref counting and object oriented pointer tables that are traversed at runtime? How much of the gains does objc_msgSend eat up? I though you are against such things?

How ugly would the JAI code to need to be to interface with this?

I wish they had a simple Metal C API, but their new API comes with a bunch of Objective-C baggage.

Re:Apple introduces macOS Mojave by thdoeunt34stnoe on Monday June 04, 2018 @07:08PM (#17233450)
Have you actually used the API? When it comes to submitting geometry and textures (some of the biggest bottlenecks), it's exactly the same as in C. You pass a pointer to your buffer of bytes and they get copied to the GPU for you.
Re:Apple introduces macOS Mojave by astrange on Monday June 04, 2018 @07:57PM (#17233781)
When you're calling any library, that simple C call invariably goes somewhere else inside the library itself. For OpenGL this is because there's always hooks for introspection, or because the GPU driver wants to implement something themselves, etc. For many other libraries it's just because people don't feel like they've written "production quality code" unless it goes through a bunch of hoops and ends up in some method with five underscores in the name.

In Metal the Obj-C abstraction is part of the design and used to eliminate any other abstraction people would want to introduce. The objects you get back from the API are implemented straight in the GPU vendor code, and the debug tools can swap the methods out for extra validation, recording, etc.

Re:Apple introduces macOS Mojave by seandougall on Tuesday June 05, 2018 @01:27AM (#17235190)
Any overhead coming from objc_msgSend is minuscule compared to the gains from things like better serialization of GPU-bound tasks and not having to synchronize repeatedly with the CPU.

If you're worried about refcounting, use ARC (which you have to with Swift anyway). First, the compiler is very smart about optimizing away retain/release/autorelease calls whenever it can. Second, when those calls do have to be made, they're implemented using vtables, and never hit objc_msgSend() in the first place.

Re:Apple introduces macOS Mojave by pjmlp on Monday June 04, 2018 @05:32PM (#17232737)
I think it is about time industry relevant OS vendors start to move away from C, kudos to Apple.