Skip to content

[VK] Fix EnabledDeviceExtensions redefinition and drop on macOS build#1251

Merged
bogner merged 1 commit into
llvm:mainfrom
alsepkow:alex/fix-vk-device-mac-build
May 29, 2026
Merged

[VK] Fix EnabledDeviceExtensions redefinition and drop on macOS build#1251
bogner merged 1 commit into
llvm:mainfrom
alsepkow:alex/fix-vk-device-mac-build

Conversation

@alsepkow

@alsepkow alsepkow commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Fixes a redefinition of EnabledDeviceExtensions in VulkanDevice::create introduced by the parallel merge of #1177 and #1195, plus a related silent drop of VK_EXT_mesh_shader when both extensions are enabled.

Assisted by Claude Opus 4.7.

@alsepkow alsepkow force-pushed the alex/fix-vk-device-mac-build branch from 6fcfc0b to 3039030 Compare May 28, 2026 22:59
Two local variables both named `EnabledDeviceExtensions` were declared in
the same enclosing scope of `VulkanDevice::create`: one added by llvm#1177
(mesh shader) and one added inside
`#ifdef VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME` by llvm#1195
(InterlockedOr). Any platform whose Vulkan SDK defines that macro rejects
the file. CI surfaced it first on the macOS runner (Vulkan 1.4.335 +
clang) because that job ran ahead of the Windows jobs and short-circuited
the matrix, but Windows is equally affected: Windows VK CI uses Vulkan
SDK 1.4.350.0, and a local Windows + MSVC + Vulkan SDK 1.4.341.1 build
reproduces the failure as `error C2371: 'EnabledDeviceExtensions':
redefinition`.

Beyond the build break, the inner block also overwrote
`DeviceInfo.enabledExtensionCount` and `ppEnabledExtensionNames` that the
mesh-shader block had populated, silently dropping `VK_EXT_mesh_shader`
whenever both extensions were available. Neither bug existed in either
PR in isolation; both are post-merge artifacts.

Append the AtomicInt64 extension to the single `EnabledDeviceExtensions`
vector and assign the `DeviceInfo` extension fields once, after both
blocks.

Assisted-by: Claude Opus 4.7 (claude-opus-4.7-high)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alsepkow alsepkow force-pushed the alex/fix-vk-device-mac-build branch from 3039030 to 008aec0 Compare May 28, 2026 23:08
@alsepkow alsepkow marked this pull request as ready for review May 28, 2026 23:09
@alsepkow

Copy link
Copy Markdown
Collaborator Author

@manon-traverse @bob80905 Just FYI. Resolving a post merge issue from your recent PRs.

@bogner bogner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix looks correct, but could you please give this a more concise commit message? The current one is a lot of AI cruft that obscures how simple of a fix this is.

@bogner bogner merged commit eb9e330 into llvm:main May 29, 2026
25 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants