From ea4257be32db088aaa4893f07943eb1a611a77d0 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Wed, 29 Mar 2023 16:32:12 +0200 Subject: [PATCH] vk/graphics_state: Add feedback_loop_input_only On turnip, there are two cases for feedback loops: - For feedback loops that involve input attachments, everything works as normal in GMEM mode but have to do a workaround in sysmem. - For feedback loops that may involve any texture, GMEM mode is impossible and we have to disable it. Currently we track this through a special flag on the pipeline, but this won't be practical in the future. Add a flag to the common renderpass state struct to patch this info through when using our own renderpass. Reviewed-by: Lionel Landwerlin Part-of: --- src/vulkan/runtime/vk_graphics_state.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vulkan/runtime/vk_graphics_state.h b/src/vulkan/runtime/vk_graphics_state.h index 192e7835ea7..3e0d1d9a391 100644 --- a/src/vulkan/runtime/vk_graphics_state.h +++ b/src/vulkan/runtime/vk_graphics_state.h @@ -670,6 +670,9 @@ struct vk_render_pass_state { */ VkPipelineCreateFlags pipeline_flags; + /* True if any feedback loops only involve input attachments. */ + bool feedback_loop_input_only; + /** VkPipelineRenderingCreateInfo::colorAttachmentCount */ uint8_t color_attachment_count;