Skip to content

Commit

Permalink
Update VulkanCore to 1.3.207 (#46)
Browse files Browse the repository at this point in the history
* Fix wrong parsing of string

* Update project and generator

* Regenerate wrapper with version 1.3.207

* Minor rephrasing in README

* Bump package version to 1.3
  • Loading branch information
serenity4 committed Mar 10, 2022
1 parent 17f37a7 commit 97959a1
Show file tree
Hide file tree
Showing 21 changed files with 37,346 additions and 9,023 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "VulkanCore"
uuid = "16167f82-ea26-5cba-b1de-ed6fd5e30a11"
version = "1.2.6"
version = "1.3.0"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ VulkanCore wraps Vulkan and exposes the library calls necessary to work with
Vulkan. It is targeted for developers wanting to directly work with Vulkan in
Julia.

If you are looking for a high-level Julian API you might wish to take a look at
If you are looking for a high-level idiomatic Julia API you might wish to take a look at
[Vulkan.jl](https://github.com/JuliaGPU/Vulkan.jl).

### Installation
Expand Down
28 changes: 14 additions & 14 deletions gen/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ version = "0.4.1"

[[Clang]]
deps = ["CEnum", "Clang_jll", "Downloads", "Pkg", "TOML"]
path = "/Users/gnimuc/.julia/dev/Clang"
git-tree-sha1 = "1a485576e0bf5658a04a570c3215743b0b3069d6"
uuid = "40e3b903-d033-50b4-a0cc-940c62c95e31"
version = "0.14.0"
version = "0.14.1"

[[Clang_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "libLLVM_jll"]
git-tree-sha1 = "0312b2bec066a688bd79706c49deb48fefca836c"
git-tree-sha1 = "a5923c06de3178dd755f4b9411ea8922a7ae6fb8"
uuid = "0ee61d77-7f21-5576-8119-9fcc46b10100"
version = "12.0.1+0"
version = "11.0.1+3"

[[Dates]]
deps = ["Printf"]
Expand All @@ -36,19 +36,19 @@ uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b3bfd02e98aedfa5cf885665493c5598c350cd2f"
git-tree-sha1 = "ae13fcbc7ab8f16b0856729b050ef0c446aa3492"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.2.10+0"
version = "2.4.4+0"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[JLLWrappers]]
deps = ["Preferences"]
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.3.0"
version = "1.4.1"

[[LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
Expand All @@ -71,9 +71,9 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[Libffi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "761a393aeccd6aa92ec3515e428c26bf99575b3b"
git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290"
uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490"
version = "3.2.2+0"
version = "3.2.2+1"

[[Libgcrypt_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"]
Expand Down Expand Up @@ -116,9 +116,9 @@ uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Preferences]]
deps = ["TOML"]
git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a"
git-tree-sha1 = "de893592a221142f3db370f48290e3a2ef39998f"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.2.2"
version = "1.2.4"

[[Printf]]
deps = ["Unicode"]
Expand Down Expand Up @@ -158,9 +158,9 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[Vulkan_Headers_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "f43bb806a557d5d71c79e1c814f5980be91f194e"
git-tree-sha1 = "a30e36fcb36f6cbac325ee0b75066c7301170ddd"
uuid = "8d446b21-f3ad-5576-a034-752265b9b6f9"
version = "1.2.177+0"
version = "1.3.207+0"

[[Wayland_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"]
Expand Down
4 changes: 2 additions & 2 deletions gen/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Xorg_libxcb_jll = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b"
Xorg_xorgproto_jll = "c4d99508-4286-5418-9131-c86396af500b"

[compat]
Clang = "0.14.0"
Vulkan_Headers_jll = "1.2.177"
Clang = "0.14"
Vulkan_Headers_jll = "1.3.207"
2 changes: 1 addition & 1 deletion gen/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const VK_EXTENSIONS_MAP = Dict(
"i686-linux-gnu" => VK_LINUX_EXTENSION_COMMON,
"i686-linux-musl" => VK_LINUX_EXTENSION_COMMON,
"powerpc64le-linux-gnu" => VK_LINUX_EXTENSION_COMMON,
"x86_64-unknown-freebsd11.1" => ["-DVK_USE_PLATFORM_XCB_KHR", "-DVK_USE_PLATFORM_XLIB_KHR", "-DVK_USE_PLATFORM_XLIB_XRANDR_EXT"],
"x86_64-unknown-freebsd" => ["-DVK_USE_PLATFORM_XCB_KHR", "-DVK_USE_PLATFORM_XLIB_KHR", "-DVK_USE_PLATFORM_XLIB_XRANDR_EXT"],
)

for target in JLLEnvs.JLL_ENV_TRIPLES
Expand Down
3,312 changes: 2,668 additions & 644 deletions lib/aarch64-apple-darwin20.jl

Large diffs are not rendered by default.

3,312 changes: 2,668 additions & 644 deletions lib/aarch64-linux-gnu.jl

Large diffs are not rendered by default.

3,312 changes: 2,668 additions & 644 deletions lib/aarch64-linux-musl.jl

Large diffs are not rendered by default.

3,306 changes: 2,663 additions & 643 deletions lib/armv7l-linux-gnueabihf.jl

Large diffs are not rendered by default.

3,306 changes: 2,663 additions & 643 deletions lib/armv7l-linux-musleabihf.jl

Large diffs are not rendered by default.

3,306 changes: 2,663 additions & 643 deletions lib/i686-linux-gnu.jl

Large diffs are not rendered by default.

3,306 changes: 2,663 additions & 643 deletions lib/i686-linux-musl.jl

Large diffs are not rendered by default.

3,270 changes: 2,645 additions & 625 deletions lib/i686-w64-mingw32.jl

Large diffs are not rendered by default.

3,312 changes: 2,668 additions & 644 deletions lib/powerpc64le-linux-gnu.jl

Large diffs are not rendered by default.

3,312 changes: 2,668 additions & 644 deletions lib/x86_64-apple-darwin14.jl

Large diffs are not rendered by default.

3,312 changes: 2,668 additions & 644 deletions lib/x86_64-linux-gnu.jl

Large diffs are not rendered by default.

3,312 changes: 2,668 additions & 644 deletions lib/x86_64-linux-musl.jl

Large diffs are not rendered by default.

3,312 changes: 2,668 additions & 644 deletions lib/x86_64-unknown-freebsd11.1.jl → lib/x86_64-unknown-freebsd.jl

Large diffs are not rendered by default.

3,312 changes: 2,668 additions & 644 deletions lib/x86_64-w64-mingw32.jl

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/LibVulkan.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const libvulkan_handle = Ref{Ptr{Cvoid}}(0)
function __init__()
libname = Libdl.find_library(libvulkan)
if isempty(libname)
error("""
Failed to retrieve a valid Vulkan library called '$libvulkan'.
If you configure the `JULIA_VULKAN_LIBNAME` environment variable before precompiling VulkanCore, it will be used instead of '$libvulkan'. You may also manually add search paths by appending them to Lidbl.DL_LOAD_PATH, but note that this may have repercussions beyond this package.
""")
error("""
Failed to retrieve a valid Vulkan library called '$libvulkan'.
If you configure the `JULIA_VULKAN_LIBNAME` environment variable before precompiling VulkanCore, it will be used instead of '$libvulkan'. You may also manually add search paths by appending them to Lidbl.DL_LOAD_PATH, but note that this may have repercussions beyond this package.
""")
end
libvulkan_handle[] = Libdl.dlopen(libname)
end
Expand Down Expand Up @@ -63,7 +63,7 @@ elseif Sys.islinux() && Sys.ARCH === :x86_64 && !IS_LIBC_MUSL
elseif Sys.islinux() && Sys.ARCH === :x86_64 && IS_LIBC_MUSL
include("../lib/x86_64-linux-musl.jl")
elseif Sys.isbsd() && !Sys.isapple()
include("../lib/x86_64-unknown-freebsd11.1.jl")
include("../lib/x86_64-unknown-freebsd.jl")
elseif Sys.iswindows() && Sys.ARCH === :x86_64
include("../lib/x86_64-w64-mingw32.jl")
else
Expand All @@ -72,7 +72,7 @@ end

# exports
const PREFIXES = ["VK_", "Vk", "vk"]
for name in names(@__MODULE__; all=true), prefix in PREFIXES
for name in names(@__MODULE__; all = true), prefix in PREFIXES
if startswith(string(name), prefix)
@eval export $name
end
Expand Down
17 changes: 12 additions & 5 deletions test/vkhelper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ unsafe_strings2pp(names::Vector{String}) = Base.unsafe_convert(Ptr{Cstring}, Bas

"""
to_string(x::NTuple{N,UInt8}) -> String
Convert a `NTuple{N,UInt8}` to `String` dropping all of the `\0`s.
Convert a `NTuple{N,UInt8}` to `String`, stopping at the first `\0` encountered.
"""
to_string(x::NTuple{N,Int8}) where {N} = rstrip(String(UInt8.(collect(x))), '\0')
function to_string(x::NTuple{N,Int8}) where {N}
nullchar = findfirst(iszero, x)
nullchar == 1 && return ""
if !isnothing(nullchar)
x = x[1:nullchar-1]
end
String(reinterpret(UInt8, collect(x)))
end

"""
int2version(::Type{VersionNumber}, ver::Integer) -> VersionNumber
Expand Down Expand Up @@ -65,7 +72,7 @@ function check_extensions(required_extensions::Vector{<:AbstractString})
@info " $(x.name): $(x.version)"
end
names = [x.name for x in supported]
if all(x->x in names, required_extensions)
if all(x -> x in names, required_extensions)
return true
else
@error "not all required extensions are supported."
Expand Down Expand Up @@ -227,7 +234,7 @@ Return a `QueueFamilyIndices` for the input device.
function find_queue_families(device::VkPhysicalDevice)
indices = QueueFamilyIndices()
families = get_queue_family_properties(device)
for (i,family) in enumerate(families)
for (i, family) in enumerate(families)
if Bool(family.queueFlags & VK_QUEUE_GRAPHICS_BIT)
indices.graphicsFamily = i
end
Expand Down Expand Up @@ -255,4 +262,4 @@ function LibVulkan.VkDeviceCreateInfo(queue_count::Integer, queue_info::Ref{VkDe
return VkDeviceCreateInfo(sType, pNext, flags, queueCreateInfoCount, pQueueCreateInfos, 0, C_NULL, 0, C_NULL, pEnabledFeatures)
end

LibVulkan.VkPhysicalDeviceFeatures() = VkPhysicalDeviceFeatures(fill(VK_FALSE,55)...)
LibVulkan.VkPhysicalDeviceFeatures() = VkPhysicalDeviceFeatures(fill(VK_FALSE, 55)...)

5 comments on commit 97959a1

@serenity4
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Register Failed
@serenity4, it looks like you are not a publicly listed member/owner in the parent organization (JuliaGPU).
If you are a member/owner, you will need to change your membership to public. See GitHub Help

@serenity4
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, looks like I have the rights to merge but not to register new versions. @Gnimuc could you register a new version please?

@Gnimuc
Copy link
Member

@Gnimuc Gnimuc commented on 97959a1 Mar 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/56393

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.3.0 -m "<description of version>" 97959a1ad13a09fccbeca752239107ef0c3b4e7c
git push origin v1.3.0

Please sign in to comment.