Repository navigation
feat(rendering): add Cairo parity baseline and GUI metrics - #136
Merged
Merged
Conversation
1 task done
Zaldaryon
added a commit
that referenced
this pull request
Oct 16, 2026
The Optimum CLI patches VintagestoryAPI.dll from the pristine copy in <game>/.optimum/vanilla. ApiPatcher built its Cecil resolver from the input directory, its Lib folder and the contracts directory, so the game's own Lib folder was never searched. PatchGuiCompositionMetrics (added in #136) resolves a type from cairo-sharp.dll, and Cecil threw AssemblyResolutionException. The patcher exited with code 134 and the CLI reported patch-conflict. ApiPatcher.CreateResolver now also searches the game root and its Lib folder when the input sits under a .optimum directory. They come last, so the backup's VintagestoryAPI.dll still wins over the game root's already patched copy. The launcher flow, which passes the game root's DLL, already found Lib and keeps working. Reproduced end to end on the official 1.22.7 client with a neutral contracts directory: before the change, dotnet Optimum.Patcher.dll --api exits 134 with the resolution error from PatchGuiCompositionMetrics. After it, the command exits 0 and writes the DLL. Two new tests cover the backup layout (failed before the change) and the game-root layout. Refs #140
Zaldaryon
added a commit
that referenced
this pull request
Oct 16, 2026
The Optimum CLI patches VintagestoryAPI.dll from the pristine copy in <game>/.optimum/vanilla. ApiPatcher built its Cecil resolver from the input directory, its Lib folder and the contracts directory, so the game's own Lib folder was never searched. PatchGuiCompositionMetrics (added in #136) resolves a type from cairo-sharp.dll, and Cecil threw AssemblyResolutionException. The patcher exited with code 134 and the CLI reported patch-conflict. ApiPatcher.CreateResolver now also searches the game root and its Lib folder when the input sits under a .optimum directory. They come last, so the backup's VintagestoryAPI.dll still wins over the game root's already patched copy. The launcher flow, which passes the game root's DLL, already found Lib and keeps working. Reproduced end to end on the official 1.22.7 client with a neutral contracts directory: before the change, dotnet Optimum.Patcher.dll --api exits 134 with the resolution error from PatchGuiCompositionMetrics. After it, the command exits 0 and writes the DLL. Two new tests cover the backup layout (failed before the change) and the game-root layout. Refs #140
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This implements Stage 1 of #130 as an evidence and profiling baseline. It adds a Linux Cairo versus Skia CPU parity harness, GUI primitive and override manifests, an exported Cairo API inventory, a compile-once/run-against-candidate ABI fixture, and opt-in metrics for GUI composition, text measurements, and Cairo texture uploads.
Every unvalidated operation remains on native Cairo. This PR does not add a GPU renderer or claim cross-backend pixel parity or performance gains.
Validation
make checkmake build(0 warnings, 0 errors)make check-patches(70 source patches, 52 Cecil patches, 0 pending or conflicts; 22 runtime donors compiled)make check-shadersscripts/test-cairo-abi.shagainst the installed Vintage Story 1.22.7 Cairo assembly passedThe GUI manifest inventories 57 composition overrides, but they remain
not-rendereduntil each fixture has runtime evidence. The API classification also needs human review before any replacement backend can claim full ABI compatibility. Full GUI coverage and GPU validation remain future work.