From 39b83c1d370bfa59877a6f026dbca4171df65b2c Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Wed, 2 Apr 2025 22:17:08 +0200 Subject: [PATCH] Fixed a silly bug. Plugin works again now. --- FSR3UnityPlugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FSR3UnityPlugin.cpp b/FSR3UnityPlugin.cpp index 127170c..6abfaed 100644 --- a/FSR3UnityPlugin.cpp +++ b/FSR3UnityPlugin.cpp @@ -74,7 +74,7 @@ static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType ev s_Upscaler = new FSR3Upscaler_DX12(s_Log, graphicsD3D12); - UnityD3D12PluginEventConfig eventConfig; + UnityD3D12PluginEventConfig eventConfig{}; eventConfig.graphicsQueueAccess = kUnityD3D12GraphicsQueueAccess_DontCare; eventConfig.flags = kUnityD3D12EventConfigFlag_EnsurePreviousFrameSubmission | kUnityD3D12EventConfigFlag_FlushCommandBuffers | kUnityD3D12EventConfigFlag_SyncWorkerThreads | kUnityD3D12EventConfigFlag_ModifiesCommandBuffersState; eventConfig.ensureActiveRenderTextureIsBound = false; @@ -92,7 +92,7 @@ static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType ev s_Upscaler = new FSR3Upscaler_Vulkan(s_Log, graphicsVulkan); - UnityVulkanPluginEventConfig eventConfig; + UnityVulkanPluginEventConfig eventConfig{}; eventConfig.graphicsQueueAccess = kUnityVulkanGraphicsQueueAccess_DontCare; eventConfig.flags = kUnityVulkanEventConfigFlag_EnsurePreviousFrameSubmission | kUnityVulkanEventConfigFlag_FlushCommandBuffers | kUnityVulkanEventConfigFlag_SyncWorkerThreads | kUnityVulkanEventConfigFlag_ModifiesCommandBuffersState; eventConfig.renderPassPrecondition = kUnityVulkanRenderPass_EnsureInside; @@ -162,7 +162,7 @@ extern "C" uint32_t UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API AMDUP_CreateFeatu { if (s_Upscaler != nullptr) { - s_Upscaler->CreateFeatureSlot(); + return s_Upscaler->CreateFeatureSlot(); } return UINT32_MAX;