mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[glslang] update to 13.1.1, opt feature [shaderc] update to 2023.7 (#35219)
This commit is contained in:
parent
2a6371b014
commit
000d1bda1f
56
ports/glslang/cmake.patch
Normal file
56
ports/glslang/cmake.patch
Normal file
@ -0,0 +1,56 @@
|
||||
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
|
||||
index a80e74ed..8a1d8867 100644
|
||||
--- a/SPIRV/CMakeLists.txt
|
||||
+++ b/SPIRV/CMakeLists.txt
|
||||
@@ -99,14 +99,9 @@ if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPT)
|
||||
- target_include_directories(SPIRV
|
||||
- PRIVATE ${spirv-tools_SOURCE_DIR}/include
|
||||
- PRIVATE ${spirv-tools_SOURCE_DIR}/source
|
||||
- )
|
||||
- target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt)
|
||||
+ target_link_libraries(SPIRV PRIVATE MachineIndependent PUBLIC SPIRV-Tools-opt)
|
||||
target_include_directories(SPIRV PUBLIC
|
||||
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
|
||||
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
|
||||
else()
|
||||
target_link_libraries(SPIRV PRIVATE MachineIndependent)
|
||||
endif()
|
||||
diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
|
||||
index ad88442c..5ca185ae 100644
|
||||
--- a/StandAlone/CMakeLists.txt
|
||||
+++ b/StandAlone/CMakeLists.txt
|
||||
@@ -68,14 +68,7 @@ endif()
|
||||
|
||||
target_link_libraries(glslang-standalone ${LIBRARIES})
|
||||
target_include_directories(glslang-standalone PUBLIC
|
||||
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
|
||||
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
|
||||
-
|
||||
-if(ENABLE_OPT)
|
||||
- target_include_directories(glslang-standalone
|
||||
- PRIVATE ${spirv-tools_SOURCE_DIR}/include
|
||||
- )
|
||||
-endif()
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>)
|
||||
|
||||
if(ENABLE_SPVREMAPPER)
|
||||
set(REMAPPER_SOURCES spirv-remap.cpp)
|
||||
diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt
|
||||
index 408a92db..b73e7f15 100644
|
||||
--- a/gtests/CMakeLists.txt
|
||||
+++ b/gtests/CMakeLists.txt
|
||||
@@ -97,8 +97,8 @@ if(BUILD_TESTING)
|
||||
${gtest_SOURCE_DIR}/include)
|
||||
|
||||
if(ENABLE_OPT)
|
||||
- target_include_directories(glslangtests
|
||||
- PRIVATE ${spirv-tools_SOURCE_DIR}/include
|
||||
+ target_link_libraries(glslangtests
|
||||
+ PRIVATE SPIRV-Tools-opt
|
||||
)
|
||||
endif()
|
||||
|
@ -4,12 +4,16 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO KhronosGroup/glslang
|
||||
REF "${VERSION}"
|
||||
SHA512 678df76a6f23b9da93f111fc7e6db57b7f6bf34661b077f9259a0a77d6c023b4d2e3c1cd60b3f9fc15fe69f25cdcb19877e88a50771d3d5275e32574eaefc056
|
||||
SHA512 e16b01925a657750733a2973dc803fc3910a3a169ae276af205de6cb1bf0536fd2dbb63c5fd4fc10f800ba95f71bce673417121ad640cb9c964f291596c80025
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmake.patch # Remove on next version (Upstream PR #3406 and #3420).
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
opt ENABLE_OPT
|
||||
opt ALLOW_EXTERNAL_SPIRV_TOOLS
|
||||
tools ENABLE_GLSLANG_BINARIES
|
||||
rtti ENABLE_RTTI
|
||||
)
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "glslang",
|
||||
"version": "13.0.0",
|
||||
"port-version": 2,
|
||||
"version": "13.1.1",
|
||||
"description": "Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.",
|
||||
"homepage": "https://github.com/KhronosGroup/glslang",
|
||||
"license": "Apache-2.0 AND BSD-3-Clause AND MIT AND GPL-3.0-or-later",
|
||||
@ -16,6 +15,12 @@
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"opt": {
|
||||
"description": "Build with spirv-opt capability",
|
||||
"dependencies": [
|
||||
"spirv-tools"
|
||||
]
|
||||
},
|
||||
"rtti": {
|
||||
"description": "Build with dynamic typeinfo"
|
||||
},
|
||||
|
@ -1 +1 @@
|
||||
"shaderc v2021.1-dev unknown hash, 2021-06-21\n"
|
||||
"shaderc v2023.7 v2023.7\n"
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt
|
||||
index d3bc639..6432a9b 100644
|
||||
index e0eea6c..b54ace4 100644
|
||||
--- a/libshaderc/CMakeLists.txt
|
||||
+++ b/libshaderc/CMakeLists.txt
|
||||
@@ -28,7 +28,9 @@ if (NOT BUILD_SHARED_LIBS)
|
||||
@ -24,13 +24,14 @@ index d3bc639..6432a9b 100644
|
||||
PRIVATE ${glslang_SOURCE_DIR}
|
||||
${SPIRV-Headers_SOURCE_DIR}/include)
|
||||
target_compile_definitions(shaderc_shared
|
||||
@@ -60,9 +64,14 @@ if(SHADERC_ENABLE_INSTALL)
|
||||
@@ -60,10 +64,15 @@ if(SHADERC_ENABLE_INSTALL)
|
||||
${CMAKE_INSTALL_INCLUDEDIR}/shaderc)
|
||||
|
||||
install(TARGETS ${shaderc_install_target} shaderc_util
|
||||
+ EXPORT unofficial-shaderc-targets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+ install(EXPORT unofficial-shaderc-targets
|
||||
+ NAMESPACE unofficial::shaderc::
|
||||
@ -39,7 +40,7 @@ index d3bc639..6432a9b 100644
|
||||
endif(SHADERC_ENABLE_INSTALL)
|
||||
|
||||
find_package(Threads)
|
||||
@@ -79,6 +88,15 @@ else()
|
||||
@@ -80,6 +89,15 @@ else()
|
||||
target_link_libraries(shaderc_shared PRIVATE ${SHADERC_LIBS})
|
||||
endif()
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a4e779b..dc5f1a9 100644
|
||||
index 075641e..b2e92ef 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -121,11 +121,6 @@ if(${SHADERC_ENABLE_EXAMPLES})
|
||||
@@ -129,11 +129,6 @@ if(${SHADERC_ENABLE_EXAMPLES})
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
@ -15,10 +15,10 @@ index a4e779b..dc5f1a9 100644
|
||||
function(define_pkg_config_file NAME LIBS)
|
||||
add_custom_target(${NAME}-pkg-config ALL
|
||||
diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt
|
||||
index acf6fb0..d0df7db 100644
|
||||
index c8fa6d5..341865a 100644
|
||||
--- a/glslc/CMakeLists.txt
|
||||
+++ b/glslc/CMakeLists.txt
|
||||
@@ -26,7 +26,6 @@ shaderc_default_compile_options(glslc_exe)
|
||||
@@ -53,7 +53,6 @@ shaderc_default_compile_options(glslc_exe)
|
||||
target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include)
|
||||
set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc)
|
||||
target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc)
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 52ebd1c..f73252f 100644
|
||||
index b2e92ef..cf0832b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -144,6 +144,8 @@ function(define_pkg_config_file NAME LIBS)
|
||||
@@ -152,6 +152,8 @@ function(define_pkg_config_file NAME LIBS)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@ -13,7 +13,7 @@ index 52ebd1c..f73252f 100644
|
||||
-define_pkg_config_file(shaderc_combined -lshaderc_combined)
|
||||
+endif()
|
||||
diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt
|
||||
index 3ada419..d3bc639 100644
|
||||
index 2cced9e..e0eea6c 100644
|
||||
--- a/libshaderc/CMakeLists.txt
|
||||
+++ b/libshaderc/CMakeLists.txt
|
||||
@@ -24,13 +24,16 @@ set(SHADERC_SOURCES
|
||||
@ -50,8 +50,8 @@ index 3ada419..d3bc639 100644
|
||||
+ install(TARGETS ${shaderc_install_target} shaderc_util
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
@@ -68,8 +73,11 @@ set(SHADERC_LIBS
|
||||
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
@@ -69,8 +74,11 @@ set(SHADERC_LIBS
|
||||
SPIRV-Tools
|
||||
)
|
||||
|
||||
@ -63,7 +63,7 @@ index 3ada419..d3bc639 100644
|
||||
|
||||
shaderc_add_tests(
|
||||
TEST_PREFIX shaderc
|
||||
@@ -93,6 +101,7 @@ shaderc_add_tests(
|
||||
@@ -94,6 +102,7 @@ shaderc_add_tests(
|
||||
shaderc_cpp
|
||||
shaderc_private)
|
||||
|
||||
@ -71,7 +71,7 @@ index 3ada419..d3bc639 100644
|
||||
shaderc_combine_static_lib(shaderc_combined shaderc)
|
||||
|
||||
if(SHADERC_ENABLE_INSTALL)
|
||||
@@ -121,6 +130,7 @@ shaderc_add_tests(
|
||||
@@ -122,6 +131,7 @@ shaderc_add_tests(
|
||||
TEST_NAMES
|
||||
shaderc
|
||||
shaderc_cpp)
|
||||
|
@ -1,20 +0,0 @@
|
||||
diff --git a/libshaderc_util/src/resources.cc b/libshaderc_util/src/resources.cc
|
||||
index d64e47f..6c662d3 100644
|
||||
--- a/libshaderc_util/src/resources.cc
|
||||
+++ b/libshaderc_util/src/resources.cc
|
||||
@@ -125,6 +125,15 @@ const TBuiltInResource kDefaultTBuiltInResource = {
|
||||
/* .maxTaskWorkGroupSizeY_NV = */ 1,
|
||||
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
|
||||
/* .maxMeshViewCountNV = */ 4,
|
||||
+ /* .maxMeshOutputVerticesEXT = */ 256,
|
||||
+ /* .maxMeshOutputPrimitivesEXT = */ 256,
|
||||
+ /* .maxMeshWorkGroupSizeX_EXT = */ 128,
|
||||
+ /* .maxMeshWorkGroupSizeY_EXT = */ 128,
|
||||
+ /* .maxMeshWorkGroupSizeZ_EXT = */ 128,
|
||||
+ /* .maxTaskWorkGroupSizeX_EXT = */ 128,
|
||||
+ /* .maxTaskWorkGroupSizeY_EXT = */ 128,
|
||||
+ /* .maxTaskWorkGroupSizeZ_EXT = */ 128,
|
||||
+ /* .maxMeshViewCountEXT = */ 4,
|
||||
/* .maxDualSourceDrawBuffersEXT = */ 1,
|
||||
// This is the glslang TLimits structure.
|
||||
// It defines whether or not the following features are enabled.
|
@ -4,15 +4,13 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/shaderc
|
||||
REF adca18dcadd460eb517fe44f6cd2460fa0650ebe
|
||||
SHA512 3a27d4c51be9e9396b9a854cb96d88e78ff2ca6dcb8400bd3288f6984d25876af0eae649aa1c72ad613edbbcfa4324a12809f13ceb7a0134eef41cb1a698dfdf
|
||||
REF "v${VERSION}"
|
||||
SHA512 f3c1db574312e7e5ee22fb64f47f6609369754dd1648eb4e51c30b3c40aafd9994e54560e8334d01ac7d00011285a94d0543fa9ecd6977ec34c39a965fd72269
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
disable-update-version.patch
|
||||
fix-build-type.patch
|
||||
cmake-config-export.patch
|
||||
# NOTE: This should be removed when shaderc gets updated to use glslang 11.12.0
|
||||
fix-tbuiltinresource-for-glslang-11-12.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/build-version.inc" DESTINATION "${SOURCE_PATH}/glslc/src")
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "shaderc",
|
||||
"version": "2021.1",
|
||||
"port-version": 4,
|
||||
"version": "2023.7",
|
||||
"description": "A collection of tools, libraries and tests for shader compilation.",
|
||||
"homepage": "https://github.com/google/shaderc",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -3029,8 +3029,8 @@
|
||||
"port-version": 2
|
||||
},
|
||||
"glslang": {
|
||||
"baseline": "13.0.0",
|
||||
"port-version": 2
|
||||
"baseline": "13.1.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"glui": {
|
||||
"baseline": "2019-11-30",
|
||||
@ -7833,8 +7833,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"shaderc": {
|
||||
"baseline": "2021.1",
|
||||
"port-version": 4
|
||||
"baseline": "2023.7",
|
||||
"port-version": 0
|
||||
},
|
||||
"shaderwriter": {
|
||||
"baseline": "2.7.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "8296ce09ec51c8495a5bec8d65445b681df27b74",
|
||||
"version": "13.1.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "488d78f12e3a376002a80d0058e3973ac75d4fe7",
|
||||
"version": "13.0.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d90cdfaa52413836f8f4557bae2eff84dbb2c322",
|
||||
"version": "2023.7",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "3a6e1c8ff08a6437170e17cc7b9c6c0bc0113ba2",
|
||||
"version": "2021.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user