diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2023-04-14 16:27:42 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2023-04-14 16:43:04 -0300 |
commit | 94b1a7837848e25f6e58af5e57bff71c6bcc2296 (patch) | |
tree | 3e26af6db0b8658685be2e0347ad8636cab09617 /gsk/vulkan | |
parent | 8134daf843e90095d8c0732b4eea94242f9e6c89 (diff) | |
download | gtk+-94b1a7837848e25f6e58af5e57bff71c6bcc2296.tar.gz |
gsk/vulkan/render: Download image before reset
gsk_vulkan_render_download_target() currently resets the uploader
objects before downloading the image that it produces. This is
problematic because there might be unreleased buffers and images
in the command queue.
In particular, this can make validation layers complain about the
glyph atlas - of all things! - upload buffer being released while
still being used by the command queue.
Fix that by resetting the uploader after downloading the image.
Diffstat (limited to 'gsk/vulkan')
-rw-r--r-- | gsk/vulkan/gskvulkanrender.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gsk/vulkan/gskvulkanrender.c b/gsk/vulkan/gskvulkanrender.c index 586678c2e4..20ee28a218 100644 --- a/gsk/vulkan/gskvulkanrender.c +++ b/gsk/vulkan/gskvulkanrender.c @@ -647,9 +647,12 @@ gsk_vulkan_render_draw (GskVulkanRender *self) GdkTexture * gsk_vulkan_render_download_target (GskVulkanRender *self) { + GdkTexture *texture; + + texture = gsk_vulkan_image_download (self->target, self->uploader); gsk_vulkan_uploader_reset (self->uploader); - return gsk_vulkan_image_download (self->target, self->uploader); + return texture; } static void |