Skip to content

Commit f3201da

Browse files
Moved EngineMemory.h/cpp from GraphicsEngine to Common
1 parent f446738 commit f3201da

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

Common/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ set(INTERFACE
2626
interface/LRUCache.hpp
2727
interface/FixedLinearAllocator.hpp
2828
interface/DynamicLinearAllocator.hpp
29+
interface/EngineMemory.h
2930
interface/MemoryFileStream.hpp
3031
interface/ObjectBase.hpp
3132
interface/ObjectsRegistry.hpp
@@ -56,6 +57,7 @@ set(SOURCE
5657
src/BasicFileStream.cpp
5758
src/DataBlobImpl.cpp
5859
src/DefaultRawMemoryAllocator.cpp
60+
src/EngineMemory.cpp
5961
src/FileWrapper.cpp
6062
src/FixedBlockMemoryAllocator.cpp
6163
src/GeometryPrimitives.cpp

Graphics/GraphicsEngine/include/EngineMemory.h renamed to Common/interface/EngineMemory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,9 +28,9 @@
2828
#pragma once
2929

3030
/// \file
31-
/// Implementation of the Diligent::BufferBase template class
31+
/// Implementation of the IMemoryAllocator interface and global memory allocation functions
3232

33-
#include "MemoryAllocator.h"
33+
#include "../../Primitives/interface/MemoryAllocator.h"
3434

3535
DILIGENT_BEGIN_NAMESPACE(Diligent)
3636

Graphics/GraphicsEngine/src/EngineMemory.cpp renamed to Common/src/EngineMemory.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,10 +25,6 @@
2525
* of the possibility of such damages.
2626
*/
2727

28-
// stdafx.cpp : source file that includes just the standard includes
29-
// RenderEngine.pch will be the pre-compiled header
30-
// stdafx.obj will contain the pre-compiled type information
31-
3228
#include "EngineMemory.h"
3329
#include "DefaultRawMemoryAllocator.hpp"
3430
#include "DebugUtilities.hpp"

Graphics/GraphicsEngine/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ set(INCLUDE
1515
include/DeviceObjectBase.hpp
1616
include/DeviceObjectArchive.hpp
1717
include/EngineFactoryBase.hpp
18-
include/EngineMemory.h
1918
include/FenceBase.hpp
2019
include/FramebufferBase.hpp
2120
include/IndexWrapper.hpp
@@ -92,7 +91,6 @@ set(SOURCE
9291
src/DeviceContextBase.cpp
9392
src/DeviceMemoryBase.cpp
9493
src/DeviceObjectArchive.cpp
95-
src/EngineMemory.cpp
9694
src/EngineFactoryBase.cpp
9795
src/FramebufferBase.cpp
9896
src/GraphicsTypesX.cpp

Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ PipelineResourceSignatureVkImpl::PipelineResourceSignatureVkImpl(IReferenceCount
169169
void PipelineResourceSignatureVkImpl::CreateSetLayouts(const bool IsSerialized)
170170
{
171171
// Initialize static resource cache first
172-
if (Uint32 NumStaticResStages = GetNumStaticResStages())
172+
if (GetNumStaticResStages() > 0)
173173
{
174174
Uint32 StaticResourceCount = 0; // The total number of static resources in all stages
175175
// accounting for array sizes.

Tests/DiligentCoreTest/src/GraphicsEngine/PSOSerializerTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2024 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,14 +25,14 @@
2525
*/
2626

2727
#include "../../../../Graphics/GraphicsEngine/include/PSOSerializer.hpp"
28-
#include "../../../../Graphics/GraphicsEngine/include/EngineMemory.h"
2928

3029
#include <algorithm>
3130
#include <array>
3231
#include <cstring>
3332

3433
#include "gtest/gtest.h"
3534

35+
#include "EngineMemory.h"
3636
#include "PipelineState.h"
3737
#include "Serializer.hpp"
3838

0 commit comments

Comments
 (0)