Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't report violations of VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912 #3809

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

jimblandy
Copy link
Member

@jimblandy jimblandy commented May 28, 2023

As described in Vulkan-ValidationLayers#5671, the validation layers don't understand debug ranges paired across different command buffers on the same queue, even though the Vulkan spec says:

An application may open a debug label region in one command buffer and close it in another, or otherwise split debug label regions across multiple command buffers or multiple queue submissions. When viewed from the linear series of submissions to a single queue, the calls to vkCmdBeginDebugUtilsLabelEXT and vkCmdEndDebugUtilsLabelEXT must be matched and balanced.

Until this is fixed, wgpu should ignore this validation error to reduce noise in test runs.

Fixes #3733.

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@FrankenApps

This comment was marked as resolved.

@jimblandy

This comment was marked as resolved.

@jimblandy
Copy link
Member Author

jimblandy commented May 31, 2023

Layer properties in KhronosGroup/Vulkan-ValidationLayers@a90644606 (after introduction of 01912 test):

LayerProperties {
    layer_name: "VK_LAYER_KHRONOS_validation",
    spec_version: 4206832, // 1.3.240
    implementation_version: 1,
    description: "Khronos Validation Layer",
}

@jimblandy
Copy link
Member Author

jimblandy commented May 31, 2023

Layer properties in KhronosGroup/Vulkan-ValidationLayers@a54744d67 (current main):

JIMB: instance layer: LayerProperties {
    layer_name: "VK_LAYER_KHRONOS_validation",
    spec_version: 4206842, // 1.3.250
    implementation_version: 1,
    description: "Khronos Validation Layer",
}

@jimblandy jimblandy force-pushed the silence-vuid-01912 branch 2 times, most recently from 270c3fa to 4e2bd46 Compare June 1, 2023 02:18
@jimblandy
Copy link
Member Author

Okay, this version of the PR supplies the validation layer description and version to the debug utils messenger callback, and checks them to ensure that we're only filtering out errors from affected versions of Vulkan-ValidationLayers.

But I think it does violence to the API of vulkan::Instance::from_raw, so I want to look at it again tomorrow.

@jimblandy jimblandy force-pushed the silence-vuid-01912 branch from 4e2bd46 to 6c46605 Compare June 1, 2023 02:20
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Would be great to get this in as #3830 is now hitting it.

wgpu-hal/src/vulkan/instance.rs Outdated Show resolved Hide resolved
wgpu-hal/src/vulkan/instance.rs Show resolved Hide resolved
@jimblandy jimblandy force-pushed the silence-vuid-01912 branch from 6c46605 to 485c4b8 Compare June 6, 2023 01:39
@jimblandy jimblandy marked this pull request as ready for review June 6, 2023 01:39
…fer-01912

As described in [Vulkan-ValidationLayers#5671], the validation layers don't understand debug ranges paired across different command buffers on the same queue, even though the Vulkan spec says:

> An application may open a debug label region in one command buffer and close it in another, or otherwise split debug label regions across multiple command buffers or multiple queue submissions. When viewed from the linear series of submissions to a single queue, the calls to vkCmdBeginDebugUtilsLabelEXT and vkCmdEndDebugUtilsLabelEXT must be matched and balanced.

Until this is fixed, wgpu should ignore this validation error to reduce noise in test runs.

Fixes gfx-rs#3733.

[Vulkan-ValidationLayers#5671]: KhronosGroup/Vulkan-ValidationLayers#5671
@jimblandy jimblandy force-pushed the silence-vuid-01912 branch from 485c4b8 to 220d58b Compare June 6, 2023 04:59
@jimblandy jimblandy requested a review from cwfitzgerald June 6, 2023 05:01
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Nice!

@cwfitzgerald cwfitzgerald merged commit 3f0aed7 into gfx-rs:trunk Jun 6, 2023
@jimblandy jimblandy deleted the silence-vuid-01912 branch June 6, 2023 13:44
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.

Performing a RenderPass inside a debug group results in Vulkan validation errors
4 participants