Compatibility changes with macos

This commit is contained in:
Dynamitos
2026-02-22 20:26:25 +01:00
parent 4eacda2ae0
commit 4a66b5d18d
7 changed files with 16 additions and 25 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ endif()
if(APPLE) if(APPLE)
target_link_libraries(Engine PUBLIC metal) target_link_libraries(Engine PUBLIC metal)
SET(CMAKE_OSX_DEPLOYMENT_TARGET 15.0) SET(CMAKE_OSX_DEPLOYMENT_TARGET 26.0)
endif() endif()
if(UNIX) if(UNIX)
target_link_libraries(Engine PUBLIC Threads::Threads) target_link_libraries(Engine PUBLIC Threads::Threads)
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <assert.h> #include <assert.h>
#include <memory_resource> #include <memory_resource>
#include <memory>
namespace Seele { namespace Seele {
template <typename T, typename Allocator = std::pmr::polymorphic_allocator<T>> class List { template <typename T, typename Allocator = std::pmr::polymorphic_allocator<T>> class List {
+1
View File
@@ -1,6 +1,7 @@
#pragma once #pragma once
#include <memory_resource> #include <memory_resource>
#include <map> #include <map>
#include <string>
#include "MinimalEngine.h" #include "MinimalEngine.h"
namespace Seele { namespace Seele {
+5 -7
View File
@@ -1,4 +1,9 @@
#add_subdirectory(CBT/) #add_subdirectory(CBT/)
add_subdirectory(RenderPass/)
if(APPLE)
# add_subdirectory(Metal/)
endif()
add_subdirectory(Vulkan/)
target_sources(Engine target_sources(Engine
PRIVATE PRIVATE
@@ -65,10 +70,3 @@ target_sources(Engine
Texture.h Texture.h
VertexData.h VertexData.h
Window.h) Window.h)
add_subdirectory(RenderPass/)
if(APPLE)
add_subdirectory(Metal/)
else()
add_subdirectory(Vulkan/)
endif()
+3 -3
View File
@@ -754,11 +754,11 @@ void Graphics::pickPhysicalDevice() {
vkGetPhysicalDeviceProperties2(physicalDevice, &props.get()); vkGetPhysicalDeviceProperties2(physicalDevice, &props.get());
features.get<VkPhysicalDeviceFeatures2>().features = { features.get<VkPhysicalDeviceFeatures2>().features = {
.geometryShader = true, .geometryShader = false,
.sampleRateShading = true, .sampleRateShading = true,
.fillModeNonSolid = true, .fillModeNonSolid = true,
.wideLines = true, .wideLines = false,
.pipelineStatisticsQuery = true, .pipelineStatisticsQuery = false,
.fragmentStoresAndAtomics = true, .fragmentStoresAndAtomics = true,
.shaderInt64 = true, .shaderInt64 = true,
.shaderInt16 = true, .shaderInt16 = true,
+1 -1
View File
@@ -53,7 +53,7 @@ struct StructChain<Helper<This, struct_type>, Right...> : StructChain<Right...>
StructChain() { StructChain() {
std::memset(&t, 0, sizeof(This)); std::memset(&t, 0, sizeof(This));
t.sType = struct_type; t.sType = struct_type;
t.pNext = &StructChain<Right...>::template get(); t.pNext = &StructChain<Right...>::get();
} }
This t; This t;
template <chainable_struct Query> constexpr Query& get() { template <chainable_struct Query> constexpr Query& get() {
+4 -12
View File
@@ -42,14 +42,6 @@ void Seele::beginCompilation(const ShaderCompilationInfo& info, SlangCompileTarg
.intValue0 = SLANG_LINE_DIRECTIVE_MODE_NONE, .intValue0 = SLANG_LINE_DIRECTIVE_MODE_NONE,
}, },
}, },
{
.name = slang::CompilerOptionName::EmitSpirvViaGLSL,
.value =
{
.kind = slang::CompilerOptionValueKind::Int,
.intValue0 = 1,
},
},
{ {
.name = slang::CompilerOptionName::DebugInformation, .name = slang::CompilerOptionName::DebugInformation,
.value = .value =
@@ -76,8 +68,8 @@ void Seele::beginCompilation(const ShaderCompilationInfo& info, SlangCompileTarg
}, },
}; };
sessionDesc.compilerOptionEntries = option.data(); sessionDesc.compilerOptionEntries = 0;//option.data();
sessionDesc.compilerOptionEntryCount = (uint32)option.size(); sessionDesc.compilerOptionEntryCount = 0;//(uint32)option.size();
sessionDesc.defaultMatrixLayoutMode = SLANG_MATRIX_LAYOUT_COLUMN_MAJOR; sessionDesc.defaultMatrixLayoutMode = SLANG_MATRIX_LAYOUT_COLUMN_MAJOR;
Array<slang::PreprocessorMacroDesc> macros; Array<slang::PreprocessorMacroDesc> macros;
for (const auto& [key, val] : info.defines) { for (const auto& [key, val] : info.defines) {
@@ -88,9 +80,9 @@ void Seele::beginCompilation(const ShaderCompilationInfo& info, SlangCompileTarg
} }
sessionDesc.preprocessorMacroCount = macros.size(); sessionDesc.preprocessorMacroCount = macros.size();
sessionDesc.preprocessorMacros = macros.data(); sessionDesc.preprocessorMacros = macros.data();
slang::TargetDesc targetDesc; slang::TargetDesc targetDesc = {};
targetDesc.profile = globalSession->findProfile("spv_1_4");
targetDesc.format = target; targetDesc.format = target;
targetDesc.flags = SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY;
sessionDesc.targetCount = 1; sessionDesc.targetCount = 1;
sessionDesc.targets = &targetDesc; sessionDesc.targets = &targetDesc;
StaticArray<const char*, 6> searchPaths = {"shaders/", "shaders/lib/", "shaders/raytracing/", "shaders/terrain", "shaders/game", "shaders/generated/"}; StaticArray<const char*, 6> searchPaths = {"shaders/", "shaders/lib/", "shaders/raytracing/", "shaders/terrain", "shaders/game", "shaders/generated/"};