Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes for x64 OSX (not working yet, though) #627

Merged
merged 13 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMake
79 changes: 78 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "user-osx",
"displayName": "Castor3D User OSX Ninja Config",
"description": "Build configuration using Ninja, on OSX, for Castor3D users",
"inherits": "user-base",
"generator": "Ninja",
"cacheVariables": {
"VCPKG_MANIFEST_FEATURES": "assimp;freeimage;glsl;gltf;vkfft;tools",
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "dev-base",
"hidden": true,
Expand All @@ -67,7 +78,6 @@
"CASTOR_BUILDGRP_INTEROP": false,
"CASTOR_BUILDGRP_TEST": true,
"CASTOR_BUILDGRP_TOOL": true,
"CASTOR_DEBUG_TARGETS": true,
"CASTOR_DISABLE_DELAYED_INITIALISATION": true,
"CASTOR_FORCE_VCPKG_SUBMODULES": false,
"CASTOR_GUICOMMON_NEEDS_HLSL": true,
Expand Down Expand Up @@ -157,6 +167,73 @@
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "dev-osx-base",
"hidden": true,
"generator": "Ninja",
"installDir": "${sourceDir}/package/Castor3D",
"cacheVariables": {
"VCPKG_MANIFEST_FEATURES": "assimp;freeimage;glsl;gltf;vkfft;tools",
"CASTOR_BUILD_PLUGINS": true,
"CASTOR_BUILDGRP_DEMO": true,
"CASTOR_BUILDGRP_INTEROP": false,
"CASTOR_BUILDGRP_TEST": false,
"CASTOR_BUILDGRP_TOOL": true,
"CASTOR_FORCE_VCPKG_SUBMODULES": false,
"CASTOR_GUICOMMON_NEEDS_HLSL": true,
"CASTOR_USE_GLSLANG": true,
"CASTOR_USE_MESH_SHADERS": false,
"CASTOR_USE_TASK_SHADERS": false,
"PROJECTS_UNITY_BUILD": false,
"PROJECTS_USE_PRECOMPILED_HEADERS": true
}
},
{
"name": "dev-osx-debug",
"displayName": "Castor3D Developer OSX Config, Debug",
"description": "Build configuration using Ninja, for Castor3D developers, OSX Debug",
"inherits": "dev-osx-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "dev-osx-release",
"displayName": "Castor3D Developer OSX Config, Release",
"description": "Build configuration using Ninja, for Castor3D developers, OSX Release",
"inherits": "dev-osx-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "dev-osx-vcpkg-base",
"inherits": "dev-osx-base",
"hidden": true,
"cacheVariables": {
"PROJECTS_UNITY_BUILD": false,
"VCPKG_MANIFEST_FEATURES": "assimp;freeimage;glsl;gltf;vkfft;tools",
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/external/vcpkg/scripts/buildsystems/vcpkg.cmake"
}
},
{
"name": "dev-osx-vcpkg-debug",
"displayName": "Castor3D Developer OSX Config, using vcpkg, Debug",
"description": "Build configuration using Ninja, for Castor3D developers, OSX Debug",
"inherits": "dev-osx-vcpkg-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "dev-osx-vcpkg-release",
"displayName": "Castor3D Developer OSX Config, using vcpkg, Release",
"description": "Build configuration using Ninja, for Castor3D developers,OSX Release",
"inherits": "dev-osx-vcpkg-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ci-vcpkg-base",
"installDir": "${sourceDir}/package/Castor3D",
Expand Down
4 changes: 2 additions & 2 deletions data/vcpkg/ports/ashes/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DragonJoker/Ashes
REF 96bbc7756b88f58dfc49b4305edad6f1078bbc90
REF 8511d0d68b6f16a45de17222899e24b7fc1cd8b0
HEAD_REF master
SHA512 22d57ef346d2b514e832597f35bfa59d1b21186200b301cba80117c0fd39220b4633fbec583f58e1ea3c6c0ca7d1039c1ac4e1bff36b3b71165196e134c3b5f4
SHA512 cc0ddbc0969d4dc35f5ebca37ab2b1a8d50ecf99e78196c47f5c9badd86e3292280dbf946da8b1b38cddecfd62952d6a730b89ee9c304633e71b9a969e295f48
)

vcpkg_from_github(
Expand Down
2 changes: 1 addition & 1 deletion data/vcpkg/ports/castor3d/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
assimp CASTOR_BUILD_IMPORTER_ASSIMP
freeimage CASTOR_USE_FREEIMAGE
glsl CASTOR_C3D_NEEDS_GLSL
gltf CASTOR_BUILD_IMPORTER_GLTF
vkfft CASTOR_HAS_VKFFT
)

