mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-05 04:33:51 +00:00
Remove FSR3 wrapper path and keep official Path-A runtime only
This commit is contained in:
parent
9ff9f2f1f1
commit
1c7b87ee78
9 changed files with 46 additions and 2208 deletions
|
|
@ -44,24 +44,13 @@ struct AmdFsr3RuntimeDispatchDesc {
|
|||
float cameraFar = 1000.0f;
|
||||
float cameraFovYRadians = 1.0f;
|
||||
bool reset = false;
|
||||
uint32_t externalFlags = 0;
|
||||
uint64_t colorMemoryHandle = 0;
|
||||
uint64_t depthMemoryHandle = 0;
|
||||
uint64_t motionVectorMemoryHandle = 0;
|
||||
uint64_t outputMemoryHandle = 0;
|
||||
uint64_t frameGenOutputMemoryHandle = 0;
|
||||
uint64_t acquireSemaphoreHandle = 0;
|
||||
uint64_t releaseSemaphoreHandle = 0;
|
||||
uint64_t acquireSemaphoreValue = 0;
|
||||
uint64_t releaseSemaphoreValue = 0;
|
||||
};
|
||||
|
||||
class AmdFsr3Runtime {
|
||||
public:
|
||||
enum class LoadPathKind {
|
||||
None,
|
||||
Official,
|
||||
Wrapper
|
||||
Official
|
||||
};
|
||||
|
||||
AmdFsr3Runtime();
|
||||
|
|
@ -76,18 +65,9 @@ public:
|
|||
bool isFrameGenerationReady() const { return frameGenerationReady_; }
|
||||
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:
|
||||
enum class RuntimeBackend {
|
||||
None,
|
||||
Official,
|
||||
Wrapper
|
||||
};
|
||||
|
||||
void* libHandle_ = nullptr;
|
||||
std::string loadedLibraryPath_;
|
||||
void* scratchBuffer_ = nullptr;
|
||||
|
|
@ -95,15 +75,11 @@ private:
|
|||
bool ready_ = false;
|
||||
bool frameGenerationReady_ = false;
|
||||
LoadPathKind loadPathKind_ = LoadPathKind::None;
|
||||
std::string wrapperBackendName_;
|
||||
uint32_t wrapperCapabilities_ = 0;
|
||||
std::string lastError_;
|
||||
|
||||
struct RuntimeFns;
|
||||
RuntimeFns* fns_ = nullptr;
|
||||
void* contextStorage_ = nullptr;
|
||||
void* wrapperContext_ = nullptr;
|
||||
RuntimeBackend backend_ = RuntimeBackend::None;
|
||||
};
|
||||
|
||||
} // namespace wowee::rendering
|
||||
|
|
|
|||
|
|
@ -1,104 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WOWEE_FSR3_WRAPPER_ABI_VERSION 3u
|
||||
|
||||
typedef void* WoweeFsr3WrapperContext;
|
||||
|
||||
typedef struct WoweeFsr3WrapperInitDesc {
|
||||
uint32_t structSize;
|
||||
uint32_t abiVersion;
|
||||
VkPhysicalDevice physicalDevice;
|
||||
VkDevice device;
|
||||
PFN_vkGetDeviceProcAddr getDeviceProcAddr;
|
||||
uint32_t maxRenderWidth;
|
||||
uint32_t maxRenderHeight;
|
||||
uint32_t displayWidth;
|
||||
uint32_t displayHeight;
|
||||
VkFormat colorFormat;
|
||||
uint32_t enableFlags;
|
||||
} WoweeFsr3WrapperInitDesc;
|
||||
|
||||
typedef struct WoweeFsr3WrapperDispatchDesc {
|
||||
uint32_t structSize;
|
||||
VkCommandBuffer commandBuffer;
|
||||
VkImage colorImage;
|
||||
VkImage depthImage;
|
||||
VkImage motionVectorImage;
|
||||
VkImage outputImage;
|
||||
VkImage frameGenOutputImage;
|
||||
uint32_t renderWidth;
|
||||
uint32_t renderHeight;
|
||||
uint32_t outputWidth;
|
||||
uint32_t outputHeight;
|
||||
VkFormat colorFormat;
|
||||
VkFormat depthFormat;
|
||||
VkFormat motionVectorFormat;
|
||||
VkFormat outputFormat;
|
||||
float jitterX;
|
||||
float jitterY;
|
||||
float motionScaleX;
|
||||
float motionScaleY;
|
||||
float frameTimeDeltaMs;
|
||||
float cameraNear;
|
||||
float cameraFar;
|
||||
float cameraFovYRadians;
|
||||
uint32_t reset;
|
||||
uint32_t externalFlags;
|
||||
uint64_t colorMemoryHandle;
|
||||
uint64_t depthMemoryHandle;
|
||||
uint64_t motionVectorMemoryHandle;
|
||||
uint64_t outputMemoryHandle;
|
||||
uint64_t frameGenOutputMemoryHandle;
|
||||
uint64_t acquireSemaphoreHandle;
|
||||
uint64_t releaseSemaphoreHandle;
|
||||
uint64_t acquireSemaphoreValue;
|
||||
uint64_t releaseSemaphoreValue;
|
||||
} WoweeFsr3WrapperDispatchDesc;
|
||||
|
||||
enum {
|
||||
WOWEE_FSR3_WRAPPER_ENABLE_HDR_INPUT = 1u << 0,
|
||||
WOWEE_FSR3_WRAPPER_ENABLE_DEPTH_INVERTED = 1u << 1,
|
||||
WOWEE_FSR3_WRAPPER_ENABLE_FRAME_GENERATION = 1u << 2
|
||||
};
|
||||
|
||||
enum {
|
||||
WOWEE_FSR3_WRAPPER_EXTERNAL_COLOR_MEMORY = 1u << 0,
|
||||
WOWEE_FSR3_WRAPPER_EXTERNAL_DEPTH_MEMORY = 1u << 1,
|
||||
WOWEE_FSR3_WRAPPER_EXTERNAL_MOTION_MEMORY = 1u << 2,
|
||||
WOWEE_FSR3_WRAPPER_EXTERNAL_OUTPUT_MEMORY = 1u << 3,
|
||||
WOWEE_FSR3_WRAPPER_EXTERNAL_FRAMEGEN_OUTPUT_MEMORY = 1u << 4,
|
||||
WOWEE_FSR3_WRAPPER_EXTERNAL_ACQUIRE_SEMAPHORE = 1u << 5,
|
||||
WOWEE_FSR3_WRAPPER_EXTERNAL_RELEASE_SEMAPHORE = 1u << 6
|
||||
};
|
||||
|
||||
enum {
|
||||
WOWEE_FSR3_WRAPPER_CAP_UPSCALE = 1u << 0,
|
||||
WOWEE_FSR3_WRAPPER_CAP_FRAME_GENERATION = 1u << 1,
|
||||
WOWEE_FSR3_WRAPPER_CAP_EXTERNAL_INTEROP = 1u << 2
|
||||
};
|
||||
|
||||
uint32_t wowee_fsr3_wrapper_get_abi_version(void);
|
||||
const char* wowee_fsr3_wrapper_get_name(void);
|
||||
const char* wowee_fsr3_wrapper_get_backend(WoweeFsr3WrapperContext context);
|
||||
uint32_t wowee_fsr3_wrapper_get_capabilities(WoweeFsr3WrapperContext context);
|
||||
int32_t wowee_fsr3_wrapper_initialize(const WoweeFsr3WrapperInitDesc* initDesc,
|
||||
WoweeFsr3WrapperContext* outContext,
|
||||
char* outErrorText,
|
||||
uint32_t outErrorTextCapacity);
|
||||
int32_t wowee_fsr3_wrapper_dispatch_upscale(WoweeFsr3WrapperContext context,
|
||||
const WoweeFsr3WrapperDispatchDesc* dispatchDesc);
|
||||
int32_t wowee_fsr3_wrapper_dispatch_framegen(WoweeFsr3WrapperContext context,
|
||||
const WoweeFsr3WrapperDispatchDesc* dispatchDesc);
|
||||
void wowee_fsr3_wrapper_shutdown(WoweeFsr3WrapperContext context);
|
||||
const char* wowee_fsr3_wrapper_get_last_error(WoweeFsr3WrapperContext context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue