feat: optional direct Vulkan texture compute substage #653
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!653
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-653"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tommiehansen on GitHub · 2026-12-06 00:16 UTC · original
tommiehansen:perf/phase13-vulkan-texture-compute-20261206→main· +556 −0 · 11 files · 8 commits · draftWhy
Texture staging currently depends on CPU layout conversion. A compute implementation may move some detiling work off the CPU, but transfers, private buffer allocations and synchronization can outweigh the arithmetic benefit. Measuring the entire conversion/upload path is essential.
What changes
The optional
direct-vulkanbuild feature andVICTORY_VK_COMPUTE=1initialize a Vulkan device, compute queue, pipeline, descriptor bindings and private storage buffers. The staging conversion path can use fence-synchronized compute detiling, with CPU fallback for unsupported layouts or failed operations. Private buffer readback is not zero-copy. Boxon's run-detile design is the inspiration; independent implementation.Benchmark results — software Vulkan correctness
CI 47586227814,
71193b41.SPIR-V validation and Windows production feature compilation also passed. No elapsed-time, physical AMD or gameplay measurement exists.
Why this should be merged
This isolated opt-in substage provides a bounded way to evaluate compute-assisted texture conversion without replacing the existing renderer. Keep draft until actual staging activation, unsupported-layout fallback and full upload costs (initialization, allocations, copies, synchronization) are verified.
Validation and compatibility
Reproduce the pinned software Vulkan/llvmpipe and Windows feature-compile workflow above with
direct-vulkanand the runtime option enabled. Compare with the original CPU path and #604 where applicable, using complete upload cost rather than isolated kernel time. Request physical RDNA testing and repeated pipeline-amortized workloads. This is not a general Vulkan execution backend or guest dispatch routing.Current revision
b192578After a successful Vulkan fence, publish the mapped destination directly into row-pitched staging memory, eliminating the extra CPU output vector and copy. Validate mip and shape before indexing, and skip per-element planning after cached context initialization failure. New rejection tests check untouched output; 96 paired CPU/Vulkan conversion rows require exact output including row padding. Current-head CI 47589584984 has passed the Vulkan job; Windows production validation has completed. Software timings are not full D3D12 uploads or physical AMD measurements.
Current-head paired conversion results — llvmpipe
The Vulkan job of CI 47589584984 passed, including 96 exact rows (8 paired ABBA/BAAB blocks per shape, 16 samples per arm). Median of block medians, in microseconds; change is median paired percentage.
The first cold conversion including context initialization took 27.94 ms. Device: llvmpipe (LLVM 22.1.2, 256 bits), CPU type. The current implementation is substantially slower in this software control. Keep draft and disabled by default; do not infer native AMD or gameplay behavior from these numbers. Windows production-feature job passed.
Both jobs of CI 47589584984 are now complete and passed, including Windows production feature compilation. The software-device performance results remain negative; no native AMD timing exists.
Validated adapter gate
760f044arejects non-AMD and CPU Vulkan devices in production, requires Vulkan 1.1 and sufficient storage/compute dispatch limits, and keeps explicit device selection among multiple eligible adapters.12f5c8bseparates test-only software execution from production-equivalent software rejection. CI 47591649283 passed both jobs: exact Vulkan tests, unchanged-output rejection and Windows production feature compilation. Software override is compiled only in tests. No repeated negative software timing run; physical AMD and full staging-to-upload performance remain unverified.Physical production staging fixture
ef184eef: CI 47593457980 passed Vulkan and Windows production compile jobs. The new ignored physical test exercisesStaging::detile_part, actual D3D12 texture upload/readback, 1/4-texture batches and linear fallback with exact output and activation checks. It requires a physical AMD adapter and records Vulkan device identity. The shared physical runner exposesPRC_AMD_GATES=vk_textureand paired preparation/total measurements. Physical execution and comparisons with #604/#655 are still pending; CI compiled the fixture, it did not measure a GPU. Remains draft.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.