Expand All @@ -34,7 +35,6 @@ vcpkg_cmake_configure(
-DCASTOR_BUILDGRP_INTEROP=OFF
-DCASTOR_BUILDGRP_TEST=OFF
-DCASTOR_BUILDGRP_TOOL=OFF
-DCASTOR_DISABLE_DELAYED_INITIALISATION=ON
-DCASTOR_USE_GLSLANG=ON
-DCASTOR_USE_MESH_SHADERS=OFF
-DCASTOR_USE_TASK_SHADERS=OFF
Expand Down
10 changes: 10 additions & 0 deletions data/vcpkg/ports/castor3d/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"freetype",
"gli",
"meshoptimizer",
"mikktspace",
"minizip",
"rendergraph",
{
Expand All @@ -28,12 +29,14 @@
"name": "vcpkg-cmake-config",
"host": true
},
"vulkan-headers",
"zlib"
],
"default-features": [
"assimp",
"freeimage",
"glsl",
"gltf",
"vkfft"
],
"features": {
Expand All @@ -56,6 +59,13 @@
"spirv-cross"
]
},
"gltf": {
"description": "Use fastgltf library to import glTF scenes.",
"dependencies": [
"fastgltf",
"simdjson"
]
},
"vkfft": {
"description": "Use VkFFT to compute Fast Fourier Transforms (Necessary for FFTOcean plugin).",
"dependencies": [
Expand Down
19 changes: 19 additions & 0 deletions data/vcpkg/ports/draco/install-linkage.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/cmake/draco_install.cmake b/cmake/draco_install.cmake
index 3be1ba1..b91938c 100644
--- a/cmake/draco_install.cmake
+++ b/cmake/draco_install.cmake
@@ -65,10 +65,14 @@ macro(draco_setup_install_target)
ARCHIVE DESTINATION "${libs_path}"
LIBRARY DESTINATION "${libs_path}")
else()
+ if(BUILD_SHARED_LIBS)
+ set_target_properties(draco_static PROPERTIES EXCLUDE_FROM_ALL 1)
+ else()
install(
TARGETS draco_static
EXPORT dracoExport
DESTINATION "${libs_path}")
+ endif()

if(BUILD_SHARED_LIBS)
install(
22 changes: 12 additions & 10 deletions data/vcpkg/ports/draco/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/draco
Expand All @@ -12,24 +10,28 @@ vcpkg_from_github(
fix-pkgconfig.patch
fix-regex.patch
disable-symlinks.patch
install-linkage.diff
)

if(VCPKG_TARGET_IS_EMSCRIPTEN)
set(ENV{EMSCRIPTEN} "${EMSCRIPTEN_ROOT}")
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPYTHON_EXECUTABLE=: # unused with DRACO_JS_GLUE off
-DDRACO_JS_GLUE=OFF
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/${PORT})
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/draco)
vcpkg_fixup_pkgconfig()

