fix: upload guest texture writes on every submit until the first present #35
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/Freminet--ScarlettX!35
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-35"
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?
@itsdpraven on GitHub · 2026-11-21 16:30 UTC · original
itsdpraven:fix/guest-texture-flush-before-first-present→main· +1 −1 · 1 files · 1 commits · openWhat
test_d3d12_guest_texturefails on every run attests/test_d3d12_guest_texture.cpp:136. The README lists it as a known failure.Since
bda18b4the queue proxy flushes write-watched guest texture memory once per presented frame (g_flushed_epoch != g_frame_epoch). A client that never callsPresentXstays in frame epoch 0, so only its firstExecuteCommandListsuploads anything. Every later write to guest texture memory is dropped.The test writes the texture through its guest address twice without presenting. The first pass reads back correctly. The second pass reads back the first pass's data: mip 0, row 0, byte 0 is
0x03where0xabwas written.Change
One line in
QueueProxyExecuteCommandLists: flush on every submit while the frame epoch is still 0. After the firstPresentXthe once-per-frame behaviour is unchanged, so a title that presents keeps the saving frombda18b4.Not covered
A title that writes guest texture memory after its first submit of a frame still gets that upload one frame late. That trade-off is unchanged here.
Tested
Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 (UCRT, POSIX threads), Release, WARP.
test_d3d12_guest_texturemainbda18b4Not tested with Concept Destruction or any other real title. I do not have one, so the frame-rate claim rests on the changed condition being true only before the first present.
No open PR touches this line or this test (#5 to #34 checked).
AI-assisted: yes (Claude Code).
🤖 Generated with Claude Code
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.