[VK] Fix EnabledDeviceExtensions redefinition and drop on macOS build#1251
Merged
Conversation
6fcfc0b to
3039030
Compare
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>
3039030 to
008aec0
Compare
bob80905
approved these changes
May 28, 2026
Collaborator
Author
|
@manon-traverse @bob80905 Just FYI. Resolving a post merge issue from your recent PRs. |
bogner
approved these changes
May 28, 2026
bogner
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a redefinition of
EnabledDeviceExtensionsinVulkanDevice::createintroduced by the parallel merge of #1177 and #1195, plus a related silent drop ofVK_EXT_mesh_shaderwhen both extensions are enabled.Assisted by Claude Opus 4.7.