# rygt-team/rygt architecture

> Architecture diagram of the GitHub repository rygt-team/rygt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rygt-team/rygt
- Repository: https://github.com/rygt-team/rygt

## Overview

RyGT runs GT Sport and GT7 as native Windows programs: the launcher converts a user-provided game executable, then starts it against shared PS4-compatibility libraries and the Vulkan renderer. The README documents the conversion, launch, per-game setup, online server, GT7 stubs, and optional DLSS; sampled renderer sources expose pipeline creation and shader-cache responsibilities. Several implementation details—especially the launcher and most runtime libraries—were not sampled, so those relationships rely on README statements rather than source inspection.

Main entry points: [`loader/RyGTLoader.cs`](https://github.com/rygt-team/rygt/blob/main/loader/RyGTLoader.cs) (Unified launcher), [`core/libs/prx/libSceAgcDriver`](https://github.com/rygt-team/rygt/tree/main/core/libs/prx/libSceAgcDriver) (shadGT renderer), [`renderer/src/video_core/renderer_vulkan/vk_pipeline_cache.h`](https://github.com/rygt-team/rygt/blob/main/renderer/src/video_core/renderer_vulkan/vk_pipeline_cache.h) (Pipeline cache), [`core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp`](https://github.com/rygt-team/rygt/blob/main/core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp) (Executable converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Setup and launch"]
  node_game_dump["Game dump"]
  node_launcher["Unified launcher<br/>[RyGTLoader.cs]"]
  node_converter["Executable converter"]
  node_game_exe["Converted game"]
end

subgraph group_runtime["Compatibility runtime"]
  node_runtime_libs["PS4 runtime libraries"]
  node_gt7_stubs["GT7 stub library<br/>[gt7_stubs.c]"]
  node_controller["Controller input<br/>[controller.cpp]"]
  node_serial_state[("Per-game state<br/>[GameSerial.hpp]")]
end

subgraph group_graphics["Graphics rendering"]
  node_renderer["shadGT renderer"]
  node_gpu_driver["AGC graphics driver<br/>[EntryPoints.cpp]"]
  node_graphics_pipeline["Graphics pipelines<br/>[Pipeline.cpp]"]
  node_shader_recompiler["Shader recompiler"]
  node_pipeline_cache["Pipeline cache"]
  node_shader_store[("Shader store<br/>[cache_storage.cpp]")]
end

subgraph group_services["Game services"]
  node_online_server["Online server"]
  node_dlss["Optional DLSS plugin<br/>[ryGT_dlss.cpp]"]
end

node_player(("Game owner"))

node_player -->|"configures and starts"| node_launcher
node_game_dump -->|"selects files"| node_launcher
node_launcher -->|"converts executable"| node_converter
node_converter -->|"produces"| node_game_exe
node_launcher -->|"starts"| node_game_exe
node_game_exe -->|"loads at runtime"| node_runtime_libs
node_game_exe -->|"loads video output"| node_renderer
node_game_exe -->|"loads for GT7"| node_gt7_stubs
node_renderer -->|"uses driver"| node_gpu_driver
node_gpu_driver -.->|"creates pipelines"| node_graphics_pipeline
node_graphics_pipeline -.->|"uses compiled shaders"| node_shader_recompiler
node_pipeline_cache -->|"caches translations"| node_shader_recompiler
node_pipeline_cache -->|"loads and saves"| node_shader_store
node_game_exe -.->|"reads controls"| node_controller
node_launcher -->|"configures online"| node_online_server
node_renderer -.->|"optional integration"| node_dlss
node_game_exe -->|"selects game identity"| node_serial_state

click node_launcher "https://github.com/rygt-team/rygt/blob/main/loader/RyGTLoader.cs"
click node_converter "https://github.com/rygt-team/rygt/blob/main/core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp"
click node_runtime_libs "https://github.com/rygt-team/rygt/tree/main/core/libs/prx"
click node_gt7_stubs "https://github.com/rygt-team/rygt/blob/main/runtime/gt7/gt7_stubs.c"
click node_renderer "https://github.com/rygt-team/rygt/tree/main/core/libs/prx/libSceAgcDriver"
click node_gpu_driver "https://github.com/rygt-team/rygt/blob/main/core/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cpp"
click node_graphics_pipeline "https://github.com/rygt-team/rygt/blob/main/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp"
click node_shader_recompiler "https://github.com/rygt-team/rygt/tree/main/core/shader/recompiler"
click node_pipeline_cache "https://github.com/rygt-team/rygt/blob/main/renderer/src/video_core/renderer_vulkan/vk_pipeline_cache.h"
click node_shader_store "https://github.com/rygt-team/rygt/blob/main/renderer/src/video_core/cache_storage.cpp"
click node_controller "https://github.com/rygt-team/rygt/blob/main/renderer/src/input/controller.cpp"
click node_online_server "https://github.com/rygt-team/rygt/tree/main/server"
click node_dlss "https://github.com/rygt-team/rygt/blob/main/plugins/dlss/ryGT_dlss.cpp"
click node_serial_state "https://github.com/rygt-team/rygt/blob/main/core/libs/GameSerial.hpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_game_dump,node_launcher,node_converter,node_game_exe toneBlue
class node_runtime_libs,node_gt7_stubs,node_controller,node_serial_state toneAmber
class node_renderer,node_gpu_driver,node_graphics_pipeline,node_shader_recompiler,node_pipeline_cache,node_shader_store toneMint
class node_online_server,node_dlss toneRose
class node_player toneIndigo
```

## Components

### Setup and launch

- **Game dump**
- [Unified launcher](https://github.com/rygt-team/rygt/blob/main/loader/RyGTLoader.cs): `loader/RyGTLoader.cs`
- [Executable converter](https://github.com/rygt-team/rygt/blob/main/core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp): `core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp`
- **Converted game**

### Compatibility runtime

- [PS4 runtime libraries](https://github.com/rygt-team/rygt/tree/main/core/libs/prx): `core/libs/prx`
- [GT7 stub library](https://github.com/rygt-team/rygt/blob/main/runtime/gt7/gt7_stubs.c): `runtime/gt7/gt7_stubs.c`
- [Controller input](https://github.com/rygt-team/rygt/blob/main/renderer/src/input/controller.cpp): `renderer/src/input/controller.cpp`
- [Per-game state](https://github.com/rygt-team/rygt/blob/main/core/libs/GameSerial.hpp): `core/libs/GameSerial.hpp`

### Graphics rendering

- [shadGT renderer](https://github.com/rygt-team/rygt/tree/main/core/libs/prx/libSceAgcDriver): `core/libs/prx/libSceAgcDriver`
- [AGC graphics driver](https://github.com/rygt-team/rygt/blob/main/core/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cpp): `core/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cpp`
- [Graphics pipelines](https://github.com/rygt-team/rygt/blob/main/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp): `core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp`
- [Shader recompiler](https://github.com/rygt-team/rygt/tree/main/core/shader/recompiler): `core/shader/recompiler`
- [Pipeline cache](https://github.com/rygt-team/rygt/blob/main/renderer/src/video_core/renderer_vulkan/vk_pipeline_cache.h): `renderer/src/video_core/renderer_vulkan/vk_pipeline_cache.h`
- [Shader store](https://github.com/rygt-team/rygt/blob/main/renderer/src/video_core/cache_storage.cpp): `renderer/src/video_core/cache_storage.cpp`

### Game services

- [Online server](https://github.com/rygt-team/rygt/tree/main/server): `server`
- [Optional DLSS plugin](https://github.com/rygt-team/rygt/blob/main/plugins/dlss/ryGT_dlss.cpp): `plugins/dlss/ryGT_dlss.cpp`

### Other components

- **Game owner**

## Connections

- Game owner → Unified launcher: configures and starts
- Game dump → Unified launcher: selects files
- Unified launcher → Executable converter: converts executable
- Executable converter → Converted game: produces
- Unified launcher → Converted game: starts
- Converted game → PS4 runtime libraries: loads at runtime
- Converted game → shadGT renderer: loads video output
- Converted game → GT7 stub library: loads for GT7
- shadGT renderer → AGC graphics driver: uses driver
- AGC graphics driver → Graphics pipelines: creates pipelines
- Graphics pipelines → Shader recompiler: uses compiled shaders
- Pipeline cache → Shader recompiler: caches translations (evidence: `renderer/src/video_core/renderer_vulkan/vk_pipeline_cache.h`)
- Pipeline cache → Shader store: loads and saves (evidence: `renderer/src/video_core/renderer_vulkan/vk_pipeline_cache.h`)
- Converted game → Controller input: reads controls
- Unified launcher → Online server: configures online
- shadGT renderer → Optional DLSS plugin: optional integration
- Converted game → Per-game state: selects game identity
