mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Gate bridge interop export by wrapper capability bits
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
This commit is contained in:
parent
076793c61a
commit
78fa10c6ba
3 changed files with 12 additions and 3 deletions
|
|
@ -77,6 +77,8 @@ public:
|
|||
const std::string& loadedLibraryPath() const { return loadedLibraryPath_; }
|
||||
LoadPathKind loadPathKind() const { return loadPathKind_; }
|
||||
const std::string& wrapperBackendName() const { return wrapperBackendName_; }
|
||||
uint32_t wrapperCapabilities() const { return wrapperCapabilities_; }
|
||||
bool hasWrapperExternalInterop() const;
|
||||
const std::string& lastError() const { return lastError_; }
|
||||
|
||||
private:
|
||||
|
|
@ -94,6 +96,7 @@ private:
|
|||
bool frameGenerationReady_ = false;
|
||||
LoadPathKind loadPathKind_ = LoadPathKind::None;
|
||||
std::string wrapperBackendName_;
|
||||
uint32_t wrapperCapabilities_ = 0;
|
||||
std::string lastError_;
|
||||
|
||||
struct RuntimeFns;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,11 @@ AmdFsr3Runtime::~AmdFsr3Runtime() {
|
|||
shutdown();
|
||||
}
|
||||
|
||||
bool AmdFsr3Runtime::hasWrapperExternalInterop() const {
|
||||
if (loadPathKind_ != LoadPathKind::Wrapper) return false;
|
||||
return (wrapperCapabilities_ & WOWEE_FSR3_WRAPPER_CAP_EXTERNAL_INTEROP) != 0u;
|
||||
}
|
||||
|
||||
#if WOWEE_HAS_AMD_FSR3_FRAMEGEN
|
||||
namespace {
|
||||
FfxErrorCode vkSwapchainConfigureNoop(const FfxFrameGenerationConfig*) {
|
||||
|
|
@ -161,6 +166,7 @@ bool AmdFsr3Runtime::initialize(const AmdFsr3RuntimeInitDesc& desc) {
|
|||
lastError_.clear();
|
||||
loadPathKind_ = LoadPathKind::None;
|
||||
wrapperBackendName_.clear();
|
||||
wrapperCapabilities_ = 0;
|
||||
backend_ = RuntimeBackend::None;
|
||||
|
||||
#if !WOWEE_HAS_AMD_FSR3_FRAMEGEN
|
||||
|
|
@ -307,6 +313,7 @@ bool AmdFsr3Runtime::initialize(const AmdFsr3RuntimeInitDesc& desc) {
|
|||
wrapperCaps |= WOWEE_FSR3_WRAPPER_CAP_FRAME_GENERATION;
|
||||
}
|
||||
}
|
||||
wrapperCapabilities_ = wrapperCaps;
|
||||
frameGenerationReady_ = desc.enableFrameGeneration &&
|
||||
((wrapperCaps & WOWEE_FSR3_WRAPPER_CAP_FRAME_GENERATION) != 0u);
|
||||
if (fns_->wrapperGetBackend) {
|
||||
|
|
@ -705,6 +712,7 @@ void AmdFsr3Runtime::shutdown() {
|
|||
loadedLibraryPath_.clear();
|
||||
loadPathKind_ = LoadPathKind::None;
|
||||
wrapperBackendName_.clear();
|
||||
wrapperCapabilities_ = 0;
|
||||
backend_ = RuntimeBackend::None;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4620,9 +4620,7 @@ void Renderer::dispatchAmdFsr3Framegen() {
|
|||
using ExportHandle = int;
|
||||
#endif
|
||||
bool exportInteropHandles = false;
|
||||
if (fsr2_.amdFsr3Runtime &&
|
||||
fsr2_.amdFsr3Runtime->loadPathKind() == AmdFsr3Runtime::LoadPathKind::Wrapper &&
|
||||
fsr2_.amdFsr3Runtime->wrapperBackendName() == "dx12_bridge") {
|
||||
if (fsr2_.amdFsr3Runtime && fsr2_.amdFsr3Runtime->hasWrapperExternalInterop()) {
|
||||
exportInteropHandles = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue