Skip to content

GPU: preserve disjoint shadow refresh ranges - #10

Open
gmankab wants to merge 1 commit into
spidercraft:linux-native-runtimefrom
gmankab:contrib/native-refresh-ranges
Open

gmankab wants to merge 1 commit into
spidercraft:linux-native-runtimefrom
gmankab:contrib/native-refresh-ranges

Conversation

@gmankab

@gmankab gmankab commented Nov 25, 2026

Copy link
Copy Markdown

The native submission queue currently takes the bounding interval of all refresh requests for each shadow. For two disjoint requests that refreshes the intervening bytes as a side effect. It can copy a gap early and it uses memory bandwidth that neither request needs.

This adapts DoubleD17's range union to the native queue and retains its existing flush points. It keeps a single interval inline and merges overlaps and touching intervals. A native host-buffer regression test initializes three 64 KiB pages, asks for the first and third, checks that the middle page kept its old contents, then asks for the middle page and checks the update.

The release shadow_refreshes test filter ran three tests on the RX 6800 and on Lavapipe with native VKD3D-Proton (three passed on each, no adapter skips). The mapped-buffer case refreshes 128 KiB before the later request, compared with the previous interval's 192 KiB. Game frame time has not been measured with this patch.

Based-on: fxceless/victory-fork#591
Based-on: Marvisak#1818
Tested-on: RX 6800 and Lavapipe, Fedora Linux 45
Assisted-by: gpt-6.2 sol xhigh

A submission can request disjoint pieces of a shadow buffer. Refreshing
their bounding interval also copies the unrequested bytes between them
and can overwrite a stale gap before the title asks for it.

Port the interval union from the Windows implementation to this batch's
refresh queue. Keep the single interval inline and merge touching or
overlapping requests before their existing flush point. A native D3D12
test checks that two 64 KiB requests leave the intervening 64 KiB at its
old value until a later request covers it.

Based-on: fxceless/victory-fork#591
Based-on: Marvisak#1818
Reported-by: pablogonz12 (Marvisak#185)
Tested-on: RX 6800 and Lavapipe, Fedora Linux 45, native VKD3D-Proton
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.

2 participants