Skip to content

Add ASTC texture transcoding setting for the Gamenative wrapper - #734

Merged
maxjivi05 merged 3 commits into
WinNative-Emu:mainfrom
maxjivi05:feature/astc-transcoding
Sep 11, 2026
Merged

Add ASTC texture transcoding setting for the Gamenative wrapper#734
maxjivi05 merged 3 commits into
WinNative-Emu:mainfrom
maxjivi05:feature/astc-transcoding

Conversation

@maxjivi05

Copy link
Copy Markdown
Contributor

The bundled wrapper-gamenative libvulkan_wrapper.so already implements a BCn -> ASTC transcode path, but nothing in the app ever set WRAPPER_BCN_ASTC. The wrapper defaults that variable to enabled, so the transcoder ran implicitly at 8x8 with no way to see or control it, surfaced only as a "BCn Quality" low/high dropdown that never named what it did.

Replace that dropdown with an explicit ASTC Transcoding control offering off / 4x4 / 8x8, defaulting to off. It lives in graphicsDriverConfig, so it inherits from the container and is overridable per shortcut like every other graphics key. The control is shown only when Wrapper-Gamenative is selected, the only wrapper that implements the path.

The wrapper selects its block size with strstr(env, "8x8"), so the block size is passed through verbatim and the entries are limited to the two sizes the binary can honour. That parse has no error path: any value not containing "8x8" silently yields 4x4, so offering a size the wrapper cannot produce would report one block size and apply another.

BC4, BC5 and BC6H never reach the ASTC path and still decompress to uncompressed formats, and the path itself only runs when BCn emulation is full or auto.

The bundled wrapper-gamenative libvulkan_wrapper.so already implements a
BCn -> ASTC transcode path, but nothing in the app ever set WRAPPER_BCN_ASTC.
The wrapper defaults that variable to enabled, so the transcoder ran
implicitly at 8x8 with no way to see or control it, surfaced only as a
"BCn Quality" low/high dropdown that never named what it did.

Replace that dropdown with an explicit ASTC Transcoding control offering
off / 4x4 / 8x8, defaulting to off. It lives in graphicsDriverConfig, so it
inherits from the container and is overridable per shortcut like every other
graphics key. The control is shown only when Wrapper-Gamenative is selected,
the only wrapper that implements the path.

The wrapper selects its block size with strstr(env, "8x8"), so the block size
is passed through verbatim and the entries are limited to the two sizes the
binary can honour. That parse has no error path: any value not containing
"8x8" silently yields 4x4, so offering a size the wrapper cannot produce
would report one block size and apply another.

BC4, BC5 and BC6H never reach the ASTC path and still decompress to
uncompressed formats, and the path itself only runs when BCn emulation is
full or auto.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Community feedback on the first pass: "4x4" and "8x8" mean nothing to
someone who doesn't already know what ASTC is. Name the options for what
they do instead.

The dropdown now reads Off / Fidelity / Performance. Block size is still
what gets stored and what reaches the wrapper, so the runtime mapping is
unchanged: Fidelity is 4x4, Performance is 8x8.

Display labels and stored values are now separate arrays selected by index.
parseIdentifier lowercases and hyphenates ASCII, so it cannot recover a
stable value from a translated label, which is why the existing option
arrays are untranslated identifiers. Splitting them lets the labels be
translated into all 23 locales while astcTranscoding keeps storing 4x4
and 8x8.

The two arrays must stay index-aligned; all 23 locales carry exactly three
entries in the same order.
@maxjivi05
maxjivi05 merged commit d6d3ebc into WinNative-Emu:main Sep 11, 2026
4 checks passed
@maxjivi05
maxjivi05 deleted the feature/astc-transcoding branch September 11, 2026 17:35
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