diff --git a/UnleashedRecomp/CMakeLists.txt b/UnleashedRecomp/CMakeLists.txt index f736fbe..ed7f4dd 100644 --- a/UnleashedRecomp/CMakeLists.txt +++ b/UnleashedRecomp/CMakeLists.txt @@ -51,8 +51,8 @@ set(SWA_CPU_CXX_SOURCES set(SWA_GPU_CXX_SOURCES "gpu/video.cpp" "gpu/imgui_snapshot.cpp" - "gpu/rhi/rt64_d3d12.cpp" - "gpu/rhi/rt64_vulkan.cpp" + "gpu/rhi/plume_d3d12.cpp" + "gpu/rhi/plume_vulkan.cpp" ) set(SWA_APU_CXX_SOURCES diff --git a/UnleashedRecomp/gpu/rhi/LICENSE b/UnleashedRecomp/gpu/rhi/LICENSE new file mode 100644 index 0000000..b05f241 --- /dev/null +++ b/UnleashedRecomp/gpu/rhi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 renderbag and contributors + +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. diff --git a/UnleashedRecomp/gpu/rhi/rt64_d3d12.cpp b/UnleashedRecomp/gpu/rhi/plume_d3d12.cpp similarity index 99% rename from UnleashedRecomp/gpu/rhi/rt64_d3d12.cpp rename to UnleashedRecomp/gpu/rhi/plume_d3d12.cpp index eccf3cc..b08af83 100644 --- a/UnleashedRecomp/gpu/rhi/rt64_d3d12.cpp +++ b/UnleashedRecomp/gpu/rhi/plume_d3d12.cpp @@ -1,8 +1,11 @@ // -// RT64 +// plume +// +// Copyright (c) 2024 renderbag and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file for details. // -#include "rt64_d3d12.h" +#include "plume_d3d12.h" #include @@ -34,7 +37,7 @@ extern "C" { __declspec(dllexport) extern const char* D3D12SDKPath = ".\\D3D12\\"; } -namespace RT64 { +namespace plume { static const uint32_t ShaderDescriptorHeapSize = 65536; static const uint32_t SamplerDescriptorHeapSize = 1024; static const uint32_t TargetDescriptorHeapSize = 16384; diff --git a/UnleashedRecomp/gpu/rhi/rt64_d3d12.h b/UnleashedRecomp/gpu/rhi/plume_d3d12.h similarity index 99% rename from UnleashedRecomp/gpu/rhi/rt64_d3d12.h rename to UnleashedRecomp/gpu/rhi/plume_d3d12.h index 96f98bd..464a139 100644 --- a/UnleashedRecomp/gpu/rhi/rt64_d3d12.h +++ b/UnleashedRecomp/gpu/rhi/plume_d3d12.h @@ -1,10 +1,13 @@ // -// RT64 +// plume +// +// Copyright (c) 2024 renderbag and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file for details. // #pragma once -#include "rt64_render_interface.h" +#include "plume_render_interface.h" #include #include @@ -15,7 +18,7 @@ #include "D3D12MemAlloc.h" -namespace RT64 { +namespace plume { struct D3D12Buffer; struct D3D12CommandQueue; struct D3D12Device; diff --git a/UnleashedRecomp/gpu/rhi/rt64_render_interface.h b/UnleashedRecomp/gpu/rhi/plume_render_interface.h similarity index 98% rename from UnleashedRecomp/gpu/rhi/rt64_render_interface.h rename to UnleashedRecomp/gpu/rhi/plume_render_interface.h index a01b70e..1360e17 100644 --- a/UnleashedRecomp/gpu/rhi/rt64_render_interface.h +++ b/UnleashedRecomp/gpu/rhi/plume_render_interface.h @@ -1,14 +1,17 @@ // -// RT64 +// plume +// +// Copyright (c) 2024 renderbag and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file for details. // #pragma once #include -#include "rt64_render_interface_types.h" +#include "plume_render_interface_types.h" -namespace RT64 { +namespace plume { // Interfaces. struct RenderBufferFormattedView { @@ -243,4 +246,4 @@ namespace RT64 { extern void TestShutdown(); }; -#include "rt64_render_interface_builders.h" +#include "plume_render_interface_builders.h" diff --git a/UnleashedRecomp/gpu/rhi/rt64_render_interface_builders.h b/UnleashedRecomp/gpu/rhi/plume_render_interface_builders.h similarity index 98% rename from UnleashedRecomp/gpu/rhi/rt64_render_interface_builders.h rename to UnleashedRecomp/gpu/rhi/plume_render_interface_builders.h index 07a7b45..acfedce 100644 --- a/UnleashedRecomp/gpu/rhi/rt64_render_interface_builders.h +++ b/UnleashedRecomp/gpu/rhi/plume_render_interface_builders.h @@ -1,12 +1,15 @@ // -// RT64 +// plume +// +// Copyright (c) 2024 renderbag and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file for details. // #pragma once #include -namespace RT64 { +namespace plume { struct RenderDescriptorSetBuilder { std::list> samplerPointerVectorList; std::vector descriptorRanges; diff --git a/UnleashedRecomp/gpu/rhi/rt64_render_interface_types.h b/UnleashedRecomp/gpu/rhi/plume_render_interface_types.h similarity index 99% rename from UnleashedRecomp/gpu/rhi/rt64_render_interface_types.h rename to UnleashedRecomp/gpu/rhi/plume_render_interface_types.h index 1f2e3ee..f0e94fd 100644 --- a/UnleashedRecomp/gpu/rhi/rt64_render_interface_types.h +++ b/UnleashedRecomp/gpu/rhi/plume_render_interface_types.h @@ -1,5 +1,8 @@ // -// RT64 +// plume +// +// Copyright (c) 2024 renderbag and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file for details. // #pragma once @@ -26,7 +29,7 @@ typedef struct _NSWindow NSWindow; #endif -namespace RT64 { +namespace plume { #if defined(_WIN64) // Native HWND handle to the target window. typedef HWND RenderWindow; diff --git a/UnleashedRecomp/gpu/rhi/rt64_vulkan.cpp b/UnleashedRecomp/gpu/rhi/plume_vulkan.cpp similarity index 99% rename from UnleashedRecomp/gpu/rhi/rt64_vulkan.cpp rename to UnleashedRecomp/gpu/rhi/plume_vulkan.cpp index d5e9db1..a669001 100644 --- a/UnleashedRecomp/gpu/rhi/rt64_vulkan.cpp +++ b/UnleashedRecomp/gpu/rhi/plume_vulkan.cpp @@ -1,11 +1,14 @@ // -// RT64 +// plume +// +// Copyright (c) 2024 renderbag and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file for details. // #define VMA_IMPLEMENTATION #define VOLK_IMPLEMENTATION -#include "rt64_vulkan.h" +#include "plume_vulkan.h" #include #include @@ -13,7 +16,7 @@ #include #if DLSS_ENABLED -# include "render/rt64_dlss.h" +# include "render/plume_dlss.h" #endif #ifndef NDEBUG @@ -24,7 +27,7 @@ // TODO: // - Fix resource pools. -namespace RT64 { +namespace plume { // Backend constants. // Required buffer alignment for acceleration structures. @@ -4063,9 +4066,9 @@ namespace RT64 { } appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; - appInfo.pApplicationName = "RT64"; + appInfo.pApplicationName = "plume"; appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0); - appInfo.pEngineName = "RT64"; + appInfo.pEngineName = "plume"; appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0); appInfo.apiVersion = VK_API_VERSION_1_2; diff --git a/UnleashedRecomp/gpu/rhi/rt64_vulkan.h b/UnleashedRecomp/gpu/rhi/plume_vulkan.h similarity index 99% rename from UnleashedRecomp/gpu/rhi/rt64_vulkan.h rename to UnleashedRecomp/gpu/rhi/plume_vulkan.h index 20f6fe0..0e93536 100644 --- a/UnleashedRecomp/gpu/rhi/rt64_vulkan.h +++ b/UnleashedRecomp/gpu/rhi/plume_vulkan.h @@ -1,10 +1,13 @@ // -// RT64 +// plume +// +// Copyright (c) 2024 renderbag and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file for details. // #pragma once -#include "rt64_render_interface.h" +#include "plume_render_interface.h" #include #include @@ -23,7 +26,7 @@ #include "vk_mem_alloc.h" -namespace RT64 { +namespace plume { struct VulkanCommandQueue; struct VulkanDevice; struct VulkanInterface; diff --git a/UnleashedRecomp/gpu/video.cpp b/UnleashedRecomp/gpu/video.cpp index 0a44b7e..a253eb1 100644 --- a/UnleashedRecomp/gpu/video.cpp +++ b/UnleashedRecomp/gpu/video.cpp @@ -46,7 +46,7 @@ extern "C" __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; } -namespace RT64 +namespace plume { extern std::unique_ptr CreateD3D12Interface(); extern std::unique_ptr CreateVulkanInterface(); diff --git a/UnleashedRecomp/gpu/video.h b/UnleashedRecomp/gpu/video.h index 90b1441..35bedf4 100644 --- a/UnleashedRecomp/gpu/video.h +++ b/UnleashedRecomp/gpu/video.h @@ -3,12 +3,12 @@ //#define ASYNC_PSO_DEBUG #define PSO_CACHING -#include "rhi/rt64_render_interface.h" +#include "rhi/plume_render_interface.h" #define D3DCLEAR_TARGET 0x1 #define D3DCLEAR_ZBUFFER 0x10 -using namespace RT64; +using namespace plume; struct GuestSamplerState {