diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index c4c15c4..3cefb53 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -12,7 +12,8 @@ ], "windowsSdkVersion": "10.0.18362.0", "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe", - "intelliSenseMode": "msvc-x64" + "intelliSenseMode": "msvc-x64", + "configurationProvider": "ms-vscode.cmake-tools" } ], "version": 4 diff --git a/.vscode/settings.json b/.vscode/settings.json index 53ed607..d0c196e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "telemetry.enableTelemetry": false, "cmake.buildDirectory": "${workspaceFolder}/bin/${buildType}", - "git.autofetch": false, + "git.enabled": false, "files.associations": { "*.h": "cpp", "xstring": "cpp", diff --git a/CMakeLists.txt b/CMakeLists.txt index ab273c6..55c90b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,28 +67,28 @@ target_link_libraries(SeeleEngine ${SLANG_LIBRARY}) target_link_libraries(SeeleEngine ${ASSIMP_LIBRARIES}) target_link_libraries(SeeleEngine ${JSON_LIBRARY}) -target_precompile_headers(SeeleEngine - PRIVATE - - - - - - - - - - - - - - ) +#target_precompile_headers(SeeleEngine +# PRIVATE +# +# +# +# +# +# +# +# +# +# +# +# +# +# ) add_subdirectory(src/) if(MSVC) set(_CRT_SECURE_NO_WARNINGS) - target_compile_options(SeeleEngine PRIVATE /DEBUG:FASTLINK /Zi) +# target_compile_options(SeeleEngine PRIVATE /DEBUG:FASTLINK /Zi) else() target_compile_options(SeeleEngine PRIVATE -Wall -Wextra -pedantic) endif() diff --git a/src/Engine/Asset/AssetRegistry.cpp b/src/Engine/Asset/AssetRegistry.cpp index 18a4075..3aecfc2 100644 --- a/src/Engine/Asset/AssetRegistry.cpp +++ b/src/Engine/Asset/AssetRegistry.cpp @@ -7,6 +7,7 @@ #include "Material/Material.h" #include "Graphics/Graphics.h" #include "Graphics/WindowManager.h" +#include using namespace Seele; diff --git a/src/Engine/Asset/MaterialLoader.h b/src/Engine/Asset/MaterialLoader.h index b655947..1bc711c 100644 --- a/src/Engine/Asset/MaterialLoader.h +++ b/src/Engine/Asset/MaterialLoader.h @@ -3,6 +3,7 @@ #include "Containers/List.h" #include #include +#include namespace Seele { diff --git a/src/Engine/Asset/MeshLoader.h b/src/Engine/Asset/MeshLoader.h index 43eba68..485d996 100644 --- a/src/Engine/Asset/MeshLoader.h +++ b/src/Engine/Asset/MeshLoader.h @@ -3,6 +3,7 @@ #include "Containers/List.h" #include #include +#include namespace Seele { diff --git a/src/Engine/Asset/TextureLoader.h b/src/Engine/Asset/TextureLoader.h index 5246977..fcdb15b 100644 --- a/src/Engine/Asset/TextureLoader.h +++ b/src/Engine/Asset/TextureLoader.h @@ -3,6 +3,7 @@ #include "Containers/List.h" #include #include +#include namespace Seele { diff --git a/src/Engine/Graphics/Vulkan/VulkanDescriptorSets.cpp b/src/Engine/Graphics/Vulkan/VulkanDescriptorSets.cpp index d0c2fbd..87c9f6b 100644 --- a/src/Engine/Graphics/Vulkan/VulkanDescriptorSets.cpp +++ b/src/Engine/Graphics/Vulkan/VulkanDescriptorSets.cpp @@ -112,7 +112,7 @@ void DescriptorSet::updateSampler(uint32_t binding, Gfx::PSamplerState samplerSt init::DescriptorImageInfo( vulkanSampler->sampler, VK_NULL_HANDLE, - VK_IMAGE_LAYOUT_BEGIN_RANGE); + VK_IMAGE_LAYOUT_UNDEFINED); imageInfos.add(imageInfo); VkWriteDescriptorSet writeDescriptor = init::WriteDescriptorSet(setHandle, VK_DESCRIPTOR_TYPE_SAMPLER, binding, &imageInfos.back()); @@ -162,7 +162,7 @@ void DescriptorSet::writeChanges() DescriptorAllocator::DescriptorAllocator(PGraphics graphics, DescriptorLayout &layout) : layout(layout), graphics(graphics) { - uint32 perTypeSizes[VK_DESCRIPTOR_TYPE_END_RANGE]; + uint32 perTypeSizes[VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT]; // TODO: FIX ENUM std::memset(perTypeSizes, 0, sizeof(perTypeSizes)); for (uint32 i = 0; i < layout.getBindings().size(); ++i) { @@ -171,7 +171,7 @@ DescriptorAllocator::DescriptorAllocator(PGraphics graphics, DescriptorLayout &l perTypeSizes[typeIndex] += 256; } Array poolSizes; - for (uint32 i = 0; i < VK_DESCRIPTOR_TYPE_END_RANGE; ++i) + for (uint32 i = 0; i < VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; ++i) { if (perTypeSizes[i] > 0) { diff --git a/src/Engine/Graphics/Vulkan/VulkanGraphicsResources.h b/src/Engine/Graphics/Vulkan/VulkanGraphicsResources.h index 1f717ed..6b39768 100644 --- a/src/Engine/Graphics/Vulkan/VulkanGraphicsResources.h +++ b/src/Engine/Graphics/Vulkan/VulkanGraphicsResources.h @@ -1,6 +1,7 @@ #pragma once -#include "Graphics/GraphicsResources.h" #include +#include "Graphics/GraphicsResources.h" +#include namespace Seele { diff --git a/src/Engine/Graphics/Vulkan/VulkanPipelineCache.cpp b/src/Engine/Graphics/Vulkan/VulkanPipelineCache.cpp index 3fed053..31675e9 100644 --- a/src/Engine/Graphics/Vulkan/VulkanPipelineCache.cpp +++ b/src/Engine/Graphics/Vulkan/VulkanPipelineCache.cpp @@ -5,6 +5,7 @@ #include "VulkanRenderPass.h" #include "VulkanDescriptorSets.h" #include "VulkanShader.h" +#include using namespace Seele; using namespace Seele::Vulkan; @@ -230,7 +231,7 @@ PGraphicsPipeline PipelineCache::createPipeline(const GraphicsPipelineCreateInfo std::memcpy(blendState.blendConstants, gfxInfo.colorBlend.blendConstants, sizeof(float)*4); uint32 numDynamicEnabled = 0; - StaticArray dynamicEnabled; + StaticArray dynamicEnabled; dynamicEnabled[numDynamicEnabled++] = VK_DYNAMIC_STATE_VIEWPORT; dynamicEnabled[numDynamicEnabled++] = VK_DYNAMIC_STATE_SCISSOR; diff --git a/src/Engine/Material/Material.cpp b/src/Engine/Material/Material.cpp index 5e95874..1d19694 100644 --- a/src/Engine/Material/Material.cpp +++ b/src/Engine/Material/Material.cpp @@ -3,6 +3,7 @@ #include "Graphics/VertexShaderInput.h" #include #include +#include Gfx::ShaderMap Material::shaderMap; std::mutex Material::shaderMapLock; diff --git a/src/Engine/MinimalEngine.h b/src/Engine/MinimalEngine.h index 59f32c9..70c82f0 100644 --- a/src/Engine/MinimalEngine.h +++ b/src/Engine/MinimalEngine.h @@ -93,7 +93,7 @@ public: inline void removeRef() { refCount--; - if (refCount.load() == 0) + if (refCount == 0) { delete this; } @@ -105,7 +105,7 @@ public: private: T *handle; - std::atomic_uint64_t refCount; + uint64 refCount; }; template