RSXGL: OpenGL 3.1 Support For The PlayStation 3

Written by Michael Larabel in Nouveau on 23 September 2012 at 01:00 PM EDT. 16 Comments
NOUVEAU
According to a developer that began working on a PlayStation 3 graphics driver, which he's calling RSXGL, he reportedly got OpenGL 3.1 working from this Sony gaming console.

Pasted below is the email I received from Alexander Betts, a Phoronix reader and developer who has been investing time on this OpenGL 3.1 core profile support for the PlayStation 3. Though in talking with Nouveau developers and NVIDIA's Andy Ritger at XDC2012, they don't believe that GL3.1 is possible for the PS3 hardware unless it's just using a software rasterizer.

Betts' comments about not liking Mesa / Gallium3D and not using it much in his implementation is also interesting.

Since I've enjoyed your comprehensive coverage of OpenGL-related open source projects, I wanted to describe a hobby project I've been working on for about the last year and a half. It is an attempt to implement the OpenGL 3.1 "core profile" for the PlayStation 3's Nvidia GPU (the project is called "RSXGL"). It targets the community that develops homebrew applications for the PS3's main "GameOS" environment (and not the now-deprecated Linux environment for the PS3; using this software therefore requires that the PS3 console be rooted).

My project makes use of the reverse engineering performed by the nouveau project (as does earlier RSX support available in the homebrew PSL1GHT library), and on (large) components of Mesa to support runtime compilation of GLSL shaders. It otherwise does not use Mesa (although that is an understatement, since GLSL is a large and complex part of any modern OpenGL implementation). Some of the main reasons that I'd cite for this are the same as those for Intel's apparent lack of interest in Gallium3D (indeed, it was the coverage of this on Phoronix earlier this week that's compelled me to write in to you) - the potential CPU overhead incurred by the multiple layers of abstraction needed by Mesa/Gallium3D to support a wide range of GPU's and operating system platforms. It would seem that such issues have also motivated the "bindless graphics" extensions introduced by Nvidia in recent years; criticism by some game developers of popular graphics API's generally; and the apparent lack of use of the OpenGL ES implementation that Sony provided for the PS3 initially. I should say that I'm not interested in heaping criticism on Mesa; it's a great, conformant implementation of OpenGL (mine is pretty far from being conformant, or even complete) and perhaps addresses different priorities (providing system-wide access to a GPU on desktop-class hardware for a range of applications, including the windowing system itself) than those of my project (access to the GPU for a single application running at a time on a resource-constrained system like a game console).

While RSXGL does target OpenGL 3.1, that decision was mainly about which non-legacy API to target. I started out developing against the ES 2.0 spec, but since the RSX readily supports a number of features that were extensions, or not included in ES at all (such as framebuffer objects, 3D texture maps, synchronization primitives, etc), I decided to just implement OpenGL 3.1. Furthermore, I haven't implemented some important features that OpenGL 3.1 added, like transform feedback and uniform buffer objects (I would like to implement those things to the extent that they can be supported by the RSX). In other words, I'm not trying to make the claim that I've single-handedly implemented 3.1, which remains incomplete in Mesa (although ignoring legacy capability completely has of course made my task much easier).

So far the sole third-party use of this project has been by PS3 homebrew dev Youness "kakaroto" Alaoui, who has been hard at work porting the Enlightenment Foundation Libraries to the PS3 (I believe Phoronix mentioned this effort of his last year). He and I have been able to get RSXGL sufficiently in to shape that EFL runs with hardware acceleration on the PS3 (Youness made some modifications to the EFL itself so that its OpenGL backend no longer uses the immediate-mode GL calls that are deprecated in core 3.1).


The code to this OpenGL 3.1 for the PlayStation 3 can be found on GitHub.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week