EDIT: folder structure refactoring (src/core)

This commit is contained in:
2025-11-27 11:26:57 +09:00
parent a816864c88
commit 2182b02f4a
79 changed files with 291 additions and 277 deletions

View File

@@ -1,15 +1,15 @@
#include "ibl_manager.h"
#include <core/engine_context.h>
#include <core/vk_resource.h>
#include <core/ktx_loader.h>
#include <core/vk_sampler_manager.h>
#include <core/vk_descriptors.h>
#include <core/context.h>
#include <core/device/resource.h>
#include <core/assets/ktx_loader.h>
#include <core/pipeline/sampler.h>
#include <core/descriptor/descriptors.h>
#include <cmath>
#include <algorithm>
#include <ktx.h>
#include <SDL_stdinc.h>
#include "vk_device.h"
#include "core/device/device.h"
bool IBLManager::load(const IBLPaths &paths)
{

View File

@@ -1,6 +1,6 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
#include <string>
class EngineContext;

View File

@@ -1,6 +1,6 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
#include <vector>
// Simple KTX2 helpers focused on IBL assets.

View File

@@ -1,4 +1,4 @@
#include "asset_locator.h"
#include "locator.h"
#include <cstdlib>

View File

@@ -1,17 +1,17 @@
#include "asset_manager.h"
#include "manager.h"
#include <cstdlib>
#include <iostream>
#include <core/vk_engine.h>
#include <core/vk_resource.h>
#include <core/engine.h>
#include <core/device/resource.h>
#include <render/materials.h>
#include <render/primitives.h>
#include <scene/tangent_space.h>
#include <scene/mesh_bvh.h>
#include <stb_image.h>
#include "asset_locator.h"
#include <core/texture_cache.h>
#include "locator.h"
#include <core/assets/texture_cache.h>
#include <fastgltf/parser.hpp>
#include <fastgltf/util.hpp>
#include <fastgltf/tools.hpp>

View File

@@ -10,10 +10,10 @@
#include <utility>
#include <scene/vk_loader.h>
#include <core/vk_types.h>
#include <core/types.h>
#include "materials.h"
#include "asset_locator.h"
#include "render/materials.h"
#include "locator.h"
class VulkanEngine;
class MeshAsset;

View File

@@ -1,15 +1,15 @@
#include "texture_cache.h"
#include <core/engine_context.h>
#include <core/vk_resource.h>
#include <core/vk_descriptors.h>
#include <core/context.h>
#include <core/device/resource.h>
#include <core/descriptor/descriptors.h>
#include <core/config.h>
#include <algorithm>
#include "stb_image.h"
#include <ktx.h>
#include <ktxvulkan.h>
#include <algorithm>
#include "vk_device.h"
#include "core/device/device.h"
#include <cstring>
#include <filesystem>
#include <fstream>

View File

@@ -1,6 +1,6 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
#include <cstdint>
#include <string>
#include <vector>

View File

@@ -1,4 +1,4 @@
#include "engine_context.h"
#include "context.h"
#include "scene/vk_scene.h"
const GPUSceneData &EngineContext::getSceneData() const

View File

@@ -1,8 +1,8 @@
#pragma once
#include <memory>
#include <core/vk_types.h>
#include <core/vk_descriptors.h>
#include <core/types.h>
#include <core/descriptor/descriptors.h>
// Avoid including vk_scene.h here to prevent cycles
struct EngineStats

View File

@@ -1,4 +1,4 @@
#include <core/vk_descriptors.h>
#include <core/descriptor/descriptors.h>
void DescriptorLayoutBuilder::add_binding(uint32_t binding, VkDescriptorType type, uint32_t count)
{

View File

@@ -1,6 +1,6 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
struct DescriptorLayoutBuilder

View File

@@ -1,6 +1,6 @@
#include "vk_descriptor_manager.h"
#include "vk_device.h"
#include "vk_descriptors.h"
#include "manager.h"
#include "core/device/device.h"
#include "descriptors.h"
void DescriptorManager::init(DeviceManager *deviceManager)
{

View File

@@ -1,9 +1,9 @@
#pragma once
#include <core/vk_types.h>
#include <core/vk_descriptors.h>
#include <core/types.h>
#include <core/descriptor/descriptors.h>
#include "vk_device.h"
#include "device/device.h"
class DeviceManager;

View File

@@ -1,4 +1,4 @@
#include "vk_device.h"
#include "device.h"
#include "config.h"
#include "SDL2/SDL.h"
#include "SDL2/SDL_vulkan.h"

View File

@@ -1,5 +1,5 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
#include "VkBootstrap.h"

View File

@@ -1,11 +1,11 @@
#include <core/vk_images.h>
#include <core/vk_initializers.h>
#include <core/device/images.h>
#include <core/util/initializers.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
//> transition
#include <core/vk_initializers.h>
#include <core/util/initializers.h>
void vkutil::transition_image(VkCommandBuffer cmd, VkImage image, VkImageLayout currentLayout, VkImageLayout newLayout)
{

View File

@@ -1,5 +1,5 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
namespace vkutil {

View File

@@ -1,14 +1,14 @@
#include "vk_resource.h"
#include "vk_device.h"
#include "vk_images.h"
#include "vk_initializers.h"
#include "resource.h"
#include "device.h"
#include "images.h"
#include "core/util/initializers.h"
#include "vk_mem_alloc.h"
#include <render/graph/graph.h>
#include <render/graph/builder.h>
#include <render/graph/resources.h>
#include "frame_resources.h"
#include "core/frame/resources.h"
#include <memory>
#include <string>

View File

@@ -1,5 +1,5 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
#include <functional>
#include <vector>

View File

@@ -1,11 +1,11 @@
#include "vk_swapchain.h"
#include "swapchain.h"
#include <SDL_video.h>
#include "SDL2/SDL_vulkan.h"
#include "vk_device.h"
#include "vk_initializers.h"
#include "vk_resource.h"
#include "device.h"
#include "core/util/initializers.h"
#include "resource.h"
// Swapchain + per-frame targets (HDR draw, depth, GBuffer) management.
//

View File

@@ -1,6 +1,6 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
class ResourceManager;
class DeviceManager;

View File

@@ -13,12 +13,12 @@
// - docs/RayTracing.md
//
//> includes
#include "vk_engine.h"
#include "engine.h"
#include "SDL2/SDL.h"
#include <core/vk_initializers.h>
#include <core/vk_types.h>
#include <core/util/initializers.h>
#include <core/types.h>
#include "VkBootstrap.h"
@@ -43,11 +43,11 @@
#include "render/passes/transparent.h"
#include "render/passes/tonemap.h"
#include "render/passes/shadow.h"
#include "vk_resource.h"
#include "engine_context.h"
#include "core/vk_pipeline_manager.h"
#include "core/texture_cache.h"
#include "core/ibl_manager.h"
#include "device/resource.h"
#include "context.h"
#include "core/pipeline/manager.h"
#include "core/assets/texture_cache.h"
#include "core/assets/ibl_manager.h"
// ImGui debug UI (tabs, inspectors, etc.) is implemented in core/vk_engine_ui.cpp.
void vk_engine_draw_debug_ui(VulkanEngine *eng);

View File

@@ -3,36 +3,36 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
#include <vector>
#include <string>
#include <unordered_map>
#include "vk_mem_alloc.h"
#include <deque>
#include <functional>
#include "vk_descriptors.h"
#include "descriptor/descriptors.h"
#include "scene/vk_loader.h"
#include "compute/vk_compute.h"
#include <scene/camera.h>
#include "vk_device.h"
#include "device/device.h"
#include "render/renderpass.h"
#include "render/passes/background.h"
#include "vk_resource.h"
#include "vk_swapchain.h"
#include "device/resource.h"
#include "device/swapchain.h"
#include "scene/vk_scene.h"
#include "render/materials.h"
#include "frame_resources.h"
#include "vk_descriptor_manager.h"
#include "vk_sampler_manager.h"
#include "core/engine_context.h"
#include "core/vk_pipeline_manager.h"
#include "core/asset_manager.h"
#include "frame/resources.h"
#include "descriptor/manager.h"
#include "pipeline/sampler.h"
#include "core/context.h"
#include "core/pipeline/manager.h"
#include "core/assets/manager.h"
#include "render/graph/graph.h"
#include "core/vk_raytracing.h"
#include "core/texture_cache.h"
#include "core/ibl_manager.h"
#include "core/raytracing/raytracing.h"
#include "core/assets/texture_cache.h"
#include "core/assets/ibl_manager.h"
// Number of frames-in-flight. Affects per-frame command buffers, fences,
// semaphores, and transient descriptor pools in FrameResources.

View File

@@ -4,7 +4,7 @@
// statistics, render-graph inspection, texture streaming controls, etc.
// The main frame loop in vk_engine.cpp simply calls vk_engine_draw_debug_ui().
#include "vk_engine.h"
#include "engine.h"
#include "imgui.h"
#include "ImGuizmo.h"
@@ -16,11 +16,11 @@
#include <glm/gtx/euler_angles.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include "render/graph/graph.h"
#include "core/vk_pipeline_manager.h"
#include "core/texture_cache.h"
#include "core/ibl_manager.h"
#include "engine_context.h"
#include <vk_types.h>
#include "core/pipeline/manager.h"
#include "core/assets/texture_cache.h"
#include "core/assets/ibl_manager.h"
#include "context.h"
#include <core/types.h>
#include "mesh_bvh.h"

View File

@@ -1,9 +1,9 @@
#include "frame_resources.h"
#include "resources.h"
#include <span>
#include "vk_descriptors.h"
#include "vk_device.h"
#include "vk_initializers.h"
#include "vk_types.h"
#include "core/descriptor/descriptors.h"
#include "core/device/device.h"
#include "core/util/initializers.h"
#include "core/types.h"
void FrameResources::init(DeviceManager *deviceManager,
std::span<DescriptorAllocatorGrowable::PoolSizeRatio> framePoolSizes)

View File

@@ -1,7 +1,7 @@
#pragma once
#include <core/vk_types.h>
#include <core/vk_descriptors.h>
#include <core/types.h>
#include <core/descriptor/descriptors.h>
class DeviceManager;

View File

@@ -1,10 +1,10 @@
#include <core/vk_pipeline_manager.h>
#include <core/pipeline/manager.h>
#include <core/engine_context.h>
#include <core/vk_initializers.h>
#include <core/context.h>
#include <core/util/initializers.h>
#include <render/pipelines.h>
#include <vk_device.h>
#include <core/device/device.h>
#include <filesystem>

View File

@@ -1,6 +1,6 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
#include <render/pipelines.h>
#include <compute/vk_compute.h>

View File

@@ -1,5 +1,5 @@
#include "vk_sampler_manager.h"
#include "vk_device.h"
#include "sampler.h"
#include "core/device/device.h"
void SamplerManager::init(DeviceManager *deviceManager)
{

View File

@@ -1,6 +1,6 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
class DeviceManager;

View File

@@ -1,7 +1,7 @@
#include "vk_raytracing.h"
#include "vk_device.h"
#include "vk_resource.h"
#include "vk_initializers.h"
#include "raytracing.h"
#include "core/device/device.h"
#include "core/device/resource.h"
#include "core/util/initializers.h"
#include "scene/vk_loader.h"
#include "scene/vk_scene.h"
#include <cstring>

View File

@@ -1,5 +1,5 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
#include <unordered_map>
#include <vector>
#include <memory>

View File

@@ -1,4 +1,4 @@
#include <core/vk_debug.h>
#include <core/util/debug.h>
#include <cstring>

View File

@@ -1,6 +1,6 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
namespace vkdebug
{

View File

@@ -1,4 +1,4 @@
#include <core/vk_initializers.h>
#include <core/util/initializers.h>
//> init_cmd
VkCommandPoolCreateInfo vkinit::command_pool_create_info(uint32_t queueFamilyIndex,

View File

@@ -3,7 +3,7 @@
#pragma once
#include <core/vk_types.h>
#include <core/types.h>
namespace vkinit
{