mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-25 13:03:50 +00:00
Only export bridge interop handles for dx12_bridge backend
This commit is contained in:
parent
91f83cb108
commit
27261303d2
1 changed files with 9 additions and 0 deletions
|
|
@ -4619,6 +4619,13 @@ void Renderer::dispatchAmdFsr3Framegen() {
|
||||||
#else
|
#else
|
||||||
using ExportHandle = int;
|
using ExportHandle = int;
|
||||||
#endif
|
#endif
|
||||||
|
bool exportInteropHandles = false;
|
||||||
|
if (fsr2_.amdFsr3Runtime &&
|
||||||
|
fsr2_.amdFsr3Runtime->loadPathKind() == AmdFsr3Runtime::LoadPathKind::Wrapper &&
|
||||||
|
fsr2_.amdFsr3Runtime->wrapperBackendName() == "dx12_bridge") {
|
||||||
|
exportInteropHandles = true;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<ExportHandle> exportedHandles;
|
std::vector<ExportHandle> exportedHandles;
|
||||||
auto trackHandle = [&](uint64_t h) {
|
auto trackHandle = [&](uint64_t h) {
|
||||||
if (!h) return;
|
if (!h) return;
|
||||||
|
|
@ -4642,6 +4649,7 @@ void Renderer::dispatchAmdFsr3Framegen() {
|
||||||
};
|
};
|
||||||
|
|
||||||
fgDispatch.externalFlags = 0;
|
fgDispatch.externalFlags = 0;
|
||||||
|
if (exportInteropHandles) {
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
fgDispatch.colorMemoryHandle = exportImageMemoryHandleWin32(
|
fgDispatch.colorMemoryHandle = exportImageMemoryHandleWin32(
|
||||||
device, vkGetDeviceProcAddr, alloc, fsr2_.sceneColor);
|
device, vkGetDeviceProcAddr, alloc, fsr2_.sceneColor);
|
||||||
|
|
@ -4726,6 +4734,7 @@ void Renderer::dispatchAmdFsr3Framegen() {
|
||||||
fgDispatch.acquireSemaphoreValue = syncValue;
|
fgDispatch.acquireSemaphoreValue = syncValue;
|
||||||
fgDispatch.releaseSemaphoreValue = syncValue;
|
fgDispatch.releaseSemaphoreValue = syncValue;
|
||||||
fsr2_.amdFsr3InteropSyncValue = syncValue + 1;
|
fsr2_.amdFsr3InteropSyncValue = syncValue + 1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!fsr2_.amdFsr3Runtime->dispatchUpscale(fgDispatch)) {
|
if (!fsr2_.amdFsr3Runtime->dispatchUpscale(fgDispatch)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue