vulkan: keep track of mapped memory in the buffer structure

Can/could be useful to know which buffers are mapped.
master
Lynne 2 months ago
parent 4d19be287f
commit 98f6d43146
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
  1. 6
      libavutil/vulkan.c

@ -1064,7 +1064,7 @@ int ff_vk_map_buffers(FFVulkanContext *s, FFVkBuffer **buf, uint8_t *mem[],
ff_vk_ret2str(ret));
return AVERROR_EXTERNAL;
}
mem[i] = dst;
mem[i] = buf[i]->mapped_mem = dst;
}
if (!invalidate)
@ -1126,8 +1126,10 @@ int ff_vk_unmap_buffers(FFVulkanContext *s, FFVkBuffer **buf, int nb_buffers,
}
}
for (int i = 0; i < nb_buffers; i++)
for (int i = 0; i < nb_buffers; i++) {
vk->UnmapMemory(s->hwctx->act_dev, buf[i]->mem);
buf[i]->mapped_mem = NULL;
}
return err;
}

Loading…
Cancel
Save