mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
render/vulkan: check for barrier array alloc failure
This commit is contained in:
parent
bc7f8de842
commit
b4ad4671dc
1 changed files with 8 additions and 2 deletions
|
@ -833,8 +833,14 @@ static void vulkan_end(struct wlr_renderer *wlr_renderer) {
|
|||
|
||||
// insert acquire and release barriers for dmabuf-images
|
||||
unsigned barrier_count = wl_list_length(&renderer->foreign_textures) + 1;
|
||||
VkImageMemoryBarrier* acquire_barriers = calloc(barrier_count, sizeof(VkImageMemoryBarrier));
|
||||
VkImageMemoryBarrier* release_barriers = calloc(barrier_count, sizeof(VkImageMemoryBarrier));
|
||||
VkImageMemoryBarrier *acquire_barriers = calloc(barrier_count, sizeof(VkImageMemoryBarrier));
|
||||
VkImageMemoryBarrier *release_barriers = calloc(barrier_count, sizeof(VkImageMemoryBarrier));
|
||||
if (acquire_barriers == NULL || release_barriers == NULL) {
|
||||
wlr_log_errno(WLR_ERROR, "Allocation failed");
|
||||
free(acquire_barriers);
|
||||
free(release_barriers);
|
||||
return;
|
||||
}
|
||||
|
||||
struct wlr_vk_texture *texture, *tmp_tex;
|
||||
unsigned idx = 0;
|
||||
|
|
Loading…
Reference in a new issue