GskVulkanOp op;
GskVulkanImage *image;
+ VkImageLayout final_layout;
};
static void
VkPipelineLayout pipeline_layout,
VkCommandBuffer command_buffer)
{
+ GskVulkanRenderPassEndOp *self = (GskVulkanRenderPassEndOp *) op;
+
vkCmdEndRenderPass (command_buffer);
+ gsk_vulkan_image_set_vk_image_layout (self->image,
+ self->final_layout,
+ gsk_vulkan_image_get_vk_access (self->image));
return op->next;
}
const graphene_vec2_t *scale,
const graphene_rect_t *viewport,
GskRenderNode *node,
- gboolean is_root)
+ VkImageLayout initial_layout,
+ VkImageLayout final_layout)
{
GskVulkanRenderPassOp *self;
GskVulkanRenderPassEndOp *end;
self = (GskVulkanRenderPassOp *) gsk_vulkan_op_alloc (render, &GSK_VULKAN_RENDER_PASS_OP_CLASS);
self->image = image;
- self->initial_layout = VK_IMAGE_LAYOUT_UNDEFINED;
- self->final_layout = is_root ? VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
- :VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
+ self->initial_layout = initial_layout;
+ self->final_layout = final_layout;
cairo_region_get_extents (clip, &self->area);
self->viewport_size = viewport->size;
end = (GskVulkanRenderPassEndOp *) gsk_vulkan_op_alloc (render, &GSK_VULKAN_RENDER_PASS_END_OP_CLASS);
end->image = g_object_ref (image);
+ end->final_layout = final_layout;
}
GskVulkanImage *
scale,
&view,
node,
- FALSE);
+ VK_IMAGE_LAYOUT_UNDEFINED,
+ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
cairo_region_destroy (clip);
const graphene_vec2_t *scale,
const graphene_rect_t *viewport,
GskRenderNode *node,
- gboolean is_root);
+ VkImageLayout initial_layout,
+ VkImageLayout final_layout);
GskVulkanImage * gsk_vulkan_render_pass_op_offscreen (GskVulkanRender *render,
GdkVulkanContext *context,
const graphene_vec2_t *scale,