glslang: 11.12.0 -> 11.13.0

This commit is contained in:
Tim Biermann 2023-01-14 09:46:54 +00:00
parent bde64a14c1
commit 3fa82b9a5d
Signed by: tb
GPG Key ID: 42F8B4E30B673606
5 changed files with 38 additions and 180 deletions

View File

@ -49,9 +49,12 @@ drwxr-xr-x root/root usr/include/glslang/MachineIndependent/preprocessor/
-rw-r--r-- root/root usr/include/glslang/MachineIndependent/propagateNoContraction.h
-rw-r--r-- root/root usr/include/glslang/MachineIndependent/reflection.h
drwxr-xr-x root/root usr/include/glslang/Public/
-rw-r--r-- root/root usr/include/glslang/Public/ResourceLimits.h
-rw-r--r-- root/root usr/include/glslang/Public/ShaderLang.h
-rw-r--r-- root/root usr/include/glslang/Public/resource_limits_c.h
drwxr-xr-x root/root usr/include/glslang/SPIRV/
-rw-r--r-- root/root usr/include/glslang/SPIRV/GLSL.ext.AMD.h
-rw-r--r-- root/root usr/include/glslang/SPIRV/GLSL.ext.ARM.h
-rw-r--r-- root/root usr/include/glslang/SPIRV/GLSL.ext.EXT.h
-rw-r--r-- root/root usr/include/glslang/SPIRV/GLSL.ext.KHR.h
-rw-r--r-- root/root usr/include/glslang/SPIRV/GLSL.ext.NV.h
@ -100,7 +103,5 @@ drwxr-xr-x root/root usr/lib/cmake/glslang/
-rwxr-xr-x root/root usr/lib/libglslang-default-resource-limits.so
-rw-r--r-- root/root usr/lib/libglslang.a
lrwxrwxrwx root/root usr/lib/libglslang.so -> libglslang.so.11
lrwxrwxrwx root/root usr/lib/libglslang.so.11 -> libglslang.so.11.12.0
-rwxr-xr-x root/root usr/lib/libglslang.so.11.12.0
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/spirv.pc
lrwxrwxrwx root/root usr/lib/libglslang.so.11 -> libglslang.so.11.13.0
-rwxr-xr-x root/root usr/lib/libglslang.so.11.13.0

View File

@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/SciVGHDPfpkghFQCJl6jbm9rfGX+R642eNLDwiI06Wit0i0SA8XJQ75kvHGNyQgbeU0e3ODmsTdMRTQS12zTAo=
SHA256 (Pkgfile) = 02b8fcc38f8970f7aaf6132d1fd3f0cacba7b1db6fcf40086fa4cba577ee97af
SHA256 (.footprint) = e092f9c5c59c4a33b5b2a35eac5c0c5ece0da9c41a245dc813a6a75583ea747b
SHA256 (glslang-11.12.0.tar.gz) = 7795a97450fecd9779f3d821858fbc2d1a3bf1dd602617d95b685ccbcabc302f
SHA256 (0001-pkg-config-compatibility.patch) = 23e3ffa56bf9f710a5a4ba496eb7413ca06c5e5d25b666b1b0269983a6bf8e03
RWSE3ohX2g5d/d0YpBMByDWf8yTvAmtSitMxbP8vJAYyJFGjEnelveEB7y0pXyqoOjtQ2rAoSx4Z01Xcj7vW+BFFupVlm4uqmgo=
SHA256 (Pkgfile) = f76a696f842c3ecbe5d41443d98ef1cd8df2cdc13d298b3fb04fedc60c48c22d
SHA256 (.footprint) = 8709b31659277d0a0934e4bf76811125c60820eb6cb0dbc623c75bf09cd48766
SHA256 (glslang-11.13.0.tar.gz) = 592c98aeb03b3e81597ddaf83633c4e63068d14b18a766fd11033bad73127162
SHA256 (glslang-11.13.0-cmake_include_dirs.patch) = 70f08416e447e7c68730186c9fcd629e96896aa9bf780cdceffc2cf9b8efca21

View File

