mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
vulkan: fix wrong stages or access in barriers
While working on !7165 we found out that some parameters for barriers were wrong or the destination pipeline stage was too coarse. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7200>
This commit is contained in:
parent
58db0e6ed8
commit
dd4027388e
4 changed files with 7 additions and 10 deletions
|
@ -685,7 +685,7 @@ _raw_to_image_perform (gpointer impl, GstBuffer * inbuf, GstBuffer ** outbuf)
|
|||
cmd_buf = raw->exec->cmd_buf;
|
||||
|
||||
if (!gst_vulkan_operation_add_frame_barrier (raw->exec, *outbuf,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, NULL))
|
||||
goto unlock_error;
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ get_output_buffer (GstVulkanDecoder * dec, VkFormat vk_format,
|
|||
|
||||
gst_vulkan_image_buffer_pool_config_set_allocation_params (config, usage,
|
||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT,
|
||||
VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR, VK_ACCESS_TRANSFER_WRITE_BIT);
|
||||
VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR, VK_ACCESS_NONE);
|
||||
gst_vulkan_image_buffer_pool_config_set_decode_caps (config, profile_caps);
|
||||
|
||||
gst_caps_unref (profile_caps);
|
||||
|
@ -188,8 +188,7 @@ download_and_check_output_buffer (GstVulkanDecoder * dec, VkFormat vk_format,
|
|||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT);
|
||||
|
||||
gst_vulkan_operation_add_frame_barrier (exec, pic->out,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_READ_BIT,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, NULL);
|
||||
|
||||
barriers = gst_vulkan_operation_retrieve_image_barriers (exec);
|
||||
|
|
|
@ -231,8 +231,7 @@ upload_buffer_to_image (GstBufferPool * pool, GstBuffer * inbuf,
|
|||
}
|
||||
|
||||
if (!gst_vulkan_operation_add_dependency_frame (exec, *outbuf,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT))
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT))
|
||||
goto error;
|
||||
|
||||
if (!gst_vulkan_operation_begin (exec, &error))
|
||||
|
@ -241,7 +240,7 @@ upload_buffer_to_image (GstBufferPool * pool, GstBuffer * inbuf,
|
|||
cmd_buf = exec->cmd_buf;
|
||||
|
||||
if (!gst_vulkan_operation_add_frame_barrier (exec, *outbuf,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, NULL))
|
||||
goto unlock_error;
|
||||
|
||||
|
|
|
@ -236,8 +236,7 @@ upload_buffer_to_image (GstBufferPool * pool, GstBuffer * inbuf,
|
|||
}
|
||||
|
||||
if (!gst_vulkan_operation_add_dependency_frame (exec, *outbuf,
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT))
|
||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT))
|
||||
goto error;
|
||||
|
||||
if (!gst_vulkan_operation_begin (exec, &error))
|
||||
|
@ -246,7 +245,7 @@ upload_buffer_to_image (GstBufferPool * pool, GstBuffer * inbuf,
|
|||
cmd_buf = exec->cmd_buf;
|
||||
|
||||
if (!gst_vulkan_operation_add_frame_barrier (exec, *outbuf,
|
||||
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, NULL))
|
||||
goto unlock_error;
|
||||
|
||||
|
|
Loading…
Reference in a new issue