-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extensions: Always return
pipeline
/shaders
, even on error
In `ash::Device` `create_compute_pipeline()` and `create_graphics_pipeline()` already return the list of pipelines regardless of the error code, as [documented in the Multiple Pipeline Creation chapter]. Callers are expected to scan the returned array for valid pipeline handles and either use or destroy them (when handling an error). Furthermore, the caller is guaranteed that all handles will be NULL after the first returned NULL handle when `VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT` is set. Unfortunately this is not documented on the individual pipeline creation functions, but the overarching documentation does state that this applies to the raytracing pipeline creation functions in addition to graphics and compute pipeline creation. Now `VK_AMDX_shader_enqueue`'s `vkCreateExecutionGraphPipelinesAMDX()` is already defining much more clearly on its own page that _all_ output pipelines in the array will be written, but might be set to `vk::Pipeline::null()` if creation for it failed. However `vkCreateShadersEXT` from `VK_EXT_shader_object` takes the crown by additionally detailing that the caller has to destroy any non-`vk::Handle::is_null()` `vk::ShaderEXT` in the resulting array when the caller does not wish to use this impartial result when an error was returned. All of this is being tackled upstream, where the documentation for all these functions except Shader Object creation will be made to reference the Multiple Pipeline Creation chapter. [documented in the Multiple Pipeline Creation chapter]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap10.html#pipelines-multiple
- Loading branch information
Showing
5 changed files
with
62 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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