mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
upscale: DLSS frames reach the layer in Streamline/Unreal D3D12 games
Bright Memory: Infinite (Unreal Engine, D3D12, NVIDIA Streamline) now passed NGX's checks but no frame reached the layer. Two causes, fixed here: - The layer recognised the bridge's mailbox by size and the storage bit only, in a 128-entry table; the game's own 8 KB storage buffers filled it first, so the bridge's doorbells were ignored. It now matches the exact usage the bridges create them with (mailbox STORAGE|TRANSFER_DST, marker TRANSFER_DST), keeps 1024 entries and warns once if the table is ever full. - Streamline (sl.interposer) wraps the devices and command lists it creates; vkd3d-proton and DXVK do not know the wrappers. wl_streamline.h asks a wrapper for StreamlineRetrieveBaseInterface (Streamline source/core/sl.interposer/d3d12/d3d12Device.cpp) and the interop calls retry on the wrapped object: device queries, BeginVkCommandBufferInterop/End, GetVulkanResourceInfo1. DROIDDECK_UPSCALE_LOG=1 now also logs the NGX bridge's D3D12 attach and first evaluate (seam ready, images found, command list accepted, dispatch result).
This commit is contained in:
1 parent
772f83cf95
commit
e5d7bddfdb
11 files changed
+230
-28
No files matched your search
@@ -102,7 +102,7 @@ static inline void *dispatch_key(const void *obj) {
|
||||
// ---- Instance & Device tables ----
|
||||
#define MAX_INSTANCES 8
|
||||
#define MAX_DEVICES 16
|
||||
#define MAX_TRACK_BUF 128
|
||||
#define MAX_TRACK_BUF 1024
|
||||
#define MAX_TRACK_IMG 4096
|
||||
|
||||
typedef struct {
|
||||
@@ -1603,15 +1603,23 @@ static VkResult VKAPI_CALL hook_vkCreateBuffer(VkDevice device, const VkBufferCr
|
||||
if (!down) return VK_ERROR_INITIALIZATION_FAILED;
|
||||
VkResult r = down(device, pCreateInfo, pAllocator, pBuffer);
|
||||
if (r == VK_SUCCESS && d && pCreateInfo && pBuffer) {
|
||||
// The bridges create the mailbox with exactly STORAGE_BUFFER|TRANSFER_DST and the marker with exactly
|
||||
// TRANSFER_DST (wl_seam_client.h). Matching any buffer with those bits let a game's own 8 KB storage buffers
|
||||
// fill the table before the bridge's (Bright Memory: Infinite, D3D12: DLSS frames never reached the layer).
|
||||
int kind = 0;
|
||||
if (pCreateInfo->size == WLFSR4_MAILBOX_BYTES && (pCreateInfo->usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT))
|
||||
if (pCreateInfo->size == WLFSR4_MAILBOX_BYTES &&
|
||||
pCreateInfo->usage == (VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT))
|
||||
kind = 1;
|
||||
else if (pCreateInfo->size == WLFSR4_MARKER_BYTES && (pCreateInfo->usage & VK_BUFFER_USAGE_TRANSFER_DST_BIT))
|
||||
else if (pCreateInfo->size == WLFSR4_MARKER_BYTES && pCreateInfo->usage == VK_BUFFER_USAGE_TRANSFER_DST_BIT)
|
||||
kind = 2;
|
||||
if (kind) {
|
||||
static int full_logged = 0;
|
||||
pthread_mutex_lock(&g_mu);
|
||||
if (d->nbufs < MAX_TRACK_BUF) {
|
||||
d->bufs[d->nbufs++] = (SeamBufEnt){*pBuffer, VK_NULL_HANDLE, NULL, pCreateInfo->size, pCreateInfo->usage, kind};
|
||||
} else if (!full_logged) {
|
||||
full_logged = 1;
|
||||
F4_LOGW("seam buffer table full (%d): a bridge buffer is not tracked", MAX_TRACK_BUF);
|
||||
}
|
||||
pthread_mutex_unlock(&g_mu);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user