@ -27,7 +27,7 @@
# include "FSR3UnityTypes.h"
# include "FSR3UnityTypes.h"
static const int32_t BaseEventId = 0 ;
static const int32_t BaseEventId = 313 ;
static IUnityInterfaces * s_UnityInterfaces = nullptr ;
static IUnityInterfaces * s_UnityInterfaces = nullptr ;
static IUnityLog * s_Log = nullptr ;
static IUnityLog * s_Log = nullptr ;
@ -119,6 +119,12 @@ static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType ev
UNITY_LOG_ERROR ( s_Log , " Could not obtain D3D12 Graphics interface! " ) ;
UNITY_LOG_ERROR ( s_Log , " Could not obtain D3D12 Graphics interface! " ) ;
return ;
return ;
}
}
UnityD3D12PluginEventConfig eventConfig ;
eventConfig . graphicsQueueAccess = kUnityD3D12GraphicsQueueAccess_DontCare ;
eventConfig . flags = kUnityD3D12EventConfigFlag_EnsurePreviousFrameSubmission | kUnityD3D12EventConfigFlag_FlushCommandBuffers | kUnityD3D12EventConfigFlag_SyncWorkerThreads | kUnityD3D12EventConfigFlag_ModifiesCommandBuffersState ;
eventConfig . ensureActiveRenderTextureIsBound = false ;
s_GraphicsD3D12 - > ConfigureEvent ( BaseEventId + FSR3PluginEvent : : eExecute , & eventConfig ) ;
break ;
break ;
}
}
case kUnityGfxRendererVulkan :
case kUnityGfxRendererVulkan :
@ -129,6 +135,12 @@ static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType ev
UNITY_LOG_ERROR ( s_Log , " Could not obtain Vulkan Graphics interface! " ) ;
UNITY_LOG_ERROR ( s_Log , " Could not obtain Vulkan Graphics interface! " ) ;
return ;
return ;
}
}
UnityVulkanPluginEventConfig eventConfig ;
eventConfig . graphicsQueueAccess = kUnityVulkanGraphicsQueueAccess_DontCare ;
eventConfig . flags = kUnityVulkanEventConfigFlag_EnsurePreviousFrameSubmission | kUnityVulkanEventConfigFlag_FlushCommandBuffers | kUnityVulkanEventConfigFlag_SyncWorkerThreads | kUnityVulkanEventConfigFlag_ModifiesCommandBuffersState ;
eventConfig . renderPassPrecondition = kUnityVulkanRenderPass_EnsureInside ;
s_GraphicsVulkan - > ConfigureEvent ( BaseEventId + FSR3PluginEvent : : eExecute , & eventConfig ) ;
break ;
break ;
}
}
}
}