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.
32 lines
1.1 KiB
32 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/IUnityGraphicsD3D12.h"
|
|
|
|
class FSR3Upscaler_DX12 : FSR3Upscaler_FFXBase
|
|
{
|
|
public:
|
|
FSR3Upscaler_DX12(IUnityInterfaces* unityInterfaces, IUnityGraphicsD3D12v7* graphicsDevice):
|
|
FSR3Upscaler_FFXBase(unityInterfaces),
|
|
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, const UnityRenderingExtTextureUpdateParamsV2* params, 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;
|
|
};
|