mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #60] dxgi: let shaders sample swap-chain back buffers #111
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#111
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/60
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9783📝 Commits (1)
6d0afc8dxgi: support sampling swap-chain back buffers📊 Changes
8 files changed (+481 additions, -83 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+7 -4)📝
runtime/CMakeLists.txt(+7 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+81 -39)📝
runtime/shims/dxgi_com.cpp(+27 -11)📝
runtime/shims/dxgi_swapchain.h(+34 -26)📝
runtime/src/vulkan_backend.h(+28 -3)📝
runtime/src/vulkan_replay.h(+1 -0)➕
runtime/test/dxgi_backbuffer_srv_test.cpp(+296 -0)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as: DXGI shader-input back buffers
Depends on:
#4317,#5248These PRs have overlapping refcount and Vulkan image-lifetime edits. This patch builds directly on
a60e5eab5, which includes the round-robin buffer change from#9602.What and why
A swap chain can request
DXGI_USAGE_SHADER_INPUTso a later pass can sample a rendered frame. Leonida returned a valid resource fromGetBuffer, butCreateShaderResourceViewleft its descriptor empty. A compute shader read zero after a successful colour clear. DXGI usage flagsRegister shader-input back buffers with the existing texture descriptor path. A default view or an explicit view matching the buffer format can now be sampled. An application reference to the buffer keeps its swap chain alive. Resize and teardown retire the cached views before destroying the Vulkan images. Cross-format sRGB views still need mutable images, which
#5248supplies for render-target views.Tested
Windows 11, MSVC 19.44 Release, NVIDIA RTX 4070 SUPER, driver 621.24, Vulkan validation enabled. The new test uses a hand-written shader and synthetic colours.
#9569. The two DXGI host-parity tests also passed withPROBE_WARP=1.test_image_atomics_guardandtest_image_store_d16matched the unmodified base.Draft while the upstream Windows runtime build is broken. Stock
a60e5eab5and this commit both hit the compiler errors reported on#9576. For the GPU comparison only, I locally reversed3630610caon both sides. The workaround is absent from the submitted diff.AI-assisted: yes
Checklist
scripts/check_no_game_data.pyon all eight changed files andgit diff --check. No game data, keys or decryption.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.