vulkan: Add null descriptor bits to vk_pipeline_robustness_state

Fixes: c9eac89da8 ("nvk: Advertise VK_EXT_robustness2")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30663>
This commit is contained in:
Faith Ekstrand 2024-08-14 10:48:37 -05:00 committed by Marge Bot
parent c437f2e79c
commit 6ae401aa86
3 changed files with 15 additions and 0 deletions

View File

@ -295,6 +295,8 @@ vk_pipeline_robustness_state_fill(const struct vk_device *device,
rs->storage_buffers = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT;
rs->vertex_inputs = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT;
rs->images = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT;
rs->null_uniform_buffer_descriptor = device->enabled_features.nullDescriptor;
rs->null_storage_buffer_descriptor = device->enabled_features.nullDescriptor;
const VkPipelineRobustnessCreateInfoEXT *shader_info =
vk_find_struct_const(shader_stage_pNext,

View File

@ -76,6 +76,8 @@ struct vk_pipeline_robustness_state {
VkPipelineRobustnessBufferBehaviorEXT uniform_buffers;
VkPipelineRobustnessBufferBehaviorEXT vertex_inputs;
VkPipelineRobustnessImageBehaviorEXT images;
bool null_uniform_buffer_descriptor;
bool null_storage_buffer_descriptor;
};
/** Hash VkPipelineShaderStageCreateInfo info

View File

@ -393,6 +393,17 @@ vk_common_CreateShadersEXT(VkDevice _device,
.uniform_buffers = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT,
.vertex_inputs = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT,
.images = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT,
/* From the Vulkan 1.3.292 spec:
*
* "This extension [VK_EXT_robustness2] also adds support for “null
* descriptors, where VK_NULL_HANDLE can be used instead of a valid
* handle. Accesses to null descriptors have well-defined behavior,
* and do not rely on robustness."
*
* For now, default these to true.
*/
.null_uniform_buffer_descriptor = true,
.null_storage_buffer_descriptor = true,
};
/* From the Vulkan 1.3.274 spec: