Optimize compilation time
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/Vector2.h"
|
||||
#include "Engine/Core/Types/DateTime.h"
|
||||
#include "Engine/Core/Types/TimeSpan.h"
|
||||
#include "Editor/Editor.h"
|
||||
#include "Editor/ProjectInfo.h"
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
|
||||
@@ -88,22 +88,14 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
// Compares two Guids for equality
|
||||
// @param left The first Guid to compare
|
||||
// @param right The second Guid to compare
|
||||
// @returns True if the Guids are equal, otherwise false
|
||||
friend bool operator==(const Guid& left, const Guid& right)
|
||||
bool operator==(const Guid& other) const
|
||||
{
|
||||
return ((left.A ^ right.A) | (left.B ^ right.B) | (left.C ^ right.C) | (left.D ^ right.D)) == 0;
|
||||
return ((A ^ other.A) | (B ^ other.B) | (C ^ other.C) | (D ^ other.D)) == 0;
|
||||
}
|
||||
|
||||
// Compares two Guids for inequality
|
||||
// @param left The first Guid to compare
|
||||
// @param right The second Guid to compare
|
||||
// @returns True if the GUIDs are not equal, otherwise false
|
||||
friend bool operator!=(const Guid& left, const Guid& right)
|
||||
bool operator!=(const Guid& other) const
|
||||
{
|
||||
return ((left.A ^ right.A) | (left.B ^ right.B) | (left.C ^ right.C) | (left.D ^ right.D)) != 0;
|
||||
return ((A ^ other.A) | (B ^ other.B) | (C ^ other.C) | (D ^ other.D)) != 0;
|
||||
}
|
||||
|
||||
// Provides access to the GUIDs components
|
||||
|
||||
@@ -81,14 +81,14 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend bool operator==(const Pair& a, const Pair& b)
|
||||
bool operator==(const Pair& other) const
|
||||
{
|
||||
return a.First == b.First && a.Second == b.Second;
|
||||
return First == other.First && Second == other.Second;
|
||||
}
|
||||
|
||||
friend bool operator!=(const Pair& a, const Pair& b)
|
||||
bool operator!=(const Pair& other) const
|
||||
{
|
||||
return a.First != b.First || a.Second != b.Second;
|
||||
return First != other.First || Second != other.Second;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -154,9 +154,9 @@ private:
|
||||
const Mesh* Geo;
|
||||
int32 Lightmap;
|
||||
|
||||
friend bool operator==(const DrawKey& lhs, const DrawKey& rhs)
|
||||
bool operator==(const DrawKey& other) const
|
||||
{
|
||||
return lhs.Mat == rhs.Mat && lhs.Geo == rhs.Geo && lhs.Lightmap == rhs.Lightmap;
|
||||
return Mat == other.Mat && Geo == other.Geo && Lightmap == other.Lightmap;
|
||||
}
|
||||
|
||||
friend uint32 GetHash(const DrawKey& key)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "DefaultGPUTasksExecutor.h"
|
||||
#include "GPUTasksContext.h"
|
||||
#include "GPUTask.h"
|
||||
#include "GPUTasksManager.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
|
||||
DefaultGPUTasksExecutor::DefaultGPUTasksExecutor()
|
||||
@@ -30,7 +31,7 @@ void DefaultGPUTasksExecutor::FrameEnd()
|
||||
|
||||
// Default implementation performs async operations on end of the frame which is synchronized with a rendering thread
|
||||
GPUTask* buffer[32];
|
||||
const int32 count = GPUDevice::Instance->TasksManager.RequestWork(buffer, 32);
|
||||
const int32 count = GPUDevice::Instance->GetTasksManager()->RequestWork(buffer, 32);
|
||||
for (int32 i = 0; i < count; i++)
|
||||
{
|
||||
_context->Run(buffer[i]);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "GPUTasksExecutor.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
|
||||
GPUTasksExecutor::~GPUTasksExecutor()
|
||||
|
||||
@@ -37,7 +37,6 @@ public:
|
||||
/// <summary>
|
||||
/// Gets the context list.
|
||||
/// </summary>
|
||||
/// <returns>GPU contexts</returns>
|
||||
FORCE_INLINE const Array<GPUTasksContext*>* GetContextList() const
|
||||
{
|
||||
return &_contextList;
|
||||
|
||||
@@ -7,26 +7,13 @@
|
||||
|
||||
void GPUTask::Enqueue()
|
||||
{
|
||||
GPUDevice::Instance->TasksManager._tasks.Add(this);
|
||||
GPUDevice::Instance->GetTasksManager()->_tasks.Add(this);
|
||||
}
|
||||
|
||||
GPUTasksManager::GPUTasksManager(GPUDevice* device)
|
||||
: _device(device)
|
||||
, _executor(nullptr)
|
||||
, _bufferIndex(0)
|
||||
GPUTasksManager::GPUTasksManager()
|
||||
{
|
||||
_buffers[0].EnsureCapacity(64);
|
||||
_buffers[1].EnsureCapacity(64);
|
||||
|
||||
// Setup executor
|
||||
SetExecutor(device->CreateTasksExecutor());
|
||||
ASSERT(_executor != nullptr);
|
||||
}
|
||||
|
||||
GPUTasksManager::~GPUTasksManager()
|
||||
{
|
||||
// Ensure that Dispose has been called
|
||||
ASSERT(_executor == nullptr);
|
||||
}
|
||||
|
||||
void GPUTasksManager::SetExecutor(GPUTasksExecutor* value)
|
||||
@@ -114,3 +101,8 @@ int32 GPUTasksManager::RequestWork(GPUTask** buffer, int32 maxCount)
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
String GPUTasksManager::ToString() const
|
||||
{
|
||||
return TEXT("GPU Tasks Manager");
|
||||
}
|
||||
|
||||
@@ -22,30 +22,17 @@ class GPUTasksManager : public Object, public NonCopyable
|
||||
friend GPUTask;
|
||||
|
||||
private:
|
||||
GPUDevice* _device;
|
||||
GPUTasksExecutor* _executor;
|
||||
GPUTasksExecutor* _executor = nullptr;
|
||||
ConcurrentTaskQueue<GPUTask> _tasks;
|
||||
Array<GPUTask*> _buffers[2];
|
||||
int32 _bufferIndex;
|
||||
|
||||
private:
|
||||
GPUTasksManager(GPUDevice* device);
|
||||
~GPUTasksManager();
|
||||
int32 _bufferIndex = 0;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Gets the parent Graphics Device.
|
||||
/// </summary>
|
||||
/// <returns>The device.</returns>
|
||||
FORCE_INLINE GPUDevice* GetDevice() const
|
||||
{
|
||||
return _device;
|
||||
}
|
||||
GPUTasksManager();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the GPU tasks executor.
|
||||
/// </summary>
|
||||
/// <returns>The tasks executor.</returns>
|
||||
FORCE_INLINE GPUTasksExecutor* GetExecutor() const
|
||||
{
|
||||
return _executor;
|
||||
@@ -60,7 +47,6 @@ public:
|
||||
/// <summary>
|
||||
/// Gets the amount of enqueued tasks to perform.
|
||||
/// </summary>
|
||||
/// <returns>The tasks count.</returns>
|
||||
FORCE_INLINE int32 GetTaskCount() const
|
||||
{
|
||||
return _tasks.Count();
|
||||
@@ -94,8 +80,5 @@ public:
|
||||
|
||||
public:
|
||||
// [Object]
|
||||
String ToString() const override
|
||||
{
|
||||
return TEXT("GPU Tasks Manager");
|
||||
}
|
||||
String ToString() const override;
|
||||
};
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "DynamicBuffer.h"
|
||||
#include "GPUContext.h"
|
||||
#include "PixelFormatExtensions.h"
|
||||
#include "GPUDevice.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Utilities.h"
|
||||
#include "Engine/Core/Math/Math.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
|
||||
DynamicBuffer::DynamicBuffer(uint32 initialCapacity, uint32 stride, const String& name)
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
#include "Graphics.h"
|
||||
#include "Shaders/GPUShader.h"
|
||||
#include "Async/DefaultGPUTasksExecutor.h"
|
||||
#include "Async/GPUTasksManager.h"
|
||||
#include "Engine/Content/Assets/Shader.h"
|
||||
#include "Engine/Content/Assets/Material.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Content/SoftAssetReference.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Render2D/Render2D.h"
|
||||
#include "Engine/Engine/CommandLine.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
@@ -263,6 +265,7 @@ struct GPUDevice::PrivateData
|
||||
AssetReference<Texture> DefaultNormalMap;
|
||||
AssetReference<Texture> DefaultWhiteTexture;
|
||||
AssetReference<Texture> DefaultBlackTexture;
|
||||
GPUTasksManager TasksManager;
|
||||
};
|
||||
|
||||
GPUDevice* GPUDevice::Instance = nullptr;
|
||||
@@ -277,7 +280,6 @@ GPUDevice::GPUDevice(RendererType type, ShaderProfile profile)
|
||||
, _shaderProfile(profile)
|
||||
, _featureLevel(RenderTools::GetFeatureLevel(profile))
|
||||
, _res(New<PrivateData>())
|
||||
, TasksManager(this)
|
||||
, TotalGraphicsMemory(0)
|
||||
, QuadShader(nullptr)
|
||||
, CurrentTask(nullptr)
|
||||
@@ -296,6 +298,7 @@ GPUDevice::~GPUDevice()
|
||||
|
||||
bool GPUDevice::Init()
|
||||
{
|
||||
_res->TasksManager.SetExecutor(CreateTasksExecutor());
|
||||
LOG(Info, "Total graphics memory: {0}", Utilities::BytesToText(TotalGraphicsMemory));
|
||||
return false;
|
||||
}
|
||||
@@ -492,7 +495,7 @@ void GPUDevice::Draw()
|
||||
// Begin frame
|
||||
context->FrameBegin();
|
||||
RenderBegin();
|
||||
TasksManager.FrameBegin();
|
||||
_res->TasksManager.FrameBegin();
|
||||
Render2D::BeginFrame();
|
||||
|
||||
// Perform actual drawing
|
||||
@@ -502,7 +505,7 @@ void GPUDevice::Draw()
|
||||
|
||||
// End frame
|
||||
Render2D::EndFrame();
|
||||
TasksManager.FrameEnd();
|
||||
_res->TasksManager.FrameEnd();
|
||||
RenderEnd();
|
||||
context->FrameEnd();
|
||||
|
||||
@@ -520,6 +523,11 @@ uint64 GPUDevice::GetMemoryUsage() const
|
||||
return Resources.GetMemoryUsage();
|
||||
}
|
||||
|
||||
GPUTasksManager* GPUDevice::GetTasksManager() const
|
||||
{
|
||||
return &_res->TasksManager;
|
||||
}
|
||||
|
||||
MaterialBase* GPUDevice::GetDefaultMaterial() const
|
||||
{
|
||||
return _res->DefaultMaterial;
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "Engine/Platform/Platform.h"
|
||||
#include "Engine/Core/Enums.h"
|
||||
#include "Engine/Core/NonCopyable.h"
|
||||
#include "Engine/Scripting/ScriptingObject.h"
|
||||
#include "Async/GPUTasksManager.h"
|
||||
#include "GPUResourcesCollection.h"
|
||||
#include "GPUAdapter.h"
|
||||
#include "GPULimits.h"
|
||||
@@ -20,7 +21,11 @@ class GPUTexture;
|
||||
class GPUBuffer;
|
||||
class GPUSampler;
|
||||
class GPUPipelineState;
|
||||
class GPUConstantBuffer;
|
||||
class GPUTasksContext;
|
||||
class GPUTasksExecutor;
|
||||
class GPUSwapChain;
|
||||
class GPUTasksManager;
|
||||
class Shader;
|
||||
class Model;
|
||||
class Material;
|
||||
@@ -105,11 +110,6 @@ public:
|
||||
/// </summary>
|
||||
GPUResourcesCollection Resources;
|
||||
|
||||
/// <summary>
|
||||
/// GPU asynchronous work manager.
|
||||
/// </summary>
|
||||
GPUTasksManager TasksManager;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// The total amount of graphics memory in bytes.
|
||||
@@ -220,6 +220,11 @@ public:
|
||||
/// </summary>
|
||||
API_PROPERTY() uint64 GetMemoryUsage() const;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the GPU asynchronous work manager.
|
||||
/// </summary>
|
||||
GPUTasksManager* GetTasksManager() const;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default material.
|
||||
/// </summary>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "GPUDevice.h"
|
||||
#include "Textures/GPUTexture.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Threading/Task.h"
|
||||
|
||||
class GPUSwapChainDownloadTask : public Task
|
||||
{
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "Graphics.h"
|
||||
#include "GPUDevice.h"
|
||||
#include "PixelFormatExtensions.h"
|
||||
#include "Async/GPUTasksManager.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Config/GraphicsSettings.h"
|
||||
#include "Engine/Engine/CommandLine.h"
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
@@ -194,7 +196,7 @@ void GraphicsService::BeforeExit()
|
||||
if (GPUDevice::Instance)
|
||||
{
|
||||
// Start disposing
|
||||
GPUDevice::Instance->TasksManager.Dispose();
|
||||
GPUDevice::Instance->GetTasksManager()->Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
#include "DecalMaterialShader.h"
|
||||
#include "MaterialParams.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/OrientedBoundingBox.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Graphics/RenderBuffers.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "ForwardMaterialShader.h"
|
||||
#include "MaterialShaderFeatures.h"
|
||||
#include "MaterialParams.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPULimits.h"
|
||||
#include "Engine/Graphics/RenderView.h"
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
#include "GUIMaterialShader.h"
|
||||
#include "MaterialParams.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/Viewport.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Graphics/RenderView.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Renderer/RenderList.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/Shaders/GPUConstantBuffer.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Engine/Time.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#if USE_EDITOR
|
||||
#include "Engine/Renderer/Lightmaps.h"
|
||||
#endif
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Level/Scene/Lightmap.h"
|
||||
#include "Engine/Level/Actors/EnvironmentProbe.h"
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "PostFxMaterialShader.h"
|
||||
#include "MaterialParams.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "ModelInstanceEntry.h"
|
||||
#include "Engine/Content/Assets/Material.h"
|
||||
#include "Engine/Content/Assets/Model.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/Transform.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
@@ -11,6 +12,7 @@
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Renderer/RenderList.h"
|
||||
#include "Engine/Serialization/MemoryReadStream.h"
|
||||
#include "Engine/Threading/Task.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#if USE_MONO
|
||||
#include <ThirdParty/mono-2.0/mono/metadata/appdomain.h>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "ModelLOD.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/Transform.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Serialization/MemoryReadStream.h"
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
#include "ModelInstanceEntry.h"
|
||||
#include "Engine/Content/Assets/Material.h"
|
||||
#include "Engine/Content/Assets/SkinnedModel.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Level/Scene/Scene.h"
|
||||
#include "Engine/Renderer/RenderList.h"
|
||||
#include "Engine/Serialization/MemoryReadStream.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Threading/Task.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#if USE_MONO
|
||||
#include <ThirdParty/mono-2.0/mono/metadata/appdomain.h>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "SkinnedMeshDrawData.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Animations/Config.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/Matrix.h"
|
||||
#include "Engine/Core/Math/Matrix3x4.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "SkinnedModelLOD.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Content/Assets/Model.h"
|
||||
#include "Engine/Serialization/MemoryReadStream.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "RenderTargetPool.h"
|
||||
#include "GPUDevice.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
|
||||
struct Entry
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "RenderTask.h"
|
||||
#include "Engine/Content/Assets/Model.h"
|
||||
#include "Engine/Content/Assets/SkinnedModel.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Engine/Time.h"
|
||||
|
||||
const Char* ToString(RendererType value)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "ShaderAssetBase.h"
|
||||
#include "ShaderStorage.h"
|
||||
#include "ShaderCacheManager.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Engine/CommandLine.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "GPUSampler.h"
|
||||
#include "GPUSamplerDescription.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Types/String.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "GPUBufferNull.h"
|
||||
#include "GPUSamplerNull.h"
|
||||
#include "GPUSwapChainNull.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/Async/GPUTasksManager.h"
|
||||
|
||||
GPUDeviceNull::GPUDeviceNull()
|
||||
: GPUDevice(RendererType::Null, ShaderProfile::Unknown)
|
||||
@@ -89,13 +91,13 @@ void GPUDeviceNull::Draw()
|
||||
auto context = GetMainContext();
|
||||
|
||||
RenderBegin();
|
||||
TasksManager.FrameBegin();
|
||||
GetTasksManager()->FrameBegin();
|
||||
context->FrameBegin();
|
||||
|
||||
// don't render anything
|
||||
|
||||
context->FrameEnd();
|
||||
TasksManager.FrameEnd();
|
||||
GetTasksManager()->FrameEnd();
|
||||
RenderEnd();
|
||||
|
||||
DrawEnd();
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "GPUDeviceVulkan.h"
|
||||
#include "RenderToolsVulkan.h"
|
||||
#include "Config.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Collections/ArrayExtensions.h"
|
||||
#include "Engine/Core/Collections/Sorting.h"
|
||||
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
#include "Config.h"
|
||||
#include "CmdBufferVulkan.h"
|
||||
#include "FlaxEngine.Gen.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Utilities.h"
|
||||
#include "Engine/Core/Math/Color32.h"
|
||||
#include "Engine/Core/Collections/ArrayExtensions.h"
|
||||
#include "Engine/Platform/FileSystem.h"
|
||||
#include "Engine/Platform/File.h"
|
||||
#include "Engine/Graphics/Textures/GPUSamplerDescription.h"
|
||||
#include "Engine/Graphics/PixelFormatExtensions.h"
|
||||
#include "Engine/Core/Utilities.h"
|
||||
#include "Engine/Core/Math/Color32.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Engine/Globals.h"
|
||||
#include "Engine/Engine/CommandLine.h"
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
|
||||
#include "GPUPipelineStateVulkan.h"
|
||||
#include "RenderToolsVulkan.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "DescriptorSetVulkan.h"
|
||||
#include "GPUShaderProgramVulkan.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
|
||||
GPUShaderProgramCSVulkan::~GPUShaderProgramCSVulkan()
|
||||
{
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
#include "RenderToolsVulkan.h"
|
||||
#include "CmdBufferVulkan.h"
|
||||
#include "Types.h"
|
||||
#include "Engine/Serialization/MemoryReadStream.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Types/DataContainer.h"
|
||||
#include "Engine/Serialization/MemoryReadStream.h"
|
||||
#include "Engine/Graphics/PixelFormatExtensions.h"
|
||||
|
||||
#if PLATFORM_DESKTOP
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "GPUAdapterVulkan.h"
|
||||
#include "GPUContextVulkan.h"
|
||||
#include "CmdBufferVulkan.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/GPULimits.h"
|
||||
|
||||
void BackBufferVulkan::Setup(GPUSwapChainVulkan* window, VkImage backbuffer, PixelFormat format, VkExtent3D extent)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "GPUBufferVulkan.h"
|
||||
#include "GPUContextVulkan.h"
|
||||
#include "RenderToolsVulkan.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/PixelFormatExtensions.h"
|
||||
#include "Engine/Graphics/Textures/TextureData.h"
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#if USE_EDITOR
|
||||
#include "Editor/Editor.h"
|
||||
#endif
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Level/Scene/Scene.h"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/ContentExporters/AssetExporters.h"
|
||||
#include "Engine/ContentImporters/AssetsImportingManager.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Serialization/Serialization.h"
|
||||
#include "Engine/Level/Scene/Scene.h"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "DirectionalLight.h"
|
||||
#include "Engine/Core/Math/Color.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Renderer/RenderList.h"
|
||||
#include "Engine/Serialization/Serialization.h"
|
||||
#include "Engine/Graphics/RenderView.h"
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
|
||||
#include "SplineModel.h"
|
||||
#include "Spline.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/Matrix3x4.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Serialization/Serialization.h"
|
||||
#include "Engine/Graphics/GPUBufferDescription.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUBuffer.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Graphics/RenderTools.h"
|
||||
#include "Engine/Level/Scene/SceneRendering.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Graphics/GPUBuffer.h"
|
||||
#include "Engine/Graphics/GPUBufferDescription.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Serialization/Serialization.h"
|
||||
|
||||
@@ -34,9 +34,9 @@ public:
|
||||
LocalizedString& operator=(const StringView& value);
|
||||
LocalizedString& operator=(String&& value) noexcept;
|
||||
|
||||
friend bool operator==(const LocalizedString& a, const LocalizedString& b)
|
||||
bool operator==(const LocalizedString& other) const
|
||||
{
|
||||
return a.Id == b.Id && a.Value == b.Value;
|
||||
return Id == other.Id && Value == other.Value;
|
||||
}
|
||||
|
||||
friend bool operator!=(const LocalizedString& a, const LocalizedString& b)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUBuffer.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Graphics/Shaders/GPUConstantBuffer.h"
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "Engine/Graphics/GPUPipelineStatePermutations.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Graphics/DynamicBuffer.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/RenderTools.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Renderer/DrawCall.h"
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
#if COMPILE_WITH_PROFILER
|
||||
|
||||
#include "ProfilerGPU.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUTimerQuery.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
|
||||
RenderStatsData RenderStatsData::Counter;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Graphics/PixelFormat.h"
|
||||
#include "Engine/Graphics/PixelFormatExtensions.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/Async/GPUTask.h"
|
||||
|
||||
REGISTER_BINARY_ASSET(FontTextureAtlas, "FlaxEngine.FontTextureAtlas", true);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Graphics/Shaders/GPUConstantBuffer.h"
|
||||
#include "Engine/Animations/AnimationUtils.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/Half.h"
|
||||
#include "Engine/Core/Math/Math.h"
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Content/Assets/Model.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUPipelineState.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Graphics/Shaders/GPUConstantBuffer.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "Engine/Content/Assets/Material.h"
|
||||
#include "Engine/Level/Actors/Decal.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Graphics/RenderBuffers.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "VertexColors.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUPipelineState.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Graphics/Shaders/GPUConstantBuffer.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Content/Assets/Model.h"
|
||||
#include "Engine/Content/Assets/Shader.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/RenderBuffers.h"
|
||||
#include "Engine/Graphics/RenderTargetPool.h"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Debug/DebugDraw.h"
|
||||
#include "Engine/Engine/Time.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/Graphics.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Core/Config/GraphicsSettings.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Graphics/RenderBuffers.h"
|
||||
#include "Engine/Graphics/RenderTargetPool.h"
|
||||
#include "Engine/Graphics/Async/GPUSyncPoint.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
#include "Engine/Level/Actors/StaticModel.h"
|
||||
#include "Engine/Level/Scene/SceneRendering.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Core/Collections/HashSet.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/Graphics.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
@@ -117,9 +118,9 @@ struct RasterizeChunkKey
|
||||
Hash += RasterizeChunkKeyHashResolution * RasterizeChunkKeyHashResolution * RasterizeChunkKeyHashResolution;
|
||||
}
|
||||
|
||||
friend bool operator==(const RasterizeChunkKey& a, const RasterizeChunkKey& b)
|
||||
bool operator==(const RasterizeChunkKey& other) const
|
||||
{
|
||||
return a.Hash == b.Hash && a.Coord == b.Coord && a.Layer == b.Layer;
|
||||
return Hash == other.Hash && Coord == other.Coord && Layer == other.Layer;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Engine/Graphics/RenderTargetPool.h"
|
||||
#include "Engine/Content/Assets/CubeTexture.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
|
||||
PACK_STRUCT(struct PerLight{
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "ScreenSpaceReflectionsPass.h"
|
||||
#include "Engine/Core/Collections/Sorting.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/RenderBuffers.h"
|
||||
#include "Engine/Graphics/RenderTools.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Engine/Platform/Window.h"
|
||||
#include "Utils/MultiScaler.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
|
||||
#define RESOLVE_PASS_OUTPUT_FORMAT PixelFormat::R16G16B16A16_Float
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "Engine/Graphics/RenderBuffers.h"
|
||||
#include "Engine/Graphics/PixelFormatExtensions.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#if USE_EDITOR
|
||||
#include "Engine/Renderer/Lightmaps.h"
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "BitonicSort.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUBuffer.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPULimits.h"
|
||||
|
||||
#define INDIRECT_ARGS_STRIDE 12
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "MultiScaler.h"
|
||||
#include "Engine/Graphics/Textures/GPUTexture.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
|
||||
PACK_STRUCT(struct Data {
|
||||
Float2 TexelSize;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Engine/Content/Assets/CubeTexture.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
|
||||
// Must match shader source
|
||||
int32 VolumetricFogGridInjectionGroupSize = 4;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/ContentImporters/AssetsImportingManager.h"
|
||||
#include "Engine/ContentImporters/ImportTexture.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/GPUBuffer.h"
|
||||
#include "Engine/Graphics/GPUBufferDescription.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Core/Math/Math.h"
|
||||
#include "Engine/Core/Collections/Sorting.h"
|
||||
#include "Engine/ContentImporters/ImportTexture.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Level/SceneQuery.h"
|
||||
#include "Engine/Level/Scene/Lightmap.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "Builder.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Types/TimeSpan.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#include "Engine/Renderer/Renderer.h"
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
#include "Engine/Level/Scene/Scene.h"
|
||||
#include "Engine/Level/Level.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Types/TimeSpan.h"
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
#include "Engine/Engine/Globals.h"
|
||||
#include "Engine/Threading/ThreadSpawner.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUBuffer.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
#include "Engine/Graphics/GPUPipelineState.h"
|
||||
#include "Engine/Graphics/RenderTargetPool.h"
|
||||
#include "Engine/Graphics/Shaders/GPUShader.h"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
#include "Engine/Content/Assets/MaterialBase.h"
|
||||
#include "Engine/Content/AssetReference.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Renderer/DrawCall.h"
|
||||
|
||||
// Must match structure defined in Terrain.shader
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Engine/Platform/CriticalSection.h"
|
||||
#include "Engine/Platform/ConditionVariable.h"
|
||||
#include "Engine/Graphics/RenderTools.h"
|
||||
#include "Engine/Graphics/Async/GPUTask.h"
|
||||
#include "Engine/Graphics/Textures/TextureUtils.h"
|
||||
#include "Engine/Graphics/Textures/TextureData.h"
|
||||
#include "Engine/Graphics/PixelFormatExtensions.h"
|
||||
|
||||
Reference in New Issue
Block a user