vk/graphics_state: Add vk_pipeline_flags_feedback_loops helper

This will be useful for combining dynamic and static feedback loop
state.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25436>
This commit is contained in:
Connor Abbott
2023-05-26 15:42:52 +02:00
committed by Marge Bot
parent a02d1cfa9e
commit 2e83aed8b3

View File

@@ -694,6 +694,19 @@ struct vk_render_pass_state {
uint8_t depth_stencil_attachment_samples; uint8_t depth_stencil_attachment_samples;
}; };
static inline VkImageAspectFlags
vk_pipeline_flags_feedback_loops(VkPipelineCreateFlags2KHR flags)
{
VkImageAspectFlags feedback_loops = 0;
if (flags &
VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT)
feedback_loops |= VK_IMAGE_ASPECT_COLOR_BIT;
if (flags &
VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT)
feedback_loops |= VK_IMAGE_ASPECT_DEPTH_BIT;
return feedback_loops;
}
/** Struct representing all dynamic graphics state /** Struct representing all dynamic graphics state
* *
* Before invoking any core functions, the driver must properly populate * Before invoking any core functions, the driver must properly populate