diff --git a/docs/internal/upstream/martin-pr16-launcher-vulkan-option.md b/docs/internal/upstream/martin-pr16-launcher-vulkan-option.md new file mode 100644 index 00000000..55b05eda --- /dev/null +++ b/docs/internal/upstream/martin-pr16-launcher-vulkan-option.md @@ -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 `` | +| 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. diff --git a/runtime/launcher/launcher.cpp b/runtime/launcher/launcher.cpp index 09643c4a..5e8dcbd5 100644 --- a/runtime/launcher/launcher.cpp +++ b/runtime/launcher/launcher.cpp @@ -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& 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"); diff --git a/runtime/tests/test_launcher_vulkan_option.py b/runtime/tests/test_launcher_vulkan_option.py new file mode 100644 index 00000000..52a9a759 --- /dev/null +++ b/runtime/tests/test_launcher_vulkan_option.py @@ -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")