Skip to content

wrapper: honor BCn CPU staging memory requirements and flush uploads - #61

Open
butilly wants to merge 2 commits into
wrapper-25from
fix/tt3-wrapper-bcn-upload-fix-2
Open

butilly wants to merge 2 commits into
wrapper-25from
fix/tt3-wrapper-bcn-upload-fix-2

Conversation

@butilly

@butilly butilly commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Game: TT Isle Of Man: Ride on the Edge 3; executable TT3.exe; thread 1567909336343257189. Based on fix/tt3-wrapper-buffer-size-fix (6098a52), preserving the working WSI loading fix.

Newest report 1569061825348108418 averages 16.3 FPS with thermal status NONE and persistent white lighting. Decoder mask 0x6ff excludes bit 8, the BC6H unsigned decoder, although the BC1/BC2 self-test reports decode=ok. Logs confirm actual CPU fallback uploads: WRAPPER_TEX 0 at line 2117 uses format 143 to 97, and lines 13264-13285 include a full BC6H mip chain with uploads as small as 32 bytes.

The active CPU staging path allocates upload_size without querying buffer requirements, selects a host-visible type without checking memoryTypeBits, and never flushes host writes. Query and honor required allocation size and allowed type bits; prefer coherent host memory; map and flush the whole allocation before recording the copy, including noncoherent atom padding; clean up each allocation failure. No changes to game content, decoding math, Wine, DXVK, or rendering settings.

Validation: extracted actual create/submit C functions compiled with cc -std=c11 -Wall -Wextra -Werror against a strict mock Vulkan driver. Passed padded 32-to-256-byte allocation, allowed/coherent memory choice, noncoherent fallback, flush-before-copy, allocation/bind/map failures and flush failure cleanup. git diff --check passed. Android CI is the integration build. On-device test: same track for 180 seconds, compare white lighting and 16.3 FPS baseline; improvement remains unproven until that report.

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