wsi->ResetFences(device, 1, &swapchain->fences[image_index]);
}
+ struct wsi_image *image =
+ swapchain->get_wsi_image(swapchain, image_index);
+
+ struct wsi_memory_signal_submit_info mem_signal = {
+ .sType = VK_STRUCTURE_TYPE_WSI_MEMORY_SIGNAL_SUBMIT_INFO_MESA,
+ .pNext = NULL,
+ .memory = image->memory,
+ };
+
VkSubmitInfo submit_info = {
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,
- .pNext = NULL,
+ .pNext = &mem_signal,
};
VkPipelineStageFlags *stage_flags = NULL;
/* If we are using prime blits, we need to perform the blit now. The
* command buffer is attached to the image.
*/
- struct wsi_image *image =
- swapchain->get_wsi_image(swapchain, image_index);
submit_info.commandBufferCount = 1;
submit_info.pCommandBuffers =
&image->prime.blit_cmd_buffers[queue_family_index];
+ mem_signal.memory = image->prime.memory;
}
result = wsi->QueueSubmit(queue, 1, &submit_info, swapchain->fences[image_index]);
#define VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA (VkStructureType)1000001003
#define VK_STRUCTURE_TYPE_WSI_FORMAT_MODIFIER_PROPERTIES_LIST_MESA (VkStructureType)1000001004
#define VK_STRUCTURE_TYPE_WSI_SURFACE_SUPPORTED_COUNTERS_MESA (VkStructureType)1000001005
+#define VK_STRUCTURE_TYPE_WSI_MEMORY_SIGNAL_SUBMIT_INFO_MESA (VkStructureType)1000001006
struct wsi_image_create_info {
VkStructureType sType;
};
+/* To be chained into VkSubmitInfo */
+struct wsi_memory_signal_submit_info {
+ VkStructureType sType;
+ const void *pNext;
+ VkDeviceMemory memory;
+};
+
struct wsi_fence {
VkDevice device;
const struct wsi_device *wsi_device;