avutil/vulkan: Avoid shadowing

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2024-03-03 17:09:33 +01:00
parent 0a05577d1e
commit c0d31cec7f

View File

@@ -1308,13 +1308,15 @@ void ff_vk_frame_barrier(FFVulkanContext *s, FFVkExecContext *e,
VkImageLayout new_layout, VkImageLayout new_layout,
uint32_t new_qf) uint32_t new_qf)
{ {
int i, found; int found = -1;
AVVkFrame *vkf = (AVVkFrame *)pic->data[0]; AVVkFrame *vkf = (AVVkFrame *)pic->data[0];
const int nb_images = ff_vk_count_images(vkf); const int nb_images = ff_vk_count_images(vkf);
for (i = 0; i < e->nb_frame_deps; i++) for (int i = 0; i < e->nb_frame_deps; i++)
if (e->frame_deps[i]->data[0] == pic->data[0]) if (e->frame_deps[i]->data[0] == pic->data[0]) {
if (e->frame_update[i])
found = i;
break; break;
found = (i < e->nb_frame_deps) && (e->frame_update[i]) ? i : -1; }
for (int i = 0; i < nb_images; i++) { for (int i = 0; i < nb_images; i++) {
bar[*nb_bar] = (VkImageMemoryBarrier2) { bar[*nb_bar] = (VkImageMemoryBarrier2) {