• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

PS3/PS4's libGCM : first modern low-level graphics API

Man

Member
With Vulkan launched we now have all the low-level API's out and about. We had Mantle which became Vulkan. Microsoft has DirectX 12 and Apple has a mid-level API with Metal.
But before all that there existed libGCM for PS3 (and now libGNM for PS4). Who knows: Maybe it inspired Dice's technical director Johan Andersson when he (almost singlehandedly I read) designed Mantle and got the ball rolling.

I found a cool article (from June 2014) about Sony's libGCM: http://www.redgamingtech.com/ice-te...apis-sonys-libgcm-first-modern-low-level-api/
Here's the related blog article by Aras Pranckevičius (Unity): http://aras-p.info/blog/2014/05/31/rant-about-rants-about-opengl/
I’m actually quite happy that Mantle and upcoming DX12 has caused quite a stir of discussions (to be fair PS3’s libGCM was probably the first “modern to the metal” API, but everyone who knows anyting about it can’t say it). Once things shake out, we’ll be left with a better world of graphics APIs. Maybe that will be the world with more than two non-console APIs, who knows. In any case, competition is good!
Cort ‎@postgoodism
@aras_p Many thanks for acknowledging libGCM; I was getting tired of breathless Mantle/DX12/AZDO articles failing to mention that part :)
If you do a bit of googling around, other developers had previously discussed the Xbox 360, mentioning that it’s API had issues with it being fairly ‘high level’.
Jim Heji is a senior research Scientist at Electronic Arts, and Tweeted this back in April 2009 “On 360: CPU cmds to GPU -do- have cost. Issue is API. 100% fixable with API refactor – no HW flash needed. Blog, with instructions, coming.” In a conversation with Ivan-Assen Ivanov (who is the Technical Director of Haemimont Games) he’d said “I wrote an api for direct control of the gpu ring. Manual packet submission. Proves low/no cpu cost. Cert would hate it tho” with Ivan’s contribution to the topic being “Sounds good, but needs to be done by MS, right? Let’s hope they do something like that for some late-cycle graphics boost.”
It’s fairly obvious that the part where Jim Heji says that he’d “…wrote an API for direct control…” Microsoft wouldn’t like it, and they’d simply not pass the game through their quality testing. It would mean that the game / console could potentially crash out with dashboard updates in the future. It does however mean that issuing GPU commands (in other words, say getting the Xbox 360’s CPU to draw a scene) was quite a bit hungrier than it could have been, It’s likely that this is from the DX9 roots of the Xbox 360’s hardware.

Starting with the Playstation 3, it is completely and utterly possible to control the consoles command buffers manually and this wasn’t there at that point in the Xbox 360’s API life span.

An old slide:
Bi4ktUBIQAM59Xg.jpg:large
 

DieH@rd

Banned
libGCM is a reason why PS4 does not "need DX12" as many people call for [Xbone "needs DX12" because it launched with high-level API].

From the launch PS4 has great and efficient low-level API [that can always evolve into something even better].
https://twitter.com/repi/status/445327492937560064

edit-
Chris Norden, SCEA:

In terms of rendering, there was some interesting news. Norden pointed out one of the principal weaknesses of DirectX 11 and OpenGL - they need to service a vast array of different hardware. The advantage of PlayStation 4 is that it's a fixed hardware platform, meaning that the specifics of the tech can be addressed directly. (It's worth pointing out at this point that the next-gen Xbox has hardware-specific extensions on top of the standard DX11 API.)

"We can significantly enhance performance by bypassing a lot of the artificial DirectX limitations and bottlenecks that are imposed so DirectX can work across a wide range of hardware," he revealed.

The development environment is designed to be flexible enough to get code up and running quickly, but offering the option for the more adventurous developers to get more out of the platform. To that end, PlayStation 4 has two rendering APIs.

"One of them is the absolute low-level API, you're talking directly to the hardware. It's used to draw the static RAM buffers and feed them directly to the GPU," Norden shared. "It's much, much lower level than you're used to with DirectX or OpenGL but it's not quite at the driver level. It's very similar if you've programmed PS3 or PS Vita, very similar to those graphics libraries."

But on top of that Sony is also providing what it terms a "wrapper API" that more closely resembles the standard PC rendering APIs.

The cool thing about the wrapper API is that while its task is to simplify development, Sony actually provides the source code for it so if there's anything that developers don't get on with, they can adapt it themselves to better suit their project.

http://www.eurogamer.net/articles/digitalfoundry-inside-playstation-4


Simply, PS4 has a complicated but highly efficient low level API, and also a high-level "a la OpenGL" API for those who want simpler access to hardware resources.



edit2 - impression from Metro Redux dev about state of nextgen console APIs in summer of 2014

Digital Foundry: DirectX 11 vs GNMX vs GNM - what's your take on the strengths and weakness of the APIs available to developers with Xbox One and PlayStation 4? Closer to launch there were some complaints about XO driver performance and CPU overhead on GNMX.

