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