# Install tools and plugins
vcpkg_copy_tools(
TOOL_NAMES
draco_encoder
draco_decoder
AUTO_CLEAN
)
if(NOT VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_copy_tools(TOOL_NAMES draco_encoder draco_decoder AUTO_CLEAN)
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")

Expand Down
1 change: 1 addition & 0 deletions data/vcpkg/ports/draco/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "draco",
"version": "1.5.6",
"port-version": 1,
"description": " A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.",
"homepage": "https://github.com/google/draco",
"license": "Apache-2.0",
Expand Down
16 changes: 3 additions & 13 deletions data/vcpkg/ports/fastgltf/fix_uri_escape_spaces.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
diff --git a/src/fastgltf.cpp b/src/fastgltf.cpp
index 9244fe1..f968f59 100644
index 775c9bd..7cd12d0 100644
--- a/src/fastgltf.cpp
+++ b/src/fastgltf.cpp
@@ -1487,7 +1487,8 @@ fg::Error fg::Parser::parseBuffers(simdjson::dom::array& buffers, Asset& asset)
@@ -1733,7 +1733,8 @@ fg::Error fg::Parser::parseBuffers(simdjson::dom::array& buffers, Asset& asset)
// file. Otherwise, data must be specified in the "uri" field.
std::string_view uriString;
if (bufferObject["uri"].get_string().get(uriString) == SUCCESS) {
if (bufferObject["uri"].get_string().get(uriString) == SUCCESS) FASTGLTF_LIKELY {
- URIView uriView(uriString);
+ fg::URI uri(uriString);
+ fg::URIView uriView(uri.string());

if (!uriView.valid()) {
return Error::InvalidURI;
@@ -1821,7 +1822,8 @@ fg::Error fg::Parser::parseImages(simdjson::dom::array& images, Asset& asset) {
return Error::InvalidGltf;
}

- URIView uriView(uriString);
+ fg::URI uri(uriString);
+ fg::URIView uriView(uri.string());
if (!uriView.valid()) {
return Error::InvalidURI;
}
16 changes: 10 additions & 6 deletions data/vcpkg/ports/fastgltf/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO spnda/fastgltf
REF 46f28f1355657c42c9f73bfcdde4ba37d05c2a2f
SHA512 8e26d8d8061a4416d0c2d934a74e8569d3d60db9f01fa7eeae9b251b61e151941c569ea8da70050746e241ca2f0cb4ff14809701f7247f9f31a8538ae28f5c3c
REF "v${VERSION}"
SHA512 66be8e5a05210d023ec5e47dd3aa721b3cf98428bd00e227007cfc97fda35c669b5e8b82254d26c6ce2254297d16fd7a5f6bbbf3da17432df09186091d1ae351
HEAD_REF main
PATCHES find_package.patch
fix_uri_escape_spaces.patch
PATCHES fix_uri_escape_spaces.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS -DFASTGLTF_DOWNLOAD_SIMDJSON=OFF
-DFASTGLTF_ENABLE_DEPRECATED_EXT=ON
OPTIONS -DFASTGLTF_ENABLE_DEPRECATED_EXT=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
vcpkg_copy_pdbs()

file(READ "${CURRENT_PACKAGES_DIR}/share/fastgltf/fastgltfConfig.cmake" contents)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/fastgltf/fastgltfConfig.cmake" "
include(CMakeFindDependencyMacro)
find_dependency(simdjson)
${contents}")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
5 changes: 3 additions & 2 deletions data/vcpkg/ports/fastgltf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "fastgltf",
"version": "0.5.0",
"description": "Blazing fast C++17 glTF 2.0 loader powered by SIMD",
"version": "0.7.0",
"port-version": 1,
"description": "A modern C++17 glTF 2.0 library focused on speed, correctness, and usability",
"homepage": "https://github.com/spnda/fastgltf",
"license": "MIT",
"dependencies": [
Expand Down
4 changes: 2 additions & 2 deletions data/vcpkg/ports/rendergraph/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO DragonJoker/RenderGraph
REF 8fb5f892c9ca495c9e4b9c1161c85e8119866afc
REF b65f85a7260115493065dd475c4f2ebc6a4b15ee
HEAD_REF master
SHA512 c618c57a1012ae3929261ed4bac2e58e721c65f91452435bcf85d1e5a2ea176b76609a5163d03a03bec699b7845f1bc0cc9d5253fe43fbeadf552fb6ed75437a
SHA512 87bfeae31d356c4e63162755f00fa2c695fc9b777e770820b631741ec5b8551e5bf481a51aaf55825b47a0bed6fc6c26ff1389c58ee2dd6366438697d13ed7c2
)

vcpkg_from_github(OUT_SOURCE_PATH CMAKE_SOURCE_PATH
Expand Down
4 changes: 2 additions & 2 deletions data/vcpkg/ports/shaderwriter/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}

vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO DragonJoker/ShaderWriter
REF 4bc7a7cb6578631eccfa9fadc94a227356f27b70
REF fec73e97439f14e5b28975cd621803219495b94f
HEAD_REF development
SHA512 29e9db9021cb965b5760d5bfa866f41d3a47128bc4f7d602468a0697491413920c24ee6944728960f003b6ce89afc164659b489d763aaa118c98063ff0e20341
SHA512 df944a49521dc99ece55edc1acec953bed52dd82055e4cb616ef5c0ca6a459c3f2a35e63200e3b3d01f467327d3edfa18ededb00368c2a1669a7f4d6441969f4
)

vcpkg_from_github(OUT_SOURCE_PATH CMAKE_SOURCE_PATH
Expand Down
12 changes: 0 additions & 12 deletions data/vcpkg/ports/vkfft/portfile.cmake

This file was deleted.

7 changes: 0 additions & 7 deletions data/vcpkg/ports/vkfft/vcpkg.json

This file was deleted.

2 changes: 1 addition & 1 deletion external/ShaderWriter
Submodule ShaderWriter updated 45 files
+1 −0 .gitignore
+2 −2 CMakeLists.txt
+30 −0 CMakePresets.json
+26 −28 README.md
+1 −1 doc/SDW SPIR-V UDL.xml
+1 −1 external/vcpkg
+1 −0 include/GlslCommon/GlslStatementsHelpers.hpp
+3 −0 include/ShaderAST/Expr/CombinedImageAccess.enum
+3 −0 include/ShaderAST/Expr/EnumCombinedImageAccess.hpp
+12 −0 include/ShaderAST/Expr/GetCombinedImageAccessName.hpp
+174 −0 include/ShaderAST/Expr/MakeCombinedImageAccess.hpp
+4 −1 include/ShaderAST/ShaderStlTypes.hpp
+4 −3 include/ShaderWriter/BaseTypes/CombinedImage.inl
+11 −1 include/ShaderWriter/Helpers.hpp
+10 −6 include/VulkanLayer/ProgramPipeline.hpp
+3 −0 include/VulkanLayer/VulkanLayer.hpp
+6 −0 source/CompilerHlsl/HlslCombinedImageAccessConfig.hpp
+3 −0 source/CompilerHlsl/HlslCombinedImageAccessNames.hpp
+186 −4 source/CompilerSpirV/SpirVBlock.cpp
+35 −2 source/CompilerSpirV/SpirVBlock.hpp
+6 −0 source/CompilerSpirV/SpirVCombinedImageAccessConfig.hpp
+3 −0 source/CompilerSpirV/SpirVCombinedImageAccessNames.hpp
+1 −1 source/CompilerSpirV/SpirVFunction.cpp
+1 −1 source/CompilerSpirV/SpirVFunction.hpp
+8 −16 source/CompilerSpirV/SpirVGenerateStatements.cpp
+4 −71 source/CompilerSpirV/SpirVMakeAccessChain.cpp
+19 −143 source/CompilerSpirV/SpirVModule.cpp
+1 −15 source/CompilerSpirV/SpirVModule.hpp
+3 −2 source/CompilerSpirV/SpirVModuleLiterals.cpp
+40 −31 source/CompilerSpirV/SpirVModuleTypes.cpp
+1 −1 source/CompilerSpirV/SpirVModuleTypes.hpp
+6 −4 source/GlslCommon/GenerateGlslStatements.cpp
+5 −0 source/GlslCommon/GlslCombinedImageAccessConfig.hpp
+3 −0 source/GlslCommon/GlslCombinedImageAccessNames.hpp
+3 −0 source/ShaderAST/Expr/ExprCombinedImageAccessCall.cpp
+3 −0 source/ShaderAST/Visitors/SimplifyStatements.cpp
+107 −13 source/VulkanLayer/PipelineBuilder.cpp
+10 −12 source/VulkanLayer/ProgramPipeline.cpp
+5 −0 source/VulkanLayer/ShaderDataPtr.cpp
+6 −0 source/VulkanLayer/VulkanLayer.cpp
+1 −1 test/ShaderWriter/CMakeLists.txt
+4 −1 test/ShaderWriter/TestWriterCombinedImageAccesses.cpp
+480 −825 test/ShaderWriter/TestWriterShader.cpp
+394 −184 test/ShaderWriter/WriterCommon.cpp
+2 −2 vcpkg.json
2 changes: 1 addition & 1 deletion external/vcpkg
Submodule vcpkg updated 658 files
4 changes: 3 additions & 1 deletion include/Core/Castor3D/Castor3DPch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ See LICENSE file in root folder
#include <CastorUtils/Design/ArrayView.hpp>
#include <CastorUtils/Design/BlockGuard.hpp>
#include <CastorUtils/Design/ChangeTracked.hpp>
#include <CastorUtils/Design/DelayedInitialiser.hpp>
#include <CastorUtils/Design/Factory.hpp>
#include <CastorUtils/Design/FlagCombination.hpp>
#include <CastorUtils/Design/GroupChangeTracked.hpp>
Expand Down Expand Up @@ -93,6 +92,7 @@ See LICENSE file in root folder
#include <CastorUtils/Pool/BuddyAllocator.hpp>
#include <CastorUtils/Stream/StreamPrefixManipulators.hpp>

#include <CastorUtils/Config/BeginExternHeaderGuard.hpp>
#include <ShaderAST/Shader.hpp>
#include <ShaderAST/Expr/ExprComma.hpp>

Expand Down Expand Up @@ -199,4 +199,6 @@ See LICENSE file in root folder
#include <utility>
#include <vector>

#include <CastorUtils/Config/EndExternHeaderGuard.hpp>

#endif
Loading
Loading