Skip to content

Commit

Permalink
Update Vulkan packages (#2588)
Browse files Browse the repository at this point in the history
* Update Vulkan packages

* Update xmake.lua

* Fix vulkan sdk version

* Update xmake.lua

* Update xmake.lua

* fix spirv-headers

* fix spirv-headers

* spirv-tools: switch to sdk version
  • Loading branch information
SirLynix authored Sep 13, 2023
1 parent d5a82cc commit 16058b9
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
1 change: 1 addition & 0 deletions packages/g/glslang/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ package("glslang")
add_versions("1.3.239+0", "ca8d07d0bc1c6390b83915700439fa7719de6a2a")
add_versions("1.3.246+1", "14e5a04e70057972eef8a40df422e30a3b70e4b5")
add_versions("1.3.250+1", "d1517d64cfca91f573af1bf7341dc3a5113349c0")
add_versions("1.3.261+1", "76b52ebf77833908dc4c0dd6c70a9c357ac720bd")

add_patches("1.3.246+1", "https://github.com/KhronosGroup/glslang/commit/1e4955adbcd9b3f5eaf2129e918ca057baed6520.patch", "47893def550f1684304ef7c49da38f0a8fe35c190a3452d3bf58370b3ee7165d")

Expand Down
4 changes: 4 additions & 0 deletions packages/s/spirv-headers/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ package("spirv-headers")
add_versions("1.3.239+0", "fdaf6670e311cd1c08ae90bf813e89dd31630205bc60030ffd25fb0af39b51fe")
add_versions("1.3.246+1", "71668e18ef7b318b06f8c466f46abad965b2646eaa322594cd015c2ac87133e6")
add_versions("1.3.250+1", "d5f8c4b7906baf9c51aedbbb2dd942009e8658e3340c6e64699518666a03e043")
add_versions("1.3.261+1", "32b4c6ae6a2fa9b56c2c17233c8056da47e331f76e117729925825ea3e77a739")

add_patches("1.3.261+1", "https://github.com/KhronosGroup/SPIRV-Headers/commit/c43effd54686240d8b13762279d5392058d10e27.patch", "b97a05c35c00620519a5f3638a974fc2a01f062bf6e86b74b49a234f82cc55ce")

add_deps("cmake")

on_install(function (package)
import("package.tools.cmake").install(package, {"-DSPIRV_HEADERS_SKIP_EXAMPLES=ON"})
end)
Expand Down
3 changes: 2 additions & 1 deletion packages/s/spirv-reflect/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package("spirv-reflect")

set_homepage("https://github.com/KhronosGroup/SPIRV-Reflect")
set_description("SPIRV-Reflect is a lightweight library that provides a C/C++ reflection API for SPIR-V shader bytecode in Vulkan applications.")
set_license("Apache-2.0")
Expand All @@ -9,6 +8,8 @@ package("spirv-reflect")
add_versions("1.2.162+0", "481e34d666031eae28423f3b723a1a8c717d7636")
add_versions("1.2.189+1", "272e050728de8d4a4ce9e7101c1244e6ff56e5b0")
add_versions("1.3.231+1", "b68b5a8a5d8ab5fce79e6596f3a731291046393a")
add_versions("1.3.250+1", "1fd43331f0bd77cc0f421745781f79a14d8f2bb1")
add_versions("1.3.261+1", "d7e316e7d592d16ac58f1fe39b1df7babfe65c0d")

add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})

Expand Down
31 changes: 18 additions & 13 deletions packages/s/spirv-tools/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@ package("spirv-tools")
set_description("SPIR-V Tools")
set_license("Apache-2.0")

add_urls("https://github.com/KhronosGroup/SPIRV-Tools/archive/$(version).tar.gz",
"https://github.com/KhronosGroup/SPIRV-Tools.git")
add_versions("v2020.5", "947ee994ba416380bd7ccc1c6377ac28a4802a55ca81ccc06796c28e84c00b71")
add_versions("v2020.6", "de2392682df8def7ac666a2a320cd475751badf4790b01c7391b7644ecb550a3")
add_versions("v2021.3", "b6b4194121ee8084c62b20f8d574c32f766e4e9237dfe60b0658b316d19c6b13")
add_versions("v2021.4", "d68de260708dda785d109ff1ceeecde2d2ab71142fa5bf59061bb9f47dd3bb2c")
add_versions("v2022.2", "909fc7e68049dca611ca2d57828883a86f503b0353ff78bc594eddc65eb882b9")
add_versions("v2022.4", "a156215a2d7c6c5b267933ed691877a9a66f07d75970da33ce9ad627a71389d7")
add_versions("v2023.1", "f3d8245aeb89f098c01dddaa566f9c0f2aab4a3d62a9020afaeb676b5e7e64d4")
add_urls("https://github.com/KhronosGroup/SPIRV-Tools.git")
add_versions("1.2.154+1", "sdk-1.2.154.1")
add_versions("1.2.162+0", "sdk-1.2.162.0")
add_versions("1.2.189+1", "sdk-1.2.189.1")
add_versions("1.3.211+0", "sdk-1.3.211.0")
add_versions("1.3.231+1", "sdk-1.3.231.1")
add_versions("1.3.236+0", "sdk-1.3.236.0")
add_versions("1.3.239+0", "sdk-1.3.239.0")
add_versions("1.3.246+1", "sdk-1.3.246.1")
add_versions("1.3.250+1", "sdk-1.3.250.1")
add_versions("1.3.261+1", "sdk-1.3.261.1")

