Fix wrong reset of command buffers in sample fragment_shading_rate_dynamic.#992
Merged
marty-johnson59 merged 1 commit intoKhronosGroup:mainfrom Mar 26, 2024
Conversation
SaschaWillems
approved these changes
Mar 21, 2024
Collaborator
|
@marty-johnson59 : Can we merge this? The sample fixed by this PR will currently crash, at least if one tries to run it with validation. |
Contributor
|
Yep, will do. LMK if issues. |
19 tasks
jeroenbakker-atmind
pushed a commit
to jeroenbakker-atmind/Vulkan-Samples
that referenced
this pull request
Mar 27, 2024
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.
Description
Without this fix, I got the following validation layer error when running the fragment_shading_rate_dynamic sample:
Validation Error: [ VUID-vkQueueSubmit-pCommandBuffers-00070 ] Object 0: handle = 0x223ba20f060, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xaeecdc0b | vkQueueSubmit(): pSubmits[0].pCommandBuffers[0] VkCommandBuffer 0x223ba20f060[] is unrecorded and contains no commands. The Vulkan spec states: Each element of the pCommandBuffers member of each element of pSubmits must be in the pending or executable state (https://vulkan.lunarg.com/doc/view/1.3.275.0/windows/1.3-extensions/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00070)The reason was, that the call to
vkResetCommandPoolnot only reset thesmall_command_buffers, but also thecompute_buffer[].command_buffers.Creating the
command_poolwithVK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BITand resetting thesmall_command_buffersby calls tovkResetCommandBufferresolves that error.Build tested on Win10 with VS2022. Run tested on Win10 with NVidia GPU.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
Sample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: