Skip to content

Import renderer-owned upload heaps on Linux native - #34

Draft
gmankab wants to merge 1 commit into
spidercraft:linux-native-runtimefrom
gmankab:contrib/linux-native-imported-upload-heaps
Draft

gmankab wants to merge 1 commit into
spidercraft:linux-native-runtimefrom
gmankab:contrib/linux-native-imported-upload-heaps

Conversation

@gmankab

@gmankab gmankab commented Nov 26, 2026

Copy link
Copy Markdown

With VICTORY_IMPORT_UPLOADS=1, a placed upload buffer can use its renderer-owned heap directly on Linux native vkd3d-proton. The runtime verifies the import with a one-time readback before handing out the guest heap. A private interface on the host heap retains the allocation for command-list and descriptor references.

The exact branch passed six resource tests on RX 6800. The direct fixture reads a placed buffer at a 64 KiB offset after the guest releases both the buffer and the heap. A second run forces the driver's host-memory fallback and verifies that Victory uses its shadow path. Vulkan validation reported zero VUIDs on both runs.

The 230-second integrated title run reached 3D preparation and logged zero imports. The last captured frame showed the illustrated loading screen. The kernel recorded an SQC data-read fault during the heavy phase. The experimental path currently covers renderer-owned placed upload buffers.

Based-on: Marvisak#2112
Tested-on: RX 6800, Fedora Linux 45, Linux native RADV with Vulkan validation
Assisted-by: gpt-6.2 sol xhigh

Placed upload buffers can read the renderer's existing heap allocation
on the GPU. With VICTORY_IMPORT_UPLOADS=1, use that shared allocation
for read-only views and skip their per-submission shadow updates.

Verify that the imported D3D12 heap actually sees the owner's memory.
Some drivers return success with unrelated backing when an import
fails. Retain the allocation through a private interface on the host
heap, so command lists and descriptor references can outlive the guest
heap object without releasing its pages early.

The RX 6800 fixture reads a buffer at a nonzero heap offset after the
guest releases both objects. It also checks the ordinary shadow path
with imports disabled and when the driver substitutes backing memory.

Based-on: Marvisak#2112
Tested-on: RX 6800, Fedora Linux 45, Linux native RADV, six resource tests and direct or fallback readback with Vulkan validation
Assisted-by: gpt-6.2 sol xhigh
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