The OpenGNM Stack is a complete open-source graphics stack for the PlayStation 4, providing drop-in API compatibility with the Sony official GNM/GraphNext graphics library.
This umbrella repository ties together the individual components via git
submodules. Clone with --recursive to get the working build layout where
all sibling-directory references resolve correctly.
┌─────────────────────────────────────────────────────────┐
│ Your PS4 Application │
│ (written against Sony SDK headers) │
└────────────┬──────────────────────────┬──────────────────┘
│ │
▼ ▼
┌────────────────────┐ ┌─────────────────────────────┐
│ opengnm │ │ vulkan-ps4 │
│ sceGnm*/sceGpa* │ │ Vulkan 1.0 ICD │
│ 207 functions │◄────│ (translates Vk → GNM/PM4) │
│ 2 backends: │ └─────────────────────────────┘
│ • orbis (FW) │
│ • generic (host) │
└────────┬───────────┘
│ uses shader binaries from
▼
┌────────────────────┐ ┌─────────────────────────────┐
│ opengnm-psbc │ │ freegnm-examples │
│ SPIR-V → PS4 SB │ │ triangle, cube, gltf, │
│ (Mesa 26.2 NIR+ │ │ Eden composite, etc. │
│ ACO compiler) │ │ (USE_OPENGNM=1 to link │
│ │ │ against opengnm) │
└────────────────────┘ └─────────────────────────────┘
| Repo | Description |
|---|---|
| opengnm | Core GNM library — sceGnm*/sceGpa* drop-in API (207 functions, 2 backends) |
| opengnm-psbc | SPIR-V → PS4/PS5 Shader Binary compiler (Mesa 26.2.0 NIR+ACO) |
| vulkan-ps4 | Vulkan 1.0 ICD over OpenGNM — run Vulkan apps on PS4 |
| freegnm-examples | Example programs (triangle, cube, gltf, Eden composite, and more) |
git clone --recursive https://github.com/PS4-OpenGNM/opengnm-stack.git
cd opengnm-stackThe build system expects Vulkan-Headers and SPIRV-Headers as sibling directories:
git clone https://github.com/KhronosGroup/Vulkan-Headers.git
git clone https://github.com/KhronosGroup/SPIRV-Headers.gitgit clone https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain.git
export OO_PS4_TOOLCHAIN=$(pwd)/OpenOrbis-PS4-ToolchainSee the Build Guide for full instructions, or the quick version below:
# Build opengnm (PS4 target)
cd opengnm
cp config.orbis.mak config.mak
make
cd ..
# Build opengnm-psbc (host CLI + PS4 library)
cd opengnm-psbc
make -j$(nproc) # host CLI + libpsbc.a
make -f Makefile.orbis -j$(nproc) # PS4 libpsbc.orbis.a
cd ..
# Build vulkan-ps4 (PS4 ICD)
cd vulkan-ps4
make -f Makefile.orbis -j$(nproc)
cd ..
# Build examples (with OpenGNM)
cd freegnm-examples/triangle
make USE_OPENGNM=1- Build Guide — Full build instructions for all components
- Getting Started — Write your first PS4 graphics program
- Architecture — How the components fit together
- API Reference — opengnm API docs (MkDocs)
Individual component docs:
- opengnm docs — Architecture, backends, guides, API reference
- opengnm-psbc — Shader compiler usage
- vulkan-ps4 — Vulkan ICD build config
- freegnm-examples — Example programs
- C11 + C++17 compiler (clang recommended)
- GNU Make + CMake (≥ 3.15)
- LLD linker + llvm-ar
- Python 3 + py3-mako (for Mesa codegen in opengnm-psbc)
- OpenOrbis PS4 Toolchain (for PS4 cross-compilation)
- Vulkan-Headers + SPIRV-Headers (for vulkan-ps4 and opengnm-psbc)
All components are feature-complete and hardware-validated on PS4 FW 9.00:
- opengnm: 207+
sceGnm*functions, 88 host tests passing, hardware smoke test passing - opengnm-psbc: All 8 shader stages, VS+PS hardware-validated (60fps triangle rendering)
- vulkan-ps4: Full Vulkan 1.0 ICD with graphics + compute pipelines
- freegnm-examples: All examples build with
USE_OPENGNM=1
All repos in the OpenGNM stack are licensed under the MIT License — see the
LICENSE file in each repo. Vendored third-party libraries (Mesa, cgltf,
Nuklear, stb) retain their original licenses as noted in their respective
repos.
Issues and pull requests are welcome at the individual component repos. Cross-repo coordination is tracked on the GitHub Project board.