@ -1,167 +0,0 @@
diff -up glslang-sdk-1.3.224.0/CMakeLists.txt.dma glslang-sdk-1.3.224.0/CMakeLists.txt
--- glslang-sdk-1.3.224.0/CMakeLists.txt.dma 2022-08-13 01:32:10.000000000 +1000
+++ glslang-sdk-1.3.224.0/CMakeLists.txt 2022-08-24 11:02:14.557865460 +1000
@@ -129,6 +129,13 @@ if(USE_CCACHE)
endif()
endif()
+# using pkg-config to configure include paths and link libraries
+include(FindPkgConfig)
+pkg_check_modules(SPIRV_TOOLS REQUIRED SPIRV-Tools>=2019.2.1)
+if(BUILD_SHARED_LIBS)
+ pkg_check_modules(SPIRV_TOOLS_SHARED REQUIRED SPIRV-Tools-shared>=2019.2.1)
+endif(BUILD_SHARED_LIBS)
+
if(ENABLE_CTEST)
include(CTest)
endif()
@@ -319,11 +326,7 @@ if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMA
add_subdirectory(External)
endif()
-if(NOT TARGET SPIRV-Tools-opt)
- set(ENABLE_OPT OFF)
-endif()
-
-if(ENABLE_OPT)
+if(${SPIRV_TOOLS_FOUND} EQUAL 1)
message(STATUS "optimizer enabled")
add_definitions(-DENABLE_OPT=1)
else()
diff -up glslang-sdk-1.3.224.0/External/CMakeLists.txt.dma glslang-sdk-1.3.224.0/External/CMakeLists.txt
--- glslang-sdk-1.3.224.0/External/CMakeLists.txt.dma 2022-08-13 01:32:10.000000000 +1000
+++ glslang-sdk-1.3.224.0/External/CMakeLists.txt 2022-08-24 11:02:14.564865557 +1000
@@ -68,10 +68,3 @@ if(BUILD_TESTING)
endif()
endif()
-if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt)
- if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools)
- set(SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests")
- add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools)
- endif()
-endif()
-
diff -up glslang-sdk-1.3.224.0/glslang/glslang.pc.cmake.in.dma glslang-sdk-1.3.224.0/glslang/glslang.pc.cmake.in
--- glslang-sdk-1.3.224.0/glslang/glslang.pc.cmake.in.dma 2022-08-24 11:02:14.567865599 +1000
+++ glslang-sdk-1.3.224.0/glslang/glslang.pc.cmake.in 2022-08-24 11:02:14.567865599 +1000
@@ -0,0 +1,11 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: @PROJECT_NAME@
+ Description: OpenGL and OpenGL ES shader front end and validator
+ Requires:
+ Version: @VERSION@
+ Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper
+ Cflags: -I${includedir}
\ No newline at end of file
diff -up glslang-sdk-1.3.224.0/SPIRV/CMakeLists.txt.dma glslang-sdk-1.3.224.0/SPIRV/CMakeLists.txt
--- glslang-sdk-1.3.224.0/SPIRV/CMakeLists.txt.dma 2022-08-13 01:32:10.000000000 +1000
+++ glslang-sdk-1.3.224.0/SPIRV/CMakeLists.txt 2022-08-24 11:02:39.022204124 +1000
@@ -77,6 +77,10 @@ target_include_directories(SPIRV PUBLIC
glslang_add_build_info_dependency(SPIRV)
+
+set(SPIRV_NAME spirv)
+set(SPIRV_VERSION 1.3)
+
if (ENABLE_SPVREMAPPER)
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
@@ -90,15 +94,21 @@ if(WIN32 AND BUILD_SHARED_LIBS)
endif()
endif()
+target_include_directories(SPIRV PUBLIC ${SPIRV_TOOLS_INCLUDE_DIRS})
+target_compile_options(SPIRV PUBLIC ${SPIRV_TOOLS_CFLAGS_OTHER})
+target_link_libraries(SPIRV ${SPIRV_TOOLS_LIBRARIES})
+if(BUILD_SHARED_LIBS)
+ target_include_directories(SPIRV PUBLIC ${SPIRV_TOOLS_SHARED_INCLUDE_DIRS})
+ target_compile_options(SPIRV PUBLIC ${SPIRV_TOOLS_SHARED_CFLAGS_OTHER})
+ target_link_libraries(SPIRV ${SPIRV_TOOLS_SHARED_LIBRARIES})
+endif(BUILD_SHARED_LIBS)
+
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_include_directories(SPIRV PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
+ target_link_libraries(SPIRV glslang)
else()
target_link_libraries(SPIRV PRIVATE MachineIndependent)
endif()
@@ -139,6 +149,9 @@ if(ENABLE_GLSLANG_INSTALL)
add_library(SPIRV ALIAS glslang::SPIRV)
")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/SPIRVTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
-
+ # spirv.pc Configuration
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/spirv.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/spirv.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/spirv.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/)
endif()
diff -up glslang-sdk-1.3.224.0/SPIRV/spirv.pc.cmake.in.dma glslang-sdk-1.3.224.0/SPIRV/spirv.pc.cmake.in
--- glslang-sdk-1.3.224.0/SPIRV/spirv.pc.cmake.in.dma 2022-08-24 11:02:14.569865626 +1000
+++ glslang-sdk-1.3.224.0/SPIRV/spirv.pc.cmake.in 2022-08-24 11:02:14.569865626 +1000
@@ -0,0 +1,11 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: @SPIRV_NAME@
+ Description: SPIR-V is a binary intermediate language for representing graphical-shader stages and compute kernels for multiple Khronos APIs, including OpenCL, OpenGL, and Vulkan
+ Requires:
+ Version: @SPIRV_VERSION@
+ Libs: -L${libdir} -lSPIRV
+ Cflags: -I${includedir}
\ No newline at end of file
diff -up glslang-sdk-1.3.224.0/SPIRV/SpvTools.cpp.dma glslang-sdk-1.3.224.0/SPIRV/SpvTools.cpp
--- glslang-sdk-1.3.224.0/SPIRV/SpvTools.cpp.dma 2022-08-13 01:32:10.000000000 +1000
+++ glslang-sdk-1.3.224.0/SPIRV/SpvTools.cpp 2022-08-24 11:02:14.570865640 +1000
@@ -43,7 +43,7 @@
#include <iostream>
#include "SpvTools.h"
-#include "spirv-tools/optimizer.hpp"
+#include <spirv-tools/optimizer.hpp>
namespace glslang {
diff -up glslang-sdk-1.3.224.0/StandAlone/CMakeLists.txt.dma glslang-sdk-1.3.224.0/StandAlone/CMakeLists.txt
--- glslang-sdk-1.3.224.0/StandAlone/CMakeLists.txt.dma 2022-08-24 11:01:28.064221842 +1000
+++ glslang-sdk-1.3.224.0/StandAlone/CMakeLists.txt 2022-08-24 11:02:14.571865654 +1000
@@ -72,6 +72,14 @@ if(ENABLE_SPVREMAPPER)
set(LIBRARIES ${LIBRARIES} SPVRemapper)
endif()
+if(BUILD_SHARED_LIBS)
+ set(LIBRARIES ${LIBRARIES} ${SPIRV_TOOLS_SHARED_LIBRARIES})
+ target_include_directories(glslangValidator PUBLIC ${SPIRV_TOOLS_SHARED_INCLUDE_DIRS})
+else()
+ set(LIBRARIES ${LIBRARIES} ${SPIRV_TOOLS_LIBRARIES})
+ target_include_directories(glslangValidator PUBLIC ${SPIRV_TOOLS_INCLUDE_DIRS})
+endif(BUILD_SHARED_LIBS)
+
if(WIN32)
set(LIBRARIES ${LIBRARIES} psapi)
elseif(UNIX)
@@ -81,9 +89,6 @@ elseif(UNIX)
endif()
target_link_libraries(glslangValidator ${LIBRARIES})
-target_include_directories(glslangValidator PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
if(ENABLE_OPT)
target_include_directories(glslangValidator

View File

@ -4,13 +4,13 @@
# Depends on: spirv-tools
name=glslang
version=11.12.0
release=2
version=11.13.0
release=1
source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
0001-pkg-config-compatibility.patch)
glslang-11.13.0-cmake_include_dirs.patch)
build() {
patch -Np1 -d $SRC/$name-$version -i $SRC/0001-pkg-config-compatibility.patch
patch -Np1 -d $SRC/$name-$version -i $SRC/glslang-11.13.0-cmake_include_dirs.patch
local config="
-G Ninja

View File

@ -0,0 +1,24 @@
diff -ruN a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
--- a/SPIRV/CMakeLists.txt 2022-12-06 23:34:33.000000000 +0100
+++ b/SPIRV/CMakeLists.txt 2022-12-16 12:15:03.231070779 +0100
@@ -100,7 +100,7 @@
target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt)
target_include_directories(SPIRV PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
+ )
else()
target_link_libraries(SPIRV PRIVATE MachineIndependent)
endif()
diff -ruN a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
--- a/StandAlone/CMakeLists.txt 2022-12-06 23:34:33.000000000 +0100
+++ b/StandAlone/CMakeLists.txt 2022-12-16 12:15:20.527812776 +0100
@@ -83,7 +83,7 @@
target_link_libraries(glslangValidator ${LIBRARIES})
target_include_directories(glslangValidator PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
+)
if(ENABLE_OPT)
target_include_directories(glslangValidator