Oles Shishkovstov: Let's put it that way - we have seen scenarios where a single CPU core was fully loaded just by issuing draw-calls on Xbox One (and that's surely on the 'mono' driver with several fast-path calls utilised). Then, the same scenario on PS4, it was actually difficult to find those draw-calls in the profile graphs, because they are using almost no time and are barely visible as a result.

In general - I don't really get why they choose DX11 as a starting point for the console. It's a console! Why care about some legacy stuff at all? On PS4, most GPU commands are just a few DWORDs written into the command buffer, let's say just a few CPU clock cycles. On Xbox One it easily could be one million times slower because of all the bookkeeping the API does.

But Microsoft is not sleeping, really. Each XDK that has been released both before and after the Xbox One launch has brought faster and faster draw-calls to the table. They added tons of features just to work around limitations of the DX11 API model. They even made a DX12/GNM style do-it-yourself API available - although we didn't ship with it on Redux due to time constraints.
http://www.eurogamer.net/articles/d...its-really-like-to-make-a-multi-platform-game
 

Man

Member
Interesting that Microsoft didn't have a low-level API for the Xbox One in the first few months seemingly.
 

DieH@rd

Banned
Interesting that Microsoft didn't have a low-level API for the Xbox One in the first few months seemingly.

Yes, there were rumblings about it from devs after Xbone launched. Example:
corrineold.png

15806.png


But in 2014 Xbox team jumped on any opportunity to fix things [both with software fixes and PR turns] when it became clear that PS4 is outselling them constantly.
 

ElTorro

I wanted to dominate the living room. Then I took an ESRAM in the knee.
I thought that PS4's libGNM and libGNMX were more of a new API than an evolution of libGCM.

Too bad that there is no public documentation for those non-devs interested.
 

BlazinAm

Junior Member
Yes, there were rumblings about it from devs after Xbone launched. Example:
corrineold.png

15806.png


But in 2014 Xbox team jumped on any opportunity to fix things [both with software fixes and PR turns] when it became clear that PS4 is outselling them constantly.

Corrinne Yu doesn't work in the game industry anymore whaaaa?
 

onQ123

Member
Yes & Cell was before it's time & the devs that actually took advantage of the SPEs should have a head start this generation.
 

EGM1966

Member
Interesting that Microsoft didn't have a low-level API for the Xbox One in the first few months seemingly.
Another element of how unprepared for launch they really were. Their used game and trade scheme wasn't fully fleshed out or communicable, their SDK was behind PS4s and of course tied to that their API infrastructure wasn't as good either.

The three OS design, focus on elements like SNAP and other non-gaming functions as well as Kinect and their memory architecture resulted in XB1 launching already on it's "back foot" as it were vs the competition. They've thrown resource at fixing a of this of course, and probably faster than they otherwise would have due to the negative effect on the console's perception.

Personally I feel the XB1 should have been revealed/launched in a schedule that started 6 to 9 months behind that they undertook, but they clearly didn't want to allow PS4 that long on the market unchallenged and went with what they had. Again my personal view but I think with hindsight the reveal and troubled response cost them more than 6 months time to finalize more of their infrastructure and plans would have but we'll never know.
 

petran79

Banned
MS rely too much on Windows and DX. Also they lost millions with OG XBOX. Problem of that console was not the performance but the marketing.
Dreamcast was the first console to implement Windows and DX, so Microsoft provided Sega with the software infrastructure.
It would be too risky to develop something from scratch. They also need Windows.
Besides, perfomance difference between XB1 and PS4 is not as great as between OG XBOX and PS2
 

STEaMkb

Member
If Vulkan becomes popular, will this make it easier for developers to extract a more efficient level of performance from PlayStation 4 when adapting or porting a game from PC?

PS4 doesn't need Vulkan, necessarily, but it may offer other benefits and save time. Familiarity is good?

EDIT: I ask this question because, as with The Crew, it's clear that many developers are still only scratching the surface.
 

Man

Member
Besides, perfomance difference between XB1 and PS4 is not as great as between OG XBOX and PS2
One would hope with one releasing in March 2000 and the other November 2001. :) The OG Xbox was also the first console to feature an API for programmable shaders I believe.

PS4 doesn't need Vulkan, necessarily, but it may offer other benefits and save time. Familiarity is good?
I would think Sony might extend or offer a custom variant of Vulkan as their base-lib when PS5 comes around. Not because it is 'needed' (you get max performance from libGCM) but, as you say, familiarity is a good thing. Also Vulkan features a nice intermediate compile-target for shaders and compute-kernels in SPIR-V.
 

Schrade

Member
Nice acknowledgement.

Sony has some really great devs working for/with them.

I hope that they can stay strong in the industry because they truly are a benefit to gaming technology.

I would love to see a documentary on the I.C.E. team and the other devs behind the cool tech and techniques they create.
 
Top Bottom