Skip to content

fix(vk): retry transient texture image view failures - #1688

Merged
hckrman101 merged 3 commits into
NotRexed:mainfrom
Arkex-ai:fix/image-view-retry
Nov 10, 2026
Merged

hckrman101 merged 3 commits into
NotRexed:mainfrom
Arkex-ai:fix/image-view-retry

Conversation

@Arkex-ai

@Arkex-ai Arkex-ai commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Current main integration: head 81b8ff584fc0a18b2a42b592fa0483feacc89d81, base d224dc0680ad418b1ab111555c7d19cc483dcfdc. The runner migration is integrated and focused package/declaration checks pass. The current upstream texture diagnostic fields are retained; the fixture models their dimensions. Complete local suite: 278 passed, 3 failed, 20 skipped in 131 s (windows, 2 at once). Exact main d224dc0: 277 passed, 3 failed, 20 skipped in 131 s (windows, 2 at once). Same failures: nx2/test_nup_out_of_space.py, nx2/test_nup_paths.py, tests/test_precompile_compute_guard.py. LLVM-Mingw and UTF-8 explicitly pinned; initial collector failures remain preserved separately.

Fresh exact-head CI dispatches (do not infer success from this list):

Historical native coverage below stays tied to its recorded build; no new API13 native run claimed.

A transient image-view allocation failure entered the texture's cache as a null handle, so later requests never tried again even after memory became available. The actual factory/cache regression reproduces that permanent failure while its healthy reuse control passes.

This keeps host/device allocation failures retryable, limits uncached view attempts after a failure to the next texture frame, and preserves existing valid cache entries and permanent negative caching. It covers general sample/storage/attachment views, ASTC all/layer storage views, and GPU-unswizzle storage views. A successful BC single-layer compatibility fallback still wins; a failed fallback does not erase an earlier OOM result. A newly created view is rolled back if its cache entry cannot be committed.

Current revision 8e19c6af3948573eaf80fcc2cdff49ca36c84059 changes only the authored fixture: diagnostic environment reads are deterministic inside its namespace, avoiding ambient-runner dependence and native Windows CRT getenv deprecation. No compiler warnings or assertions are disabled. All48 cases and8 behavioral mutations pass LLVM/GCC/ASan/UBSan again; three exact-head fork workflows are refreshed. The complete production GPU tree matches b9be8119b9f198dd221101a90d23271a0550d57d byte for byte; build/native evidence below retains that recorded hash and is not relabeled.

Recorded validation at b9be8119b9f198dd221101a90d23271a0550d57d, based on main d8f0513f4555d3f6fa2a6d2df6fa76015ee17dbc:

  • 48 production-code cases pass Windows LLVM, Linux GCC and GCC ASan/UBSan. They execute the actual factory, complete general view function, ASTC cache functions and GPU-unswizzle cache/early-return region. Vulkan capabilities/results and cache allocation failures are authored.
  • Eight behavioral mutations are rejected: permanent caching of transient failures, missing throttling, throttling valid cached handles, missing either OOM class, leaking an uncommitted view, losing an earlier fallback OOM and trusting an undefined error-output handle.
  • Full Windows suite: 241 passed / 2 failed / 20 skipped, versus current main 240 / 2 / 20. Both retain the same local NUP symlink-privilege and missing-Windows-SDK precompile-guard failures.
  • Official API12 standalone host/backend build succeeds. Its clean official guest generation remains tied to 1a429f6; the exact main delta was audited: NUP extraction progress is outside this lift.py --exefs input, SDL polling adds no HLE declarations, and the renderer ABI is unchanged. Current host/backend are rebuilt and copied generation bytes are hash-checked. No generated game source is edited.
  • Exact-head isolated default serial and parallel/batch checkpoint runs with FG2x both exit0. Each produces three CRC/zlib/RGB-validated3440x1440 captures and completes an observed1444x720 / maximized1440x829 / restored1444x720 roundtrip. Original save hashes are unchanged. Capture size is independent of current desktop/window size; no physical ultrawide-monitor coverage is inferred.

Formats, swizzles, subresources, arena/staging behavior, queue waits and the renderer ABI are unchanged by this contribution. The higher-level failed-upload generation policy remains: some uploads retry only after a storage write. This repairs the next actual view request; it does not promise immediate whole-texture or global GPU-OOM recovery. Formatted buffer views and device-loss recovery are separate contracts. No physical allocation fault, driver-validation, campaign or performance result is claimed.

Actual open-PR diffs were reviewed: #1332 BC view diagnostics/compatibility, #1505 BC scratch fallback/upload diagnostics, #1130 incremental ASTC and #1541 stage diagnostics do not provide this retry/cache-commit policy. Their separate behaviors are preserved. Main's accepted staging publication is integrated. Only source, authored tests and documentation are included; no game-derived artifacts.

Main BC retry/staging fallback changes introduced a shared source-fixture compilation regression. At 23a845afa97733be027edf07cfb8a7591d850371, the two staging-publication fixture files are integrated from fe1c22ceb699830965d75168bfe13efc9db690ef: existing assertions remain, mapped fallback/unmapped cleanup/reuse and multi-atom ASTC visibility are exercised. GPU/host/lifter/third-party source trees are identical to the previous head; earlier native results retain their actual hashes. This CI repair is tracked separately and adds no production behavior to this contribution. Exact-head fork workflows were refreshed.

Current-head validation

Current head 81b8ff5, based on main d224dc0. Earlier local/runtime results describe their recorded source hashes.

Fork runs are separate from upstream Actions approval; no maintainer approval gate is bypassed.

@Arkex-ai
Arkex-ai force-pushed the fix/image-view-retry branch from 8e19c6a to 965d7f1 Compare November 10, 2026 14:05
@Arkex-ai
Arkex-ai force-pushed the fix/image-view-retry branch 4 times, most recently from 7b214b5 to 0ead25f Compare November 10, 2026 16:48
Keep allocation failures out of permanent view caches, bound retries per texture/frame and roll back views whose cache ownership cannot be committed.

Assisted-by: GPT-6 (OpenAI)
Provide deterministic diagnostic toggles to source-extracted view code, avoiding ambient environment dependence and native Windows CRT getenv deprecation without disabling warnings.

Assisted-by: GPT-6 (OpenAI)
@Arkex-ai
Arkex-ai force-pushed the fix/image-view-retry branch from 0ead25f to 81b8ff5 Compare November 10, 2026 17:56
@Arkex-ai

Copy link
Copy Markdown
Contributor Author

Rebased onto main d224dc06 and resolved both conflicts. The texture failure log retains main's added width/height/usage details inside the existing retry callback; the authored fixture now models the dimensions used by that log. Test arguments moved into the test's RUN_ALL_ARGS per #1822. Focused retry and declaration checks pass, with all existing assertions retained.

Head 81b8ff584fc0a18b2a42b592fa0483feacc89d81. New checks are pending:

Full current-base validation remains pending; no fresh API13 game run claimed.

@hckrman101
hckrman101 merged commit 8686552 into NotRexed:main Nov 10, 2026
7 of 9 checks passed
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