From dc27b0dd4007228e0785c11974956bc14774dcd9 Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Mon, 6 Mar 2023 20:06:15 +0100 Subject: [PATCH] Fixed merge conflicts and updated copyright notices --- neo/renderer/NVRHI/RenderBackend_NVRHI.cpp | 2 +- neo/sys/DeviceManager.cpp | 25 ++++++++++++++++++++++ neo/sys/DeviceManager.h | 3 +++ neo/sys/DeviceManager_DX12.cpp | 7 ++++-- neo/sys/DeviceManager_VK.cpp | 5 ++++- 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/neo/renderer/NVRHI/RenderBackend_NVRHI.cpp b/neo/renderer/NVRHI/RenderBackend_NVRHI.cpp index 8f8e4265..56fb0460 100644 --- a/neo/renderer/NVRHI/RenderBackend_NVRHI.cpp +++ b/neo/renderer/NVRHI/RenderBackend_NVRHI.cpp @@ -1603,7 +1603,7 @@ void idRenderBackend::GL_BlockingSwapBuffers() OPTICK_EVENT( "BlockingSwapBuffers" ); // Make sure that all frames have finished rendering - // SRS - device-level sync kills perf by serializing command queue processing (CPU) and rendering (GPU) + // SRS - device-level sync kills perf by serializing command queue processing (CPU) and rendering (GPU) // - instead, use alternative sync method (based on command queue event queries) inside Present() //deviceManager->GetDevice()->waitForIdle(); diff --git a/neo/sys/DeviceManager.cpp b/neo/sys/DeviceManager.cpp index a62a00ba..6e792445 100644 --- a/neo/sys/DeviceManager.cpp +++ b/neo/sys/DeviceManager.cpp @@ -1,3 +1,28 @@ +/* +* Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. +* Copyright (C) 2022 Stephen Pridham (id Tech 4x integration) +* Copyright (C) 2023 Stephen Saunders (id Tech 4x integration) +* Copyright (C) 2023 Robert Beckebans (id Tech 4x integration) +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +*/ + #include "precompiled.h" #pragma hdrstop diff --git a/neo/sys/DeviceManager.h b/neo/sys/DeviceManager.h index 862a2ed9..91d2492b 100644 --- a/neo/sys/DeviceManager.h +++ b/neo/sys/DeviceManager.h @@ -1,5 +1,8 @@ /* * Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. +* Copyright (C) 2022 Stephen Pridham (id Tech 4x integration) +* Copyright (C) 2023 Stephen Saunders (id Tech 4x integration) +* Copyright (C) 2023 Robert Beckebans (id Tech 4x integration) * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/neo/sys/DeviceManager_DX12.cpp b/neo/sys/DeviceManager_DX12.cpp index 338bb2bf..dea742e8 100644 --- a/neo/sys/DeviceManager_DX12.cpp +++ b/neo/sys/DeviceManager_DX12.cpp @@ -1,5 +1,8 @@ /* * Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. +* Copyright (C) 2022 Stephen Pridham (id Tech 4x integration) +* Copyright (C) 2023 Stephen Saunders (id Tech 4x integration) +* Copyright (C) 2023 Robert Beckebans (id Tech 4x integration) * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -448,8 +451,8 @@ bool DeviceManager_DX12::CreateDeviceAndSwapChain() m_FrameFenceEvents.push_back( CreateEvent( nullptr, false, true, NULL ) ); } - m_FrameWaitQuery = nvrhiDevice->createEventQuery(); - nvrhiDevice->setEventQuery( m_FrameWaitQuery, nvrhi::CommandQueue::Graphics ); + m_FrameWaitQuery = m_NvrhiDevice->createEventQuery(); + m_NvrhiDevice->setEventQuery( m_FrameWaitQuery, nvrhi::CommandQueue::Graphics ); return true; } diff --git a/neo/sys/DeviceManager_VK.cpp b/neo/sys/DeviceManager_VK.cpp index b39025b3..8400b9b7 100644 --- a/neo/sys/DeviceManager_VK.cpp +++ b/neo/sys/DeviceManager_VK.cpp @@ -1,5 +1,8 @@ /* * Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. +* Copyright (C) 2022 Stephen Pridham (id Tech 4x integration) +* Copyright (C) 2023 Stephen Saunders (id Tech 4x integration) +* Copyright (C) 2023 Robert Beckebans (id Tech 4x integration) * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1285,7 +1288,7 @@ void DeviceManager_VK::Present() const vk::Result res = m_PresentQueue.presentKHR( &info ); assert( res == vk::Result::eSuccess || res == vk::Result::eErrorOutOfDateKHR || res == vk::Result::eSuboptimalKHR ); - if( m_DeviceParms.enableDebugRuntime || deviceParms.vsyncEnabled ) + if( m_DeviceParams.enableDebugRuntime || m_DeviceParams.vsyncEnabled ) { // according to vulkan-tutorial.com, "the validation layer implementation expects // the application to explicitly synchronize with the GPU"