mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Fix includes in source/renderer
Make include-what-you-use happy with files in source/renderer and fix what needs to be fixed. Ref: #8086 Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
27f7216be7
commit
f9e1e742bf
62 changed files with 326 additions and 184 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,6 +18,8 @@
|
|||
#ifndef INCLUDED_CLOGGER
|
||||
#define INCLUDED_CLOGGER
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
|
||||
#include <deque>
|
||||
#include <fmt/printf.h>
|
||||
#include <fstream>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class CStrInternInternals;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
#ifndef INCLUDED_VIDEOMODE
|
||||
#define INCLUDED_VIDEOMODE
|
||||
|
||||
#include "graphics/Camera.h"
|
||||
#include "ps/CStrForward.h"
|
||||
#include "renderer/backend/Backend.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -41,9 +41,6 @@
|
|||
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <utility>
|
||||
|
||||
void CDebugRenderer::Initialize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "lib/allocators/DynamicArena.h"
|
||||
#include "lib/allocators/STLAllocators.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/types.h"
|
||||
#include "maths/Matrix3D.h"
|
||||
#include "ps/CLogger.h"
|
||||
|
|
@ -55,7 +56,6 @@
|
|||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <sys/types.h>
|
||||
#include <utility>
|
||||
|
||||
// TODO: Currently each decal is a separate CDecalRData. We might want to use
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
struct IModelDef : public CModelDefRPrivate
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include "maths/Vector3D.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
||||
MikkTSpace::MikkTSpace(const CModelDefPtr& m, std::vector<float>& v, bool gpuSkinning) : m_Model(m),
|
||||
m_NewVertices(v), m_GpuSkinning(gpuSkinning)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@
|
|||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <new>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@
|
|||
#include "renderer/backend/IDeviceCommandContext.h"
|
||||
#include "renderer/backend/IShaderProgram.h"
|
||||
#include "renderer/backend/PipelineState.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
|
|
@ -61,7 +60,6 @@
|
|||
#include <cstdint>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@
|
|||
#include "ps/CStrInternStatic.h"
|
||||
#include "ps/Game.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "ps/VideoMode.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "renderer/AlphaMapCalculator.h"
|
||||
#include "renderer/BlendShapes.h"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "graphics/Patch.h"
|
||||
#include "graphics/RenderableObject.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/types.h"
|
||||
#include "maths/BoundingBoxAligned.h"
|
||||
#include "maths/Vector2D.h"
|
||||
|
|
@ -28,7 +29,6 @@
|
|||
#include "renderer/VertexBufferManager.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <sys/types.h>
|
||||
#include <vector>
|
||||
|
||||
class CShaderDefines;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include "graphics/Color.h"
|
||||
#include "graphics/FontManager.h"
|
||||
#include "graphics/GameView.h"
|
||||
#include "graphics/HeightMipmap.h"
|
||||
#include "graphics/ModelDef.h"
|
||||
#include "graphics/ShaderManager.h"
|
||||
#include "graphics/TerrainTextureManager.h"
|
||||
|
|
@ -37,10 +36,10 @@
|
|||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/hash.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/secure_crt.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/tex/tex.h"
|
||||
|
|
@ -78,7 +77,6 @@
|
|||
#include "tools/atlas/GameInterface/View.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#ifndef INCLUDED_RENDERER
|
||||
#define INCLUDED_RENDERER
|
||||
|
||||
#include "graphics/Camera.h"
|
||||
#include "ps/Singleton.h"
|
||||
#include "renderer/RenderingOptions.h"
|
||||
|
||||
|
|
@ -39,8 +38,6 @@ namespace Renderer::Backend { class IDeviceCommandContext; }
|
|||
namespace Renderer::Backend { class IVertexInputLayout; }
|
||||
namespace Renderer::Backend { struct SVertexAttributeFormat; }
|
||||
|
||||
#define g_Renderer CRenderer::GetSingleton()
|
||||
|
||||
/**
|
||||
* Higher level interface on top of the whole frame rendering. It does know
|
||||
* what should be rendered and via which renderer but shouldn't know how to
|
||||
|
|
@ -185,4 +182,6 @@ protected:
|
|||
ScreenShotType m_ScreenShotType = ScreenShotType::NONE;
|
||||
};
|
||||
|
||||
#define g_Renderer CRenderer::GetSingleton()
|
||||
|
||||
#endif // INCLUDED_RENDERER
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "maths/Frustum.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "maths/Matrix3D.h"
|
||||
#include "maths/Plane.h"
|
||||
#include "maths/Vector3D.h"
|
||||
#include "maths/Vector4D.h"
|
||||
#include "ps/CStrIntern.h"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "graphics/ShaderManager.h"
|
||||
#include "graphics/ShaderTechnique.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/types.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "maths/Matrix3D.h"
|
||||
|
|
@ -52,8 +53,6 @@
|
|||
#include <cstdint>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <sys/types.h>
|
||||
|
||||
extern int g_xres, g_yres;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "SkyManager.h"
|
||||
|
||||
#include "graphics/Camera.h"
|
||||
#include "graphics/HeightMipmap.h"
|
||||
#include "graphics/LightEnv.h"
|
||||
#include "graphics/ShaderManager.h"
|
||||
#include "graphics/ShaderTechnique.h"
|
||||
|
|
@ -30,6 +29,7 @@
|
|||
#include "lib/code_generation.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/tex/tex.h"
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@
|
|||
|
||||
#include "graphics/ShaderTechniquePtr.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <sys/types.h>
|
||||
|
||||
class CSimContext;
|
||||
class CTerrain;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
/* Note: this implementation uses CVertexBufferManager directly rather than access it through the nicer VertexArray interface,
|
||||
* because it allows you to work with variable amounts of vertices and indices more easily. New code should prefer
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#define INCLUDED_VERTEXARRAY
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/types.h"
|
||||
#include "renderer/VertexBuffer.h"
|
||||
#include "renderer/VertexBufferManager.h"
|
||||
|
|
@ -27,7 +28,6 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <sys/types.h>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer::Backend { class IDeviceCommandContext; }
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "lib/bits.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/secure_crt.h"
|
||||
#include "maths/BoundingBoxAligned.h"
|
||||
#include "maths/Frustum.h"
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "graphics/Color.h"
|
||||
#include "graphics/Texture.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/types.h"
|
||||
#include "maths/Matrix3D.h"
|
||||
#include "renderer/VertexBufferManager.h"
|
||||
|
|
@ -31,7 +32,6 @@
|
|||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <sys/types.h>
|
||||
#include <vector>
|
||||
|
||||
class CFrustum;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_DUMMY_DEVICE
|
||||
#define INCLUDED_RENDERER_BACKEND_DUMMY_DEVICE
|
||||
|
||||
#include "ps/CStr.h"
|
||||
#include "renderer/backend/Backend.h"
|
||||
#include "renderer/backend/IBuffer.h"
|
||||
#include "renderer/backend/IDevice.h"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,8 @@
|
|||
|
||||
#include "DeviceCommandContext.h"
|
||||
|
||||
#include "renderer/backend/dummy/Buffer.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "renderer/backend/dummy/Device.h"
|
||||
#include "renderer/backend/dummy/Framebuffer.h"
|
||||
#include "renderer/backend/dummy/ShaderProgram.h"
|
||||
#include "renderer/backend/dummy/Texture.h"
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,19 +19,43 @@
|
|||
|
||||
#include "Device.h"
|
||||
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/code_generation.h"
|
||||
#include "lib/config2.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "lib/hash.h"
|
||||
#include "lib/ogl.h"
|
||||
#include "lib/secure_crt.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/gl/Buffer.h"
|
||||
#include "renderer/backend/gl/DeviceCommandContext.h"
|
||||
#include "renderer/backend/gl/DeviceForward.h"
|
||||
#include "renderer/backend/gl/Framebuffer.h"
|
||||
#include "renderer/backend/gl/PipelineState.h"
|
||||
#include "renderer/backend/gl/ShaderProgram.h"
|
||||
#include "renderer/backend/gl/Texture.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <SDL_error.h>
|
||||
#include <SDL_version.h>
|
||||
#include <SDL_video.h>
|
||||
#include <algorithm>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/constants.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <climits>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
#if OS_WIN
|
||||
// We can't include wutil directly because GL headers conflict with Windows
|
||||
|
|
@ -39,18 +63,13 @@
|
|||
extern void* wutil_GetAppHDC();
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
|
||||
#if !CONFIG2_GLES && (defined(SDL_VIDEO_DRIVER_X11) || defined(SDL_VIDEO_DRIVER_WAYLAND))
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||
#include <X11/Xlib.h>
|
||||
#include <glad/glx.h>
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
|
||||
#include <glad/egl.h>
|
||||
#endif
|
||||
|
||||
#include <SDL_syswm.h>
|
||||
|
||||
#endif // !CONFIG2_GLES && (defined(SDL_VIDEO_DRIVER_X11) || defined(SDL_VIDEO_DRIVER_WAYLAND))
|
||||
|
|
|
|||
|
|
@ -18,23 +18,27 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_GL_DEVICE
|
||||
#define INCLUDED_RENDERER_BACKEND_GL_DEVICE
|
||||
|
||||
#include "lib/ogl.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "renderer/backend/Backend.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/gl/Buffer.h"
|
||||
#include "renderer/backend/gl/DeviceForward.h"
|
||||
#include "renderer/backend/gl/Framebuffer.h"
|
||||
#include "renderer/backend/gl/ShaderProgram.h"
|
||||
#include "renderer/backend/gl/Texture.h"
|
||||
#include "renderer/backend/IBuffer.h"
|
||||
#include "renderer/backend/IDevice.h"
|
||||
#include "scriptinterface/ScriptForward.h"
|
||||
#include "renderer/backend/IFramebuffer.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/gl/DeviceForward.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer::Backend::GL { class CDeviceCommandContext; }
|
||||
namespace Renderer::Backend::GL { class CFramebuffer; }
|
||||
|
||||
typedef struct SDL_Window SDL_Window;
|
||||
typedef void* SDL_GLContext;
|
||||
|
||||
|
|
@ -47,8 +51,6 @@ namespace Backend
|
|||
namespace GL
|
||||
{
|
||||
|
||||
class CDeviceCommandContext;
|
||||
|
||||
class CDevice final : public IDevice
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -19,15 +19,17 @@
|
|||
|
||||
#include "DeviceCommandContext.h"
|
||||
|
||||
#include "lib/config2.h"
|
||||
#include "lib/debug.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "renderer/backend/Barrier.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/IDeviceObject.h"
|
||||
#include "renderer/backend/IFramebuffer.h"
|
||||
#include "renderer/backend/IShaderProgram.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/PipelineState.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "renderer/backend/gl/Buffer.h"
|
||||
#include "renderer/backend/gl/Device.h"
|
||||
#include "renderer/backend/gl/Framebuffer.h"
|
||||
|
|
@ -39,6 +41,7 @@
|
|||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,31 +19,41 @@
|
|||
|
||||
#include "ShaderProgram.h"
|
||||
|
||||
#include "graphics/Color.h"
|
||||
#include "graphics/PreprocessorWrapper.h"
|
||||
#include "graphics/ShaderManager.h"
|
||||
#include "graphics/TextureManager.h"
|
||||
#include "graphics/ShaderDefines.h"
|
||||
#include "lib/config2.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/types.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "ps/CStrIntern.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "ps/Profiler2.h"
|
||||
#include "ps/XMB/XMBData.h"
|
||||
#include "ps/XMB/XMBStorage.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "renderer/backend/IBuffer.h"
|
||||
#include "renderer/backend/PipelineState.h"
|
||||
#include "renderer/backend/gl/Buffer.h"
|
||||
#include "renderer/backend/gl/Device.h"
|
||||
#include "renderer/backend/gl/DeviceCommandContext.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#define USE_SHADER_XML_VALIDATION 1
|
||||
|
||||
#if USE_SHADER_XML_VALIDATION
|
||||
#include "ps/XML/RelaxNG.h"
|
||||
#include "ps/XML/XMLWriter.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -18,22 +18,21 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_GL_SHADERPROGRAM
|
||||
#define INCLUDED_RENDERER_BACKEND_GL_SHADERPROGRAM
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/ogl.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/gl/Texture.h"
|
||||
#include "renderer/backend/IShaderProgram.h"
|
||||
|
||||
#include <map>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
struct CColor;
|
||||
class CMatrix3D;
|
||||
class CVector3D;
|
||||
class CShaderDefines;
|
||||
class CStrIntern;
|
||||
namespace Renderer::Backend::GL { class CDevice; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
@ -44,8 +43,6 @@ namespace Backend
|
|||
namespace GL
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
|
||||
class CVertexInputLayout : public IVertexInputLayout
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -22,9 +22,12 @@
|
|||
#include "renderer/backend/vulkan/DeviceObjectUID.h"
|
||||
#include "renderer/backend/vulkan/VMA.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Renderer::Backend::Vulkan { class CDevice; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
@ -34,8 +37,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
|
||||
class CBuffer final : public IBuffer
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -20,9 +20,15 @@
|
|||
#include "DescriptorManager.h"
|
||||
|
||||
#include "lib/hash.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/IBuffer.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "renderer/backend/vulkan/Buffer.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/Mapping.h"
|
||||
#include "renderer/backend/vulkan/DeviceSelection.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,20 +18,26 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_DESCRIPTORMANAGER
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_DESCRIPTORMANAGER
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "ps/CStrIntern.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "renderer/backend/vulkan/Buffer.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/DeviceObjectUID.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer::Backend { class ITexture; }
|
||||
namespace Renderer::Backend::Vulkan { class CBuffer; }
|
||||
namespace Renderer::Backend::Vulkan { class CTexture; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
@ -41,8 +47,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
|
||||
class CDescriptorManager
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -19,13 +19,15 @@
|
|||
|
||||
#include "Device.h"
|
||||
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "lib/hash.h"
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/vulkan/Buffer.h"
|
||||
#include "renderer/backend/vulkan/DescriptorManager.h"
|
||||
#include "renderer/backend/vulkan/DeviceCommandContext.h"
|
||||
|
|
@ -41,18 +43,22 @@
|
|||
#include "renderer/backend/vulkan/SwapChain.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <SDL_version.h>
|
||||
#include <SDL_video.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <iterator>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/Value.h>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include <vk_platform.h>
|
||||
|
||||
// According to https://wiki.libsdl.org/SDL_Vulkan_LoadLibrary the following
|
||||
// functionality is supported since SDL 2.0.6.
|
||||
|
|
|
|||
|
|
@ -18,23 +18,37 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_DEVICE
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_DEVICE
|
||||
|
||||
#include "ps/CStr.h"
|
||||
#include "renderer/backend/Backend.h"
|
||||
#include "renderer/backend/IBuffer.h"
|
||||
#include "renderer/backend/IDevice.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/vulkan/DeviceForward.h"
|
||||
#include "renderer/backend/vulkan/DeviceObjectUID.h"
|
||||
#include "renderer/backend/vulkan/DeviceSelection.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/VMA.h"
|
||||
#include "scriptinterface/ScriptForward.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer::Backend { enum class Format; }
|
||||
namespace Renderer::Backend::Vulkan { class CBuffer; }
|
||||
namespace Renderer::Backend::Vulkan { class CDescriptorManager; }
|
||||
namespace Renderer::Backend::Vulkan { class CRenderPassManager; }
|
||||
namespace Renderer::Backend::Vulkan { class CRingCommandContext; }
|
||||
namespace Renderer::Backend::Vulkan { class CSamplerManager; }
|
||||
namespace Renderer::Backend::Vulkan { class CSubmitScheduler; }
|
||||
namespace Renderer::Backend::Vulkan { class CSwapChain; }
|
||||
namespace Renderer::Backend::Vulkan { class CTexture; }
|
||||
|
||||
typedef struct SDL_Window SDL_Window;
|
||||
|
||||
namespace Renderer
|
||||
|
|
@ -48,16 +62,6 @@ namespace Vulkan
|
|||
|
||||
static constexpr size_t NUMBER_OF_FRAMES_IN_FLIGHT = 3;
|
||||
|
||||
class CBuffer;
|
||||
class CDescriptorManager;
|
||||
class CFramebuffer;
|
||||
class CRenderPassManager;
|
||||
class CRingCommandContext;
|
||||
class CSamplerManager;
|
||||
class CSubmitScheduler;
|
||||
class CSwapChain;
|
||||
class CTexture;
|
||||
|
||||
class CDevice final : public IDevice
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -19,15 +19,25 @@
|
|||
|
||||
#include "DeviceCommandContext.h"
|
||||
|
||||
#include "graphics/Color.h"
|
||||
#include "lib/bits.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/IBuffer.h"
|
||||
#include "renderer/backend/IFramebuffer.h"
|
||||
#include "renderer/backend/IShaderProgram.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/PipelineState.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "renderer/backend/vulkan/Buffer.h"
|
||||
#include "renderer/backend/vulkan/DescriptorManager.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/DeviceSelection.h"
|
||||
#include "renderer/backend/vulkan/Framebuffer.h"
|
||||
#include "renderer/backend/vulkan/Mapping.h"
|
||||
#include "renderer/backend/vulkan/PipelineState.h"
|
||||
|
|
@ -38,7 +48,10 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -19,16 +19,16 @@
|
|||
|
||||
#include "DeviceSelection.h"
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/config2.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
#include "scriptinterface/JSON.h"
|
||||
#include "scriptinterface/Object.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRequest.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <js/PropertyAndElement.h>
|
||||
#include <js/RootingAPI.h>
|
||||
#include <js/Value.h>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,12 +18,16 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_DEVICESELECTION
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_DEVICESELECTION
|
||||
|
||||
#include "scriptinterface/ScriptForward.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <js/TypeDecls.h>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class ScriptRequest;
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -19,8 +19,10 @@
|
|||
|
||||
#include "Framebuffer.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/Mapping.h"
|
||||
#include "renderer/backend/vulkan/RenderPassManager.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,13 +18,18 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_FRAMEBUFFER
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_FRAMEBUFFER
|
||||
|
||||
#include "graphics/Color.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "renderer/backend/IFramebuffer.h"
|
||||
#include "renderer/backend/vulkan/DeviceObjectUID.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Renderer::Backend::Vulkan { class CDevice; }
|
||||
namespace Renderer::Backend::Vulkan { class CTexture; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
@ -34,9 +39,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
class CTexture;
|
||||
|
||||
class CFramebuffer final : public IFramebuffer
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -19,9 +19,13 @@
|
|||
|
||||
#include "Mapping.h"
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/config2.h"
|
||||
#include "lib/debug.h"
|
||||
#include "renderer/backend/Barrier.h"
|
||||
#include "renderer/backend/CompareOp.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/IFramebuffer.h"
|
||||
#include "renderer/backend/PipelineState.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,14 +18,20 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_MAPPING
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_MAPPING
|
||||
|
||||
#include "renderer/backend/Barrier.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/IFramebuffer.h"
|
||||
#include "renderer/backend/PipelineState.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
|
||||
namespace Renderer::Backend { enum class AttachmentLoadOp; }
|
||||
namespace Renderer::Backend { enum class AttachmentStoreOp; }
|
||||
namespace Renderer::Backend { enum class BlendFactor; }
|
||||
namespace Renderer::Backend { enum class BlendOp; }
|
||||
namespace Renderer::Backend { enum class CompareOp; }
|
||||
namespace Renderer::Backend { enum class CullMode; }
|
||||
namespace Renderer::Backend { enum class Format; }
|
||||
namespace Renderer::Backend { enum class PolygonMode; }
|
||||
namespace Renderer::Backend { enum class StencilOp; }
|
||||
namespace Renderer::Backend::Sampler { enum class AddressMode; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -19,16 +19,24 @@
|
|||
|
||||
#include "PipelineState.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/hash.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "renderer/backend/IShaderProgram.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/DeviceSelection.h"
|
||||
#include "renderer/backend/vulkan/Framebuffer.h"
|
||||
#include "renderer/backend/vulkan/Mapping.h"
|
||||
#include "renderer/backend/vulkan/ShaderProgram.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,16 +18,19 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_PIPELINESTATE
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_PIPELINESTATE
|
||||
|
||||
#include "graphics/Color.h"
|
||||
#include "renderer/backend/PipelineState.h"
|
||||
#include "renderer/backend/vulkan/Framebuffer.h"
|
||||
#include "renderer/backend/vulkan/ShaderProgram.h"
|
||||
#include "renderer/backend/vulkan/DeviceObjectUID.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace Renderer::Backend::Vulkan { class CDevice; }
|
||||
namespace Renderer::Backend::Vulkan { class CFramebuffer; }
|
||||
namespace Renderer::Backend::Vulkan { class CVertexInputLayout; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
@ -37,9 +40,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
class CFramebuffer;
|
||||
|
||||
class CGraphicsPipelineState final : public IGraphicsPipelineState
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -20,12 +20,17 @@
|
|||
#include "RenderPassManager.h"
|
||||
|
||||
#include "lib/hash.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "renderer/backend/IFramebuffer.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/Mapping.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -18,14 +18,18 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_RENDERPASSMANAGER
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_RENDERPASSMANAGER
|
||||
|
||||
#include "renderer/backend/IFramebuffer.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace Renderer::Backend { enum class AttachmentLoadOp; }
|
||||
namespace Renderer::Backend { enum class AttachmentStoreOp; }
|
||||
namespace Renderer::Backend { struct SColorAttachment; }
|
||||
namespace Renderer::Backend { struct SDepthStencilAttachment; }
|
||||
namespace Renderer::Backend::Vulkan { class CDevice; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
@ -35,8 +39,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
|
||||
/**
|
||||
* A helper class to store unique render passes.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,12 +20,20 @@
|
|||
#include "RingCommandContext.h"
|
||||
|
||||
#include "lib/bits.h"
|
||||
#include "lib/debug.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/IBuffer.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/vulkan/Buffer.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/DeviceSelection.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
|
||||
namespace Renderer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,13 +18,21 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_RINGCOMMANDCONTEXT
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_RINGCOMMANDCONTEXT
|
||||
|
||||
#include "lib/types.h"
|
||||
#include "renderer/backend/vulkan/SubmitScheduler.h"
|
||||
|
||||
#include <glad/vulkan.h>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer::Backend { enum class Format; }
|
||||
namespace Renderer::Backend::Vulkan { class CBuffer; }
|
||||
namespace Renderer::Backend::Vulkan { class CDevice; }
|
||||
namespace Renderer::Backend::Vulkan { class CTexture; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
@ -34,9 +42,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CBuffer;
|
||||
class CDevice;
|
||||
|
||||
/**
|
||||
* A simple helper class to decouple command buffers rotation from frames
|
||||
* presenting. It might be useful when sometimes we need to submit more work
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -20,10 +20,15 @@
|
|||
#include "SamplerManager.h"
|
||||
|
||||
#include "lib/hash.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "renderer/backend/IDevice.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/Mapping.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
#include "renderer/backend/Sampler.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace Renderer
|
||||
|
|
|
|||
|
|
@ -20,21 +20,33 @@
|
|||
#include "ShaderProgram.h"
|
||||
|
||||
#include "graphics/ShaderDefines.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/CStrInternStatic.h"
|
||||
#include "ps/Errors.h"
|
||||
#include "ps/Filesystem.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "ps/XMB/XMBData.h"
|
||||
#include "ps/XMB/XMBStorage.h"
|
||||
#include "ps/XML/Xeromyces.h"
|
||||
#include "ps/containers/StaticVector.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/vulkan/Buffer.h"
|
||||
#include "renderer/backend/vulkan/DescriptorManager.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/DeviceSelection.h"
|
||||
#include "renderer/backend/vulkan/RingCommandContext.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,21 +18,31 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_SHADERPROGRAM
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_SHADERPROGRAM
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/CStrIntern.h"
|
||||
#include "ps/containers/Span.h"
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/IShaderProgram.h"
|
||||
#include "renderer/backend/vulkan/Buffer.h"
|
||||
#include "renderer/backend/vulkan/DescriptorManager.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
class CShaderDefines;
|
||||
class CStr;
|
||||
namespace Renderer::Backend::Vulkan { class CBuffer; }
|
||||
namespace Renderer::Backend::Vulkan { class CDevice; }
|
||||
namespace Renderer::Backend::Vulkan { class CRingCommandContext; }
|
||||
namespace Renderer::Backend::Vulkan { class CTexture; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
@ -43,9 +53,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
class CRingCommandContext;
|
||||
|
||||
class CVertexInputLayout : public IVertexInputLayout
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -19,12 +19,17 @@
|
|||
|
||||
#include "SubmitScheduler.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/RingCommandContext.h"
|
||||
#include "renderer/backend/vulkan/SwapChain.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -20,12 +20,16 @@
|
|||
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace Renderer::Backend::Vulkan { class CRingCommandContext; }
|
||||
namespace Renderer::Backend::Vulkan { class CSwapChain; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
@ -35,10 +39,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
class CRingCommandContext;
|
||||
class CSwapChain;
|
||||
|
||||
/**
|
||||
* A helper class to batch VkQueueSubmit calls and track VkCommandBuffer usages
|
||||
* properly.
|
||||
|
|
|
|||
|
|
@ -19,18 +19,26 @@
|
|||
|
||||
#include "SwapChain.h"
|
||||
|
||||
#include "graphics/Color.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/hash.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/DeviceSelection.h"
|
||||
#include "renderer/backend/vulkan/Framebuffer.h"
|
||||
#include "renderer/backend/vulkan/RingCommandContext.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,11 @@
|
|||
|
||||
#include "Texture.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "renderer/backend/vulkan/Device.h"
|
||||
#include "renderer/backend/vulkan/DeviceSelection.h"
|
||||
#include "renderer/backend/vulkan/Mapping.h"
|
||||
#include "renderer/backend/vulkan/SamplerManager.h"
|
||||
#include "renderer/backend/vulkan/Utilities.h"
|
||||
|
|
|
|||
|
|
@ -18,14 +18,18 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_TEXTURE
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_TEXTURE
|
||||
|
||||
#include "renderer/backend/Format.h"
|
||||
#include "renderer/backend/ITexture.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "renderer/backend/vulkan/DeviceObjectUID.h"
|
||||
#include "renderer/backend/vulkan/VMA.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Renderer::Backend::Sampler { struct Desc; }
|
||||
namespace Renderer::Backend::Vulkan { class CDevice; }
|
||||
|
||||
namespace Renderer
|
||||
{
|
||||
|
||||
|
|
@ -35,8 +39,6 @@ namespace Backend
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
class CDevice;
|
||||
|
||||
class CTexture final : public ITexture
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
#include "Utilities.h"
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/config2.h"
|
||||
#include "renderer/backend/vulkan/Buffer.h"
|
||||
#include "renderer/backend/vulkan/Texture.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_UTILITIES
|
||||
#define INCLUDED_RENDERER_BACKEND_VULKAN_UTILITIES
|
||||
|
||||
#include "ps/CStr.h"
|
||||
#include "lib/debug.h"
|
||||
#include "ps/CLogger.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <glad/vulkan.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -19,11 +19,9 @@
|
|||
#define INCLUDED_RENDERER_BACKEND_VULKAN_VMA
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "lib/sysdep/compiler.h"
|
||||
|
||||
#include <glad/vulkan.h>
|
||||
#include <mutex>
|
||||
|
||||
#define VMA_VULKAN_VERSION 1001000
|
||||
#define VMA_ASSERT(EXPR) ASSERT(EXPR)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "graphics/Overlay.h"
|
||||
#include "graphics/TextureManager.h"
|
||||
#include "maths/Matrix3D.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "renderer/Renderer.h"
|
||||
|
|
|
|||
|
|
@ -23,23 +23,24 @@
|
|||
#include "graphics/Terrain.h"
|
||||
#include "graphics/TextureManager.h"
|
||||
#include "maths/Ease.h"
|
||||
#include "maths/Frustum.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "maths/Matrix3D.h"
|
||||
#include "maths/Vector3D.h"
|
||||
#include "maths/Vector2D.h"
|
||||
#include "maths/Vector3D.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "renderer/Renderer.h"
|
||||
#include "renderer/Scene.h"
|
||||
#include "renderer/backend/Sampler.h"
|
||||
#include "simulation2/MessageTypes.h"
|
||||
#include "simulation2/components/ICmpPosition.h"
|
||||
#include "simulation2/components/ICmpFootprint.h"
|
||||
#include "simulation2/components/ICmpVisual.h"
|
||||
#include "simulation2/components/ICmpTerrain.h"
|
||||
#include "simulation2/components/ICmpOwnership.h"
|
||||
#include "simulation2/components/ICmpPlayer.h"
|
||||
#include "simulation2/components/ICmpPlayerManager.h"
|
||||
#include "simulation2/components/ICmpPosition.h"
|
||||
#include "simulation2/components/ICmpTerrain.h"
|
||||
#include "simulation2/components/ICmpVisual.h"
|
||||
#include "simulation2/components/ICmpWaterManager.h"
|
||||
#include "simulation2/helpers/Render.h"
|
||||
#include "simulation2/system/Component.h"
|
||||
|
|
|
|||
Loading…
Reference in a new issue