add_patches("v2020.5", "https://github.com/KhronosGroup/SPIRV-Tools/commit/a1d38174b1f7d2651c718ae661886d606cb50a32.patch", "2811faeef3ad53a83e409c8ef9879badcf9dc04fc3d98dbead7313514b819933")

add_deps("cmake", "spirv-headers")
add_deps("cmake >=3.17.2")
add_deps("python 3.x", {kind = "binary"})
if is_plat("linux") then
add_extsources("apt::spirv-tools", "pacman::spirv-tools")
end

on_load(function (package)
local sdkver = package:version():split("%+")[1]
package:add("deps", "spirv-headers " .. sdkver)
end)

on_fetch("macosx", function (package, opt)
if opt.system then
-- fix missing includedirs when the system library is found on macOS
Expand Down Expand Up @@ -70,5 +75,5 @@ package("spirv-tools")
os.runv("spirv-as --help")
os.runv("spirv-opt --help")
end
assert(package:has_cxxfuncs("spvContextCreate", {configs = {languages = "c++11"}, includes = "spirv-tools/libspirv.hpp"}))
assert(package:has_cxxfuncs("spvContextCreate", {configs = {languages = "c++17"}, includes = "spirv-tools/libspirv.hpp"}))
end)
2 changes: 1 addition & 1 deletion packages/v/volk/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package("volk")

set_homepage("https://github.com/zeux/volk")
set_description("volk is a meta-loader for Vulkan")
set_license("MIT")
Expand All @@ -13,6 +12,7 @@ package("volk")
add_versions("1.3.204", "7776e7f3c70f199579da33d2ccd7152ca8b96182fa98c31fbe80880cef0fdf70")
add_versions("1.3.231+1", "fac8d3d295e88bcc6bfb2b729d2c4babb2ea04ccb39fd918a3471b2d756789b9")
add_versions("1.3.250+1", "673241c6561fb4965f873d7fcdece17d950b24c77d6cf41466e47bdc2af67b81")
add_versions("1.3.261+1", "052866c6cbff9efdf1e73e71c1d65070c36863730c95a4e93833500b4d894d69")

add_deps("vulkan-headers")

Expand Down
3 changes: 2 additions & 1 deletion packages/v/vulkan-headers/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ package("vulkan-headers")
add_urls("https://github.com/KhronosGroup/Vulkan-Headers.git")
add_urls("https://github.com/KhronosGroup/Vulkan-Headers/archive/$(version).tar.gz", {version = function (version) return version:startswith("v") and version or "sdk-" .. version:gsub("%+", ".") end})

-- when adding a new sdk version, please also update vulkan-loader, spirv-headers, glslang and volk packages
-- when adding a new sdk version, please also update vulkan-loader, spirv-headers, spirv-reflect, glslang and volk packages
add_versions("1.3.261+1", "7a25ebdb6325e626dc5d33bc937b289ccce7ddb7b0ac1a1b1d5d7ff33b6715d3")
add_versions("1.3.250+1", "e5b563a415e73725bcf471b7e3e837804ed3703b47cce4553db5e7e73821c5ee")
add_versions("1.3.246+1", "f9fa6a05ac1e059cd6f8f3a21705fb5bc093743d97315b7acf3bc20921abc27c")
add_versions("1.3.239+0", "865fa8e8e8314fcca60777a92f50bd0cf612205a36e719d6975482d3366f619e")
Expand Down
1 change: 1 addition & 0 deletions packages/v/vulkan-loader/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package("vulkan-loader")
set_license("Apache-2.0")

add_urls("https://github.com/KhronosGroup/Vulkan-Loader/archive/sdk-$(version).tar.gz", {version = function (version) return version:gsub("%+", ".") end})
add_versions("1.3.261+1", "f85f0ea57b63750d4ddaf6c8649df781c4777006daa3cd772b01e7b5ed02f3f2")
add_versions("1.3.250+1", "b982ec5fae9af6364816a7c5fcf4d3e5c29bfdca35f4b12ee1f90e492e41adc2")
add_versions("1.3.246+1", "5ffb79b83ec539233ee793dd3c50aa241bd9bd67103d45d3f4b657f1620b7553")
add_versions("1.3.239+0", "fa2078408793b2173f174173a8784de56b6bbfbcb5fb958a07e46ef126c7eada")
Expand Down

0 comments on commit 16058b9

Please sign in to comment.