Skip to content

Add Mesh Shader Support to Vulkan#1177

Merged
manon-traverse merged 3 commits into
llvm:mainfrom
Traverse-Research:mesh-shader-support-vulkan
May 28, 2026
Merged

Add Mesh Shader Support to Vulkan#1177
manon-traverse merged 3 commits into
llvm:mainfrom
Traverse-Research:mesh-shader-support-vulkan

Conversation

@manon-traverse

@manon-traverse manon-traverse commented May 12, 2026

Copy link
Copy Markdown
Contributor

Add Mesh Shader support to Vulkan.
Graphics/MeshShaders/SimpleTriangle.test now passes on Vulkan.

@manon-traverse manon-traverse force-pushed the mesh-shader-support-vulkan branch from 1bde8ec to 4c8b57e Compare May 22, 2026 13:26
@manon-traverse manon-traverse marked this pull request as ready for review May 22, 2026 13:32
@manon-traverse manon-traverse force-pushed the mesh-shader-support-vulkan branch from 4c8b57e to c91f376 Compare May 27, 2026 15:18
Comment thread lib/API/VK/Device.cpp
Comment on lines 600 to +602
PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabel,
PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabel,
PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabel) {
PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabel,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we design a DebugFunctions struct for these too (in a separate PR)?

And do you recommend me to follow the same pattern in #1232?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes and yes

Comment thread lib/API/VK/Device.cpp Outdated
Comment thread lib/API/VK/Device.cpp Outdated
Comment thread lib/API/VK/Device.cpp
PipelineCI.renderPass = RenderPassHandle;

VkPipeline Pipeline = VK_NULL_HANDLE;
if (auto Err = VK::toError(vkCreateGraphicsPipelines(Device, VK_NULL_HANDLE,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Curious: did we previously factor out a helper for all the duplicate VkGraphicsPipelineCreateInfo state, that is the same for every graphics pipeline?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think we did?

@manon-traverse manon-traverse force-pushed the mesh-shader-support-vulkan branch from e00683c to 44e070e Compare May 28, 2026 14:47
@manon-traverse

Copy link
Copy Markdown
Contributor Author

CI only fails on test irrelevant to this PR, so I feel safe to merge this.

@manon-traverse manon-traverse merged commit 84bb5cb into llvm:main May 28, 2026
23 of 26 checks passed
@MarijnS95 MarijnS95 deleted the mesh-shader-support-vulkan branch May 28, 2026 15:54
alsepkow added a commit to alsepkow/offload-test-suite that referenced this pull request May 28, 2026
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). On platforms where the Vulkan SDK defines that macro
(e.g. the macOS runner with Vulkan 1.4.335), clang rejects the file with
`error: redefinition of 'EnabledDeviceExtensions' with a different type`.

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.

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 added a commit to alsepkow/offload-test-suite that referenced this pull request May 28, 2026
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>
bogner pushed a commit that referenced this pull request May 29, 2026
…#1251)

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.
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