Skip to content
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
35 changes: 19 additions & 16 deletions .github/workflows/historical-registry-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
name: Windows generator setup
runs-on: windows-2022
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.x"
cache: pip
cache-dependency-path: .github/generator-requirements.txt
- uses: prantlf/setup-v-action@v4
- uses: prantlf/setup-v-action@92f20bea50d2c9931a28c96bb4997a3c7357baf0 # v4
- name: Generate pinned bindings with PowerShell
shell: pwsh
run: |
Expand All @@ -36,35 +36,35 @@ jobs:
name: Strict V3 frontend
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: KhronosGroup/Vulkan-Docs
ref: v1.4.362
path: vulkandocs
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/vulkan
path: published
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/v
ref: f59b886d2564e37d8626d715236fdfa928e13dda
path: .ci-v-source
fetch-depth: 1
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/vc
ref: 4598bc7e4894c154b27391e4442005fff2fbbd68
path: .ci-v-source/vc
fetch-depth: 1
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/tccbin
ref: d6e7ac1b1bcc98aed734a6ecbfa8509f24606c74
path: .ci-v-source/thirdparty/tcc
fetch-depth: 1
- uses: actions/setup-python@v7
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.x"
cache: pip
Expand Down Expand Up @@ -104,24 +104,27 @@ jobs:
version: [v1.3.290, v1.4.319, v1.4.335, v1.4.362]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: KhronosGroup/Vulkan-Docs
ref: ${{ matrix.version }}
path: vulkandocs
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/vulkan
path: published
- uses: prantlf/setup-v-action@v4
- uses: actions/setup-python@v7
- uses: prantlf/setup-v-action@92f20bea50d2c9931a28c96bb4997a3c7357baf0 # v4
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.x"
cache: pip
cache-dependency-path: .github/generator-requirements.txt
- run: python -m pip install --requirement .github/generator-requirements.txt
- uses: NcStudios/VulkanCI@v1.2
- uses: NcStudios/VulkanCI@1a5db3ebde578c503b1d7f8df007e42a7367224c # v1.2
env:
# VulkanCI uses github.action_ref as its release artifact tag.
VK_CI_TEST_TAG_OVERRIDE: v1.2
with:
sdkVersion: 1.4.309.0
- name: Generate and compile historical bindings
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/publish-compatibility-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,36 @@ jobs:
publish:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: KhronosGroup/Vulkan-Docs
fetch-depth: 0
filter: blob:none
path: vulkandocs
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: KhronosGroup/Vulkan-Headers
fetch-depth: 0
filter: blob:none
path: vulkanheaders
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: ${{ env.TARGET_REPO }}
fetch-depth: 0
path: published
token: ${{ secrets.PUSH_VULKAN }}
- uses: prantlf/setup-v-action@v4
- uses: actions/setup-python@v7
- uses: prantlf/setup-v-action@92f20bea50d2c9931a28c96bb4997a3c7357baf0 # v4
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.x"
cache: pip
cache-dependency-path: .github/generator-requirements.txt
- run: python -m pip install --requirement .github/generator-requirements.txt
- uses: NcStudios/VulkanCI@v1.2
- uses: NcStudios/VulkanCI@1a5db3ebde578c503b1d7f8df007e42a7367224c # v1.2
env:
# VulkanCI uses github.action_ref as its release artifact tag.
VK_CI_TEST_TAG_OVERRIDE: v1.2
with:
sdkVersion: 1.4.309.0
- name: Regenerate and validate every historical release
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/update_bindings_and_push_to_vulkan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
changed: ${{ steps.versions.outputs.changed }}
branch: ${{ steps.versions.outputs.branch }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- id: versions
env:
REQUESTED_VERSION: ${{ inputs.vk_docs_version }}
Expand Down Expand Up @@ -74,23 +74,23 @@ jobs:
if: needs.versions.outputs.changed == 'true'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: ${{ env.DEPLOY_TARGET_REPO }}
path: published
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: KhronosGroup/Vulkan-Docs
path: vulkandocs
ref: ${{ needs.versions.outputs.requested }}
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: KhronosGroup/Vulkan-Headers
path: vulkanheaders
ref: ${{ needs.versions.outputs.requested }}
- uses: prantlf/setup-v-action@v4
- uses: actions/setup-python@v7
- uses: prantlf/setup-v-action@92f20bea50d2c9931a28c96bb4997a3c7357baf0 # v4
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.x"
cache: pip
Expand All @@ -107,7 +107,10 @@ jobs:
printf '%s\n' '${{ needs.versions.outputs.requested }}' > VERSION
git -C vulkanheaders rev-parse HEAD > REGISTRY_COMMIT
grep -Eq '^[0-9a-f]{40}$' REGISTRY_COMMIT
- uses: NcStudios/VulkanCI@v1.2
- uses: NcStudios/VulkanCI@1a5db3ebde578c503b1d7f8df007e42a7367224c # v1.2
env:
# VulkanCI uses github.action_ref as its release artifact tag.
VK_CI_TEST_TAG_OVERRIDE: v1.2
with:
sdkVersion: 1.4.309.0
- name: Download Volk and compile smoke test
Expand All @@ -120,7 +123,7 @@ jobs:
install -m 0644 src/vulkan_video.v published/vulkan_video.v
ln -s "$GITHUB_WORKSPACE/published" "$HOME/.vmodules/antono2/vulkan"
v -cc gcc run test
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: v-vulkan-bindings-${{ needs.versions.outputs.requested }}
if-no-files-found: error
Expand All @@ -134,12 +137,12 @@ jobs:
needs: [versions, generate]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: ${{ env.DEPLOY_TARGET_REPO }}
ref: master
token: ${{ secrets.PUSH_VULKAN }}
- uses: actions/download-artifact@v8
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: v-vulkan-bindings-${{ needs.versions.outputs.requested }}
path: generated
Expand Down
12 changes: 12 additions & 0 deletions src/vgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ class VOutputGenerator(OutputGenerator):
'ubm_surface': 'voidptr',
}

# Objective-C object and IOSurface typedefs are pointer-sized opaque C
# handles. Their registry names are not V struct values.
OPAQUE_PLATFORM_HANDLE_TYPES = {
'MTLDevice_id', 'MTLCommandQueue_id', 'MTLBuffer_id',
'MTLTexture_id', 'MTLSharedEvent_id', 'IOSurfaceRef',
}

# Contains all struct handles in vulkan.
# They are pointers to StructName_T and their members are unknown.
C_STRUCT_ARR = []
Expand Down Expand Up @@ -1461,6 +1468,9 @@ def makeVParamDecl(self, typeName, param, aligncol, do_c_func_params=False, do_c
self.fixed_array_aliases.append((alias_name, v_type))
v_type = alias_name

if do_struct_members and v_type in self.OPAQUE_PLATFORM_HANDLE_TYPES:
v_type = 'voidptr'

v_name = self.make_v_param_name(
param,
v_name,
Expand Down Expand Up @@ -1771,6 +1781,8 @@ def buildEnumVDecl_Enum(self, expand, groupinfo, groupName, keep_vk_member_name=
name = self.removeVk(name).lower()

name = self.removeStructEnumNameFromMember(groupName, name)
if name == 'or':
name = 'or_'

# Extension enumerants are only included if they are required
if self.isEnumRequired(elem):
Expand Down
Loading