From e2a2ac9d93f84cf85e43add718186b09c2846248 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Sat, 9 Nov 2024 10:53:31 +0100 Subject: [PATCH] nvapi: Move resource-factory --- src/meson.build | 2 +- src/nvapi/nvapi_adapter_registry.h | 2 +- src/nvapi/nvapi_d3d_instance.h | 2 +- src/{ => nvapi}/resource_factory.cpp | 6 +++--- src/{ => nvapi}/resource_factory.h | 10 +++++----- src/nvapi_globals.h | 2 +- tests/meson.build | 2 +- tests/mock_factory.h | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) rename src/{ => nvapi}/resource_factory.cpp (93%) rename src/{ => nvapi}/resource_factory.h (75%) diff --git a/src/meson.build b/src/meson.build index 91c5ba48..273493af 100644 --- a/src/meson.build +++ b/src/meson.build @@ -2,6 +2,7 @@ nvapi_src = files([ 'util/util_string.cpp', 'util/util_env.cpp', 'util/util_log.cpp', + 'nvapi/resource_factory.cpp', 'nvapi/lfx.cpp', 'nvapi/nvapi_d3d_instance.cpp', 'nvapi/nvapi_d3d_low_latency_device.cpp', @@ -12,7 +13,6 @@ nvapi_src = files([ 'nvapi/nvapi_output.cpp', 'nvapi/vulkan.cpp', 'nvapi/nvml.cpp', - 'resource_factory.cpp', 'nvapi_globals.cpp', 'nvapi.cpp', 'nvapi_d3d.cpp', diff --git a/src/nvapi/nvapi_adapter_registry.h b/src/nvapi/nvapi_adapter_registry.h index 633221ad..f421d01b 100644 --- a/src/nvapi/nvapi_adapter_registry.h +++ b/src/nvapi/nvapi_adapter_registry.h @@ -1,7 +1,7 @@ #pragma once #include "../nvapi_private.h" -#include "../resource_factory.h" +#include "resource_factory.h" #include "nvapi_adapter.h" #include "nvapi_output.h" #include "vulkan.h" diff --git a/src/nvapi/nvapi_d3d_instance.h b/src/nvapi/nvapi_d3d_instance.h index eb7d9388..5b3cf6d2 100644 --- a/src/nvapi/nvapi_d3d_instance.h +++ b/src/nvapi/nvapi_d3d_instance.h @@ -1,7 +1,7 @@ #pragma once #include "../nvapi_private.h" -#include "../resource_factory.h" +#include "resource_factory.h" namespace dxvk { class NvapiD3dInstance { diff --git a/src/resource_factory.cpp b/src/nvapi/resource_factory.cpp similarity index 93% rename from src/resource_factory.cpp rename to src/nvapi/resource_factory.cpp index 92af1c4e..7132470b 100644 --- a/src/resource_factory.cpp +++ b/src/nvapi/resource_factory.cpp @@ -1,7 +1,7 @@ #include "resource_factory.h" -#include "interfaces/dxvk_interfaces.h" -#include "util/util_string.h" -#include "util/util_log.h" +#include "../interfaces/dxvk_interfaces.h" +#include "../util/util_string.h" +#include "../util/util_log.h" namespace dxvk { ResourceFactory::ResourceFactory() = default; diff --git a/src/resource_factory.h b/src/nvapi/resource_factory.h similarity index 75% rename from src/resource_factory.h rename to src/nvapi/resource_factory.h index 51c4b043..4926db03 100644 --- a/src/resource_factory.h +++ b/src/nvapi/resource_factory.h @@ -1,10 +1,10 @@ #pragma once -#include "nvapi_private.h" -#include "util/com_pointer.h" -#include "nvapi/vulkan.h" -#include "nvapi/nvml.h" -#include "nvapi/lfx.h" +#include "../nvapi_private.h" +#include "../util/com_pointer.h" +#include "vulkan.h" +#include "nvml.h" +#include "lfx.h" namespace dxvk { class ResourceFactory { diff --git a/src/nvapi_globals.h b/src/nvapi_globals.h index 8ceaaba3..c25ef331 100644 --- a/src/nvapi_globals.h +++ b/src/nvapi_globals.h @@ -1,7 +1,7 @@ #pragma once #include "nvapi_private.h" -#include "resource_factory.h" +#include "nvapi/resource_factory.h" #include "nvapi/nvapi_adapter_registry.h" #include "nvapi/nvapi_d3d_instance.h" diff --git a/tests/meson.build b/tests/meson.build index 8f571b51..3ae4df00 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -2,6 +2,7 @@ nvapi_src = files([ '../src/util/util_string.cpp', '../src/util/util_env.cpp', '../src/util/util_log.cpp', + '../src/nvapi/resource_factory.cpp', '../src/nvapi/vulkan.cpp', '../src/nvapi/nvml.cpp', '../src/nvapi/lfx.cpp', @@ -10,7 +11,6 @@ nvapi_src = files([ '../src/nvapi/nvapi_output.cpp', '../src/nvapi/nvapi_adapter.cpp', '../src/nvapi/nvapi_adapter_registry.cpp', - '../src/resource_factory.cpp', '../src/nvapi/nvapi_d3d11_device.cpp', '../src/nvapi/nvapi_d3d12_device.cpp', '../src/nvapi_globals.cpp', diff --git a/tests/mock_factory.h b/tests/mock_factory.h index 5ab04e62..b06871dc 100644 --- a/tests/mock_factory.h +++ b/tests/mock_factory.h @@ -1,7 +1,7 @@ #pragma once #include "nvapi_tests_private.h" -#include "../src/resource_factory.h" +#include "../src/nvapi/resource_factory.h" using namespace trompeloeil;