Skip to content

Launcher: the Model L choice (set <game> model=L), off by default - #138

Merged
phantoslayer21 merged 1 commit into
mainfrom
model-l/model-choice
Nov 14, 2026
Merged

phantoslayer21 merged 1 commit into
mainfrom
model-l/model-choice

Conversation

@phantoslayer21

@phantoslayer21 phantoslayer21 commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

The launcher side of the Model L choice: set <game> model=L in a launcher built with WRONGGPU_MODEL_L (CMake option,
default OFF, on only in a release whose front end and runtime run Model L). The front end's Model L entry (registry row,
WG_MODEL_L, model lookup and refusals) is in main since #155. This PR writes the runtime option model=L (the registry's
runtime_option for Model L) and selects the entry the front end lists after Model M (and Model K).

Based on main; it carries only its own commit. It was first written on top of #47 and is rebased onto main, so it does
not depend on #47.

What changes

  • wizard_policy.h / CMake: WRONGGPU_MODEL_L (default 0), private to wg_core, the app and the tests that need it.
  • profile.cpp / profile.h:
    • The model setting (Layer::Model, values m, l) exists only with the option. Without it, set <game> model=L
      gets kNoModelChoice ("Model L isn't part of this build of WrongGPU ...", exit 10).
    • L: wronggpu.ini's runtime_options has every model item removed and model=L added last. OptiScaler.ini's
      UpscalerIndex is set to kModelLEntryIndex (1, or 2 with Preset K): [WrongGPU] in OptiScaler 10's slot,
      else [FSR].
    • M: only Model L's items and an index naming Model L's entry go back. Everything else stays byte for byte.
    • profile.ini has a model line only for L.
  • model.cpp / model.h: ModelFileReady(ctx, preset) checks one model's file against that model's embedded
    converter data, whatever model the context has selected. ModelLNotReady gives the player's lines.
  • launcher.cpp:
    • The settings apply refuses a new choice of L while Model L's data is not ready ("Model L can't be chosen ...",
      exit 5, nothing changed).
    • ApplyProfile renders a game saved on L as Model M, with a warning, when the data is gone. An install, repair or
      update never fails over it.
    • Both files are written by the existing apply, so the record's hashes follow them, as for every settings write.
  • model.cpp: the shadowed local in the Model L message is renamed (pickedWhy).
  • CI: the new ctest model-choice is built and run in the launcher step.
  • README: "The model choice". The window has no model control yet.

Model M: with the option off nothing changes in any file, list or JSON. With it on, M leaves wronggpu.ini, OptiScaler.ini
and profile.ini as they were.

The entry index follows the registry's list order (M, K, L) from #155 as far as read: clean/wgshared/REGISTRY.md lists
Model M, Model K, Model L as entries 0, 1, 2. The index 1 without Preset K assumes the list then omits Model K; that is
this PR's assumption and was not checked against a running front end.

Refs #89

Tested (Windows, CPU only, 1 compile job, on the rebased head)

  • The CI launcher step's configuration (-DWRONGGPU_TESTING=OFF -DWRONGGPU_PRESET_K=OFF -DWRONGGPU_DIRECT_ROUTE=OFF),
    built and run locally: wg-core, launcher-core, coexist-core, convert-ignore, model-choice, source-size and
    wording: 7 of 7 passed.
  • Public gates: the must-pass gates pass. No leak hit is in a file this change touches; the flagged numbers there are
    ci.yml's runner versions and timeouts.
  • It applied onto main without conflicts (Model L as a model choice: registry row, front-end WG_MODEL_L, model lookup and refusals #155 touched the front end and the shared registry, not the installer).

Not re-run on this head (the end-to-end runs were done on the earlier head, which sat on #47)

  • tests/run_model_l_tests.py --launcher-choice and its other launcher builds, the coexist, launcher and installer
    Python suites.

Not tested

  • With a front end that lists Model L, and in a game.
  • The window (no model control yet).

@phantoslayer21 phantoslayer21 added this to the 0.7.0 milestone Nov 14, 2026
A launcher built with WRONGGPU_MODEL_L (CMake option, default OFF: on
only in a release whose front end and runtime run Model L) has a model
setting (profile key `model`, values m and l):

- `set <game> model=L` is accepted only while Model L's data on this PC
  (model\L\model.wgcm) passes its check against Model L's converter
  data; otherwise it is refused with how to convert it (exit 5, nothing
  changed).
- L writes wronggpu.ini's runtime_options (every model item out,
  model=L last) and OptiScaler.ini's UpscalerIndex ([WrongGPU] in
  OptiScaler 10's slot, else [FSR]) to Model L's entry: 1, or 2 in a
  build with Preset K. Both go through the settings apply, so the
  install record's hashes follow them.
- M changes nothing: only Model L's items and an UpscalerIndex naming
  Model L's entry go back; profile.ini has a model line only for L.
- A game saved on L whose data is gone is not refused on an install,
  repair or update: its files say Model M with a warning, the profile
  keeps L.

Without the option nothing changes anywhere (no setting in the profile,
`get` or the JSON); `set <game> model=L` is refused by name (exit 10).
The window has no model control yet.

Tests: model-choice (new ctest: profile.cpp built with the choice on,
added to the CI launcher step), launcher-core (the choice off), and
tests/run_model_l_tests.py --launcher-choice end to end. The shadowed
local in the Model L message (model.cpp) is renamed.

Refs #89

Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
@phantoslayer21
phantoslayer21 changed the base branch from 23-coexist to main November 14, 2026 15:54
@phantoslayer21
phantoslayer21 marked this pull request as ready for review November 14, 2026 16:00
@phantoslayer21
phantoslayer21 merged commit a4af64f into main Nov 14, 2026
9 checks passed
@phantoslayer21
phantoslayer21 deleted the model-l/model-choice branch November 14, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant