Graphics API Support
Ryujinx supports multiple graphics backends, allowing you to choose the best option for your system:Vulkan
Recommended - Best performance and compatibility on most systems
OpenGL
Fallback option with broad hardware support (requires 4.5+)
Metal
macOS support via MoltenVK translation layer
Vulkan is the recommended backend for Windows and Linux systems, offering the best performance and feature support.
Maxwell GPU Architecture
The Nintendo Switch uses NVIDIA’s Maxwell GPU architecture (similar to GTX 900 series). Ryujinx emulates:Graphics Pipeline
- 3D Engine: Full emulation of the Tegra X1’s 3D graphics engine
- 2D Engine: Hardware-accelerated 2D operations and texture copies
- DMA Engine: Direct Memory Access for efficient data transfer
- Compute Shaders: Support for GPU compute operations
Rendering Features
Deferred Rendering
Support for modern deferred shading techniques
Tessellation
Hardware tessellation for detailed geometry
Transform Feedback
GPU-side geometry processing
Compute Pipeline
General-purpose GPU computing
Shader Translation
One of Ryujinx’s most critical components is its shader translation system:Shader Pipeline
- Maxwell Shader Code → Switch games use proprietary NVIDIA shader binaries
- Intermediate Representation → Translated to a custom IR for analysis
- GLSL/SPIR-V Output → Converted to industry-standard shader languages
- Host GPU Compilation → Your GPU driver compiles to native instructions
Ryujinx includes sophisticated shader optimization passes that can sometimes produce better-performing code than the original game shaders.
Shader Types Supported
| Shader Stage | Description |
|---|---|
| Vertex | Geometry processing and transformation |
| Tessellation Control | Tessellation factor computation |
| Tessellation Evaluation | Tessellated vertex generation |
| Geometry | Primitive manipulation and generation |
| Fragment | Per-pixel color and effects |
| Compute | General-purpose GPU computation |
Translation Features
- SSA Optimization: Static Single Assignment form for better optimization
- Constant Folding: Compile-time evaluation of constant expressions
- Dead Code Elimination: Removal of unused instructions
- Bindless Textures: Advanced texture access patterns
- Transform Optimization: Geometry shader to compute shader conversion when beneficial
Disk Shader Cache
Disk Shader Cache
Compiled shaders are cached to disk, eliminating stuttering on subsequent runs
- First run: Shaders compile on-demand, may cause brief stutters
- Cached runs: Pre-compiled shaders load instantly from disk
- Game updates: Cache automatically invalidates when game version changes
The shader cache is stored per-game in
[RyujinxFolder]/games/[TitleID]/cache/shader/Texture Emulation
Ryujinx supports the Switch’s diverse texture formats:Texture Compression
| Format | Description |
|---|---|
| BC1-BC7 | Desktop-standard block compression |
| ASTC | Adaptive Scalable Texture Compression (Switch native) |
| ETC2 | Ericsson Texture Compression |
Texture Recompression: When enabled, Ryujinx can recompress incompatible formats to ones your GPU supports natively, improving performance.
Block Linear Layout
The Switch uses NVIDIA’s block-linear (tiled) texture layout for optimal GPU cache usage. Ryujinx handles:- Layout Conversion: Automatic conversion between linear and block-linear formats
- GOB (Group of Bytes): NVIDIA’s texture tiling unit
- Swizzling: Efficient texture data reorganization
Graphics Configuration
Ryujinx exposes several GPU configuration options:Performance Options
Fast GPU Time
Simulates instant GPU processing to avoid resolution drops in performance-sensitive games
Fast 2D Copy
Uses CPU for 2D texture copies when faster than GPU
Macro JIT
Just-In-Time compilation of GPU macro code
Macro HLE
High-level emulation of common GPU macros
Vulkan Backend
The Vulkan backend offers the best performance:Vulkan Advantages
- Lower CPU Overhead: More efficient command submission
- Better Multi-threading: Parallel command buffer recording
- Modern Features: Latest GPU capabilities
- SPIR-V Support: Native shader format, no GLSL parsing
Vulkan Extensions Used
| Extension | Purpose |
|---|---|
| EXT_conditional_rendering | Predicated rendering |
| EXT_extended_dynamic_state | Reduced pipeline state changes |
| KHR_push_descriptor | Efficient descriptor updates |
| EXT_transform_feedback | Geometry shader output capture |
| KHR_draw_indirect_count | GPU-driven rendering |
OpenGL Backend
The OpenGL backend provides broad compatibility:Requirements
- Minimum Version: OpenGL 4.5
- Core Profile: Modern OpenGL without legacy features
- Extensions: Various extensions for optimal performance
OpenGL 4.5 was released in 2014, so most graphics cards from the last decade support it.
Metal/macOS Support
Metal via MoltenVK
macOS users can run Ryujinx through the MoltenVK translation layer, which converts Vulkan calls to Metal
- Slightly lower performance than native Windows/Linux
- Some graphics quirks due to translation layer
- Limited to Apple Silicon and Intel Macs with Metal support
Graphics Enhancements
Ryujinx includes several graphical enhancements beyond native Switch capabilities:Graphics Enhancements
Explore resolution scaling, anti-aliasing, and more enhancement options
Technical Implementation
Key source directories:- GPU Core:
src/Ryujinx.Graphics.Gpu/ - Shader Translation:
src/Ryujinx.Graphics.Shader/ - Vulkan Backend:
src/Ryujinx.Graphics.Vulkan/ - OpenGL Backend:
src/Ryujinx.Graphics.OpenGL/ - Texture Handling:
src/Ryujinx.Graphics.Texture/
The GPU emulation system handles thousands of draw calls per frame while maintaining the illusion of perfect hardware emulation.
Troubleshooting
Black screen or graphics not rendering
Black screen or graphics not rendering
- Try switching between Vulkan and OpenGL
- Update your GPU drivers
- Disable resolution scaling temporarily
- Check that your GPU supports the required features
Shader compilation stuttering
Shader compilation stuttering
- This is normal on first run
- Let the game build its shader cache
- Subsequent runs will be smooth
- Consider pre-loading shader caches if available
Graphics glitches or artifacts
Graphics glitches or artifacts
- Disable texture recompression
- Try the OpenGL backend if using Vulkan
- Report the issue with details for investigation