Skip to main content
Dolphin translates GameCube/Wii graphics commands to modern graphics APIs through multiple video backends.

Available Backends

Location: Source/Core/VideoBackends/

Vulkan

Cross-platform, best performancePlatforms: Windows, Linux, Android

Direct3D 12

Modern Windows APIPlatforms: Windows 10+

Direct3D 11

Legacy Windows supportPlatforms: Windows 7+

OpenGL

Wide compatibilityPlatforms: Windows, Linux, macOS

Metal

Apple native APIPlatforms: macOS 11+, iOS

Software

CPU-based reference rendererPlatforms: All (debugging only)

Backend Selection

Choose backend in configuration:
[Core]
GFXBackend = Vulkan  # or D3D12, D3D11, OGL, Metal, Software, Null
Command line:
dolphin-emu --video_backend=Vulkan --exec=game.iso

Graphics Pipeline

All backends implement the same pipeline:
1

Command Processing

Read graphics FIFO from GPU memoryLocation: VideoCommon/CommandProcessor.cpp
  • Process draw commands from CPU
  • Parse vertex data and state changes
  • Handle display lists
2

Geometry Processing

Transform and setup verticesLocation: VideoCommon/VertexManagerBase.cpp
  • Run vertex shaders (XF emulation)
  • Apply projection matrices
  • Clip and cull primitives
3

Texture Decoding

Convert GC/Wii texture formatsLocation: VideoCommon/TextureCacheBase.cpp
  • Decode native formats (RGBA8, RGB565, I4, IA8, etc.)
  • Hash textures for cache lookup
  • Apply arbitrary mipmaps
4

Shader Generation

Generate pixel shaders for TEVLocation: VideoCommon/PixelShaderGen.cpp
  • Emulate Texture Environment (TEV) unit
  • Combine up to 16 stages
  • Output GLSL/HLSL/MSL shader code
5

Rasterization

Draw to render target
  • Execute shaders via backend API
  • Apply blending and Z-testing
  • Output to EFB (Embedded FrameBuffer)
6

Post-Processing

Apply enhancements and effects
  • Resolve MSAA
  • Apply post-process shaders
  • Copy EFB to XFB or texture

Vulkan Backend

Location: VideoBackends/Vulkan/ Recommended backend with best features:

Features

  • Async shader compilation (minimal stutter)
  • Pipeline caching (fast startup)
  • Optimal descriptor management
  • Efficient multithreading
  • Exclusive fullscreen

Requirements

  • Vulkan 1.1+ drivers
  • VK_EXT_memory_budget for VRAM tracking
  • VK_KHR_push_descriptor for performance

Pipeline State

Vulkan backend caches pipeline state objects:
// Simplified pipeline creation
VkPipelineCache pipeline_cache;
VkPipeline CreatePipeline(const RasterizationState& rs,
                          const DepthState& ds,
                          const BlendingState& bs,
                          VkPipelineLayout layout,
                          VkShaderModule vs,
                          VkShaderModule ps);
Pipelines are pre-compiled and cached to disk.

Direct3D 12 Backend

Location: VideoBackends/D3D12/ Modern Windows backend:

Features

  • Explicit multithreading
  • GPU timeline synchronization
  • Descriptor heap management
  • Root signature optimization

Requirements

  • Windows 10 version 1903+
  • D3D12 feature level 11_0+
  • DirectX 12 capable GPU

Direct3D 11 Backend

Location: VideoBackends/D3D/ Legacy Windows support:

Features

  • Broad hardware compatibility
  • Mature and stable
  • Good performance on older GPUs

Limitations

  • Single-threaded API
  • Potential shader stutter
  • No async compilation

OpenGL Backend

Location: VideoBackends/OGL/ Cross-platform fallback:

Features

  • Works on most systems
  • Desktop OpenGL 3.3+ or OpenGL ES 3.0+
  • DSA (Direct State Access) for efficiency

Limitations

  • Driver quality varies widely
  • Potential stutter on driver pipeline compilation
  • Limited async compilation support
OpenGL driver quality varies significantly. Prefer Vulkan when available.

Metal Backend

Location: VideoBackends/Metal/ Apple platforms:

Features

  • Native macOS/iOS performance
  • Optimized for Apple Silicon
  • MoltenVK-free implementation

Requirements

  • macOS 11.0 (Big Sur) or later
  • Metal 2.3+ support

Software Renderer

Location: VideoBackends/Software/ CPU-based reference implementation:

Use Cases

  • Debugging graphics issues
  • Verifying hardware backend correctness
  • Pixel-perfect accuracy testing

Limitations

  • Extremely slow (< 10 FPS typically)
  • No enhancements
  • Single-threaded
# Use software renderer
dolphin-emu --video_backend=Software --exec=game.iso

Shared Video Code

Location: Source/Core/VideoCommon/ Shared across all backends:
ComponentPurpose
TextureCacheBaseTexture decoding and caching
VertexManagerBaseVertex buffer management
PixelShaderGenPixel shader generation
VertexShaderGenVertex shader generation
ShaderCacheCompiled shader storage
RenderBaseAbstract rendering interface
FramebufferManagerEFB/XFB management

Texture Cache

Central texture management:
// Texture cache lookup
TCacheEntry* GetTexture(u32 address, u32 width, u32 height, 
                        TextureFormat format, u32 tlut_addr);
  • Hash-based lookup by memory address + format
  • LRU eviction when VRAM is full
  • Lazy invalidation on RAM writes
  • Supports arbitrary mipmaps
  • Handles EFB copies (render-to-texture)
GameCube/Wii formats decoded to RGBA8:
  • I4/I8: Intensity (grayscale)
  • IA4/IA8: Intensity + Alpha
  • RGB565/RGB5A3: Color formats
  • RGBA8: Full color + alpha
  • CMPR: DXT1-like compression
  • C4/C8/C14X2: Palette-based (TLUT)

Shader Generation

Generate shaders for TEV (Texture Environment Unit):
// Generate pixel shader code
ShaderCode GeneratePixelShaderCode(const PixelShaderUid& uid);
TEV configuration determines shader:
  • Up to 16 TEV stages
  • Each stage: 2 color inputs, 1 alpha input
  • Operations: add, sub, multiply, blend, compare
  • Konstant colors and rasterized colors
Example TEV setup → generated shader:
// TEV: Stage0 = Tex0 * RasColor  
// Generated GLSL:
vec4 tex0 = texture(samp0, uv0);
vec4 ras = RasColor;
vec4 prev = tex0 * ras;

Graphics Enhancements

Backends support quality improvements:

Internal Resolution

Render at higher resolution than native (640x528):
  • 1x (native), 2x, 3x, 4x, 5x, 6x, 7x, 8x
  • Dramatically improves clarity
  • GPU-intensive

Anti-Aliasing

  • MSAA: 2x, 4x, 8x multisample
  • SSAA: 4x supersampling (highest quality, slowest)

Anisotropic Filtering

  • 1x (off), 2x, 4x, 8x, 16x
  • Improves texture clarity at angles

Post-Processing

Shader-based effects:
  • Color correction
  • Scanlines
  • Edge smoothing (AA shaders)
  • Custom shaders in User/Shaders/

Performance Profiling

Built-in metrics:
[General]
ShowSpeedPercent = True  # Show FPS and speed %

[GFX]  
ShowStatistics = True    # Show draw calls, textures
Key metrics:
  • Draw calls: Primitives submitted to GPU
  • Shader compilations: New shaders generated
  • Texture uploads: New textures sent to VRAM
  • EFB peeks: CPU reads from framebuffer (slow)

See Also