You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
1.1 KiB

#pragma once
#include "FSR3Upscaler_FFXBase.h"
#include "ffx_api/ffx_upscale.hpp"
#include "ffx_api/dx12/ffx_api_dx12.hpp"
#include "UnityPluginAPI/IUnityGraphics.h"
#include "UnityPluginAPI/IUnityGraphicsD3D12.h"
class FSR3Upscaler_DX12 : public FSR3Upscaler_FFXBase
{
public:
FSR3Upscaler_DX12(IUnityLog* log, IUnityGraphicsD3D12v7* graphicsDevice):
FSR3Upscaler_FFXBase(log),
m_GraphicsDevice(graphicsDevice), m_DX12BackendDesc(), m_FrameFenceEventHandle(nullptr)
{
}
bool Init() override;
protected:
bool InitFeature(FSR3Feature_FFX& feature, const FSR3CommandInitializationData* initData) override;
void SetTexture(FSR3Texture textureType, UnityTextureID textureID, uint32_t width, uint32_t height, FSR3TextureDesc* outTextureDesc) override;
void Execute(FSR3Feature_FFX& feature, const FSR3CommandExecutionData* execData) override;
void AwaitEndOfFrame(uint64_t frameValue) override;
void DoShutdown() override;
private:
IUnityGraphicsD3D12v7* m_GraphicsDevice;
ffx::CreateBackendDX12Desc m_DX12BackendDesc;
HANDLE m_FrameFenceEventHandle;
};