launcher: expose the Vulkan renderer

Cycle the renderer selector through Software, OpenGL, and Vulkan while retaining OpenGL-only option gating.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>
This commit is contained in:
Matthew Stanley
2026-07-14 10:17:43 -07:00
parent f1fd8ec848
commit da64f44e82
3 changed files with 33 additions and 3 deletions
@@ -0,0 +1,22 @@
# Martin Penkava PR #16: launcher Vulkan option
Last evaluated: 2026-07-14
| Item | Value |
| --- | --- |
| Head repository/branch | `shaneomac1337/psxrecomp`, `smackdown2-fixes` (submitted as `mstan/psxrecomp` PR #16) |
| Source commit | `d05d14bb11caafad2963abe824f249249a80cb11` |
| Source author | Martin Penkava `<mpenkava1337@gmail.com>` |
| Local base | `7085721afe338a03cb114321a3576cdff420b732` (`origin/master`) |
| Local branch | `feat/pr16-launcher-vulkan-option-mpenkava` |
## Included scope
Adds Vulkan to the launcher's renderer cycle and label. The runtime already recognizes renderer value `2` as Vulkan; this exposes that existing backend through the graphical launcher while keeping OpenGL-only controls gated to renderer value `1`.
## Deliberate exclusions
- Vulkan backend correctness/performance changes are isolated on their own branches.
- CRT presentation, diagnostics, and game-specific data are excluded.
The source commit has no secondary co-author trailer; only Martin Penkava is credited in the local commit trailer.
+3 -3
View File
@@ -96,7 +96,7 @@ public:
// Mirror of the user-tunable settings, in the value shapes the RML binds to.
struct LauncherModel {
int renderer = 0; // 0=software, 1=opengl
int renderer = 0; // 0=software, 1=opengl, 2=vulkan
int supersampling = 1; // 1..4
bool antialiasing = true;
int texture_filter = 0; // 0=nearest, 1=bilinear
@@ -382,7 +382,7 @@ int lang_index_for(const std::vector<psx_launcher::GameInfo::Language>& langs,
return 0; // unknown/first — the game's declared default sits at [0] by convention
}
const char* renderer_name(int v) { return v == 1 ? "OpenGL" : "Software"; }
const char* renderer_name(int v) { return v == 2 ? "Vulkan" : v == 1 ? "OpenGL" : "Software"; }
const char* texfilter_name(int v) { return v == 1 ? "Bilinear" : "Nearest"; }
const char* crt_name(int v) {
switch (v) {
@@ -962,7 +962,7 @@ Result run(SDL_Window* window, void* gl_context,
c.BindEventCallback("cycle_renderer",
[&m, handle](Rml::DataModelHandle, Rml::Event&, const Rml::VariantList&) mutable {
m.renderer ^= 1;
m.renderer = (m.renderer + 1) % 3;
refresh_labels(m);
handle.DirtyVariable("renderer_label");
handle.DirtyVariable("opengl_renderer");
@@ -0,0 +1,8 @@
#!/usr/bin/env python3
from pathlib import Path
source = (Path(__file__).parents[1] / "launcher" / "launcher.cpp").read_text()
assert 'v == 2 ? "Vulkan"' in source
assert "m.renderer = (m.renderer + 1) % 3" in source
assert "m.renderer == 1" in source # OpenGL-only controls remain OpenGL-only.
print("Launcher Vulkan-option test passed")