From 57d198eeeaae3dbf20a2fac4a9a492c3ea32c750 Mon Sep 17 00:00:00 2001 From: Anton Oreskin Date: Tue, 22 Sep 2026 22:13:29 +0200 Subject: [PATCH 1/3] fix: preserve V3-compatible Vulkan generated names and handles --- src/vgenerator.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/vgenerator.py b/src/vgenerator.py index 51a9b9c..7d40601 100644 --- a/src/vgenerator.py +++ b/src/vgenerator.py @@ -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 = [] @@ -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, @@ -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): From ce3637a8f076e2c9b9bc90403558d77b4838087f Mon Sep 17 00:00:00 2001 From: Anton Oreskin Date: Tue, 22 Sep 2026 22:17:36 +0200 Subject: [PATCH 2/3] ci: pin generator workflow actions to commits --- .github/workflows/historical-registry-ci.yml | 32 +++++++++---------- .../workflows/publish-compatibility-tags.yml | 14 ++++---- .../update_bindings_and_push_to_vulkan.yml | 22 ++++++------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/historical-registry-ci.yml b/.github/workflows/historical-registry-ci.yml index e4c6349..e71ed8d 100644 --- a/.github/workflows/historical-registry-ci.yml +++ b/.github/workflows/historical-registry-ci.yml @@ -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: | @@ -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 @@ -104,24 +104,24 @@ 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 with: sdkVersion: 1.4.309.0 - name: Generate and compile historical bindings diff --git a/.github/workflows/publish-compatibility-tags.yml b/.github/workflows/publish-compatibility-tags.yml index 9f62153..5e5e89a 100644 --- a/.github/workflows/publish-compatibility-tags.yml +++ b/.github/workflows/publish-compatibility-tags.yml @@ -18,33 +18,33 @@ 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 with: sdkVersion: 1.4.309.0 - name: Regenerate and validate every historical release diff --git a/.github/workflows/update_bindings_and_push_to_vulkan.yml b/.github/workflows/update_bindings_and_push_to_vulkan.yml index f4ccb80..10f03d9 100644 --- a/.github/workflows/update_bindings_and_push_to_vulkan.yml +++ b/.github/workflows/update_bindings_and_push_to_vulkan.yml @@ -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 }} @@ -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 @@ -107,7 +107,7 @@ 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 with: sdkVersion: 1.4.309.0 - name: Download Volk and compile smoke test @@ -120,7 +120,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 @@ -134,12 +134,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 From 9aff8c1da126c23620994bd58a46c03e17950fb5 Mon Sep 17 00:00:00 2001 From: Anton Oreskin Date: Tue, 22 Sep 2026 22:27:19 +0200 Subject: [PATCH 3/3] ci: keep VulkanCI release artifact tag with SHA-pinned action --- .github/workflows/historical-registry-ci.yml | 3 +++ .github/workflows/publish-compatibility-tags.yml | 3 +++ .github/workflows/update_bindings_and_push_to_vulkan.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/historical-registry-ci.yml b/.github/workflows/historical-registry-ci.yml index e71ed8d..5b8e263 100644 --- a/.github/workflows/historical-registry-ci.yml +++ b/.github/workflows/historical-registry-ci.yml @@ -122,6 +122,9 @@ jobs: cache-dependency-path: .github/generator-requirements.txt - run: python -m pip install --requirement .github/generator-requirements.txt - 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 diff --git a/.github/workflows/publish-compatibility-tags.yml b/.github/workflows/publish-compatibility-tags.yml index 5e5e89a..f33a9c4 100644 --- a/.github/workflows/publish-compatibility-tags.yml +++ b/.github/workflows/publish-compatibility-tags.yml @@ -45,6 +45,9 @@ jobs: cache-dependency-path: .github/generator-requirements.txt - run: python -m pip install --requirement .github/generator-requirements.txt - 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 diff --git a/.github/workflows/update_bindings_and_push_to_vulkan.yml b/.github/workflows/update_bindings_and_push_to_vulkan.yml index 10f03d9..4ae7334 100644 --- a/.github/workflows/update_bindings_and_push_to_vulkan.yml +++ b/.github/workflows/update_bindings_and_push_to_vulkan.yml @@ -108,6 +108,9 @@ jobs: git -C vulkanheaders rev-parse HEAD > REGISTRY_COMMIT grep -Eq '^[0-9a-f]{40}$' REGISTRY_COMMIT - 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