mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
c/main: Name Vulkan objects
This commit is contained in:
parent
b90c397997
commit
c75db60478
|
@ -184,6 +184,8 @@ ensure_scratch(struct comp_mirror_to_debug_gui *m, struct vk_bundle *vk)
|
|||
return false;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, IMAGE_VIEW, m->bounce.unorm_view, "comp_mirror_debug_to_gui image view bounce.unorm_view");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -297,6 +299,8 @@ comp_mirror_init(struct comp_mirror_to_debug_gui *m,
|
|||
return ret;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, COMMAND_POOL, m->cmd_pool.pool, "comp_mirror_to_debug_gui command pool");
|
||||
|
||||
struct vk_descriptor_pool_info blit_pool_info = {
|
||||
.uniform_per_descriptor_count = 0,
|
||||
.sampler_per_descriptor_count = 1,
|
||||
|
@ -311,16 +315,24 @@ comp_mirror_init(struct comp_mirror_to_debug_gui *m,
|
|||
&blit_pool_info, // info
|
||||
&m->blit.descriptor_pool)); // out_descriptor_pool
|
||||
|
||||
VK_NAME_OBJECT(vk, DESCRIPTOR_POOL, m->blit.descriptor_pool, "comp_mirror_to_debug_ui blit descriptor pool");
|
||||
|
||||
C(vk_create_pipeline_cache(vk, &m->blit.pipeline_cache));
|
||||
|
||||
VK_NAME_OBJECT(vk, PIPELINE_CACHE, m->blit.pipeline_cache, "comp_mirror_to_debug_ui blit pipeline cache");
|
||||
|
||||
C(create_blit_descriptor_set_layout(vk, &m->blit.descriptor_set_layout));
|
||||
|
||||
VK_NAME_OBJECT(vk, DESCRIPTOR_SET_LAYOUT, m->blit.descriptor_set_layout,
|
||||
"comp_mirror_to_debug_ui blit descriptor set layout");
|
||||
|
||||
C(create_blit_pipeline_layout( //
|
||||
vk, // vk_bundle
|
||||
m->blit.descriptor_set_layout, // descriptor_set_layout
|
||||
&m->blit.pipeline_layout)); // out_pipeline_layout
|
||||
|
||||
VK_NAME_OBJECT(vk, PIPELINE_LAYOUT, m->blit.pipeline_layout, "comp_mirror_to_debug_ui blit pipeline layout");
|
||||
|
||||
C(vk_create_compute_pipeline( //
|
||||
vk, // vk_bundle
|
||||
m->blit.pipeline_cache, // pipeline_cache
|
||||
|
@ -329,6 +341,8 @@ comp_mirror_init(struct comp_mirror_to_debug_gui *m,
|
|||
NULL, // specialization_info
|
||||
&m->blit.pipeline)); // out_compute_pipeline
|
||||
|
||||
VK_NAME_OBJECT(vk, PIPELINE, m->blit.pipeline, "comp_mirror_to_debug_ui blit pipeline");
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -432,6 +446,8 @@ comp_mirror_do_blit(struct comp_mirror_to_debug_gui *m,
|
|||
return;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, DESCRIPTOR_SET, descriptor_set, "comp_mirror_to_debug_ui blit descriptor set");
|
||||
|
||||
struct vk_cmd_pool *pool = &m->cmd_pool;
|
||||
|
||||
// For writing and submitting commands.
|
||||
|
@ -445,6 +461,8 @@ comp_mirror_do_blit(struct comp_mirror_to_debug_gui *m,
|
|||
return;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, COMMAND_BUFFER, cmd, "comp_mirror_to_debug_ui command buffer");
|
||||
|
||||
// Barrier arguments.
|
||||
VkImageSubresourceRange first_color_level_subresource_range = {
|
||||
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
|
||||
|
|
|
@ -129,6 +129,9 @@ create_image_views(struct comp_target_swapchain *cts)
|
|||
cts->surface.format.format, // format
|
||||
subresource_range, // subresource_range
|
||||
&cts->base.images[i].view); // out_view
|
||||
|
||||
|
||||
VK_NAME_OBJECT(vk, IMAGE_VIEW, cts->base.images[i].view, "comp_target_swapchain image view");
|
||||
}
|
||||
|
||||
free(images);
|
||||
|
@ -601,11 +604,17 @@ target_init_semaphores(struct comp_target_swapchain *cts)
|
|||
COMP_ERROR(cts->base.c, "vkCreateSemaphore: %s", vk_result_string(ret));
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, SEMAPHORE, cts->base.semaphores.present_complete,
|
||||
"comp_target_swapchain semaphore present complete");
|
||||
|
||||
cts->base.semaphores.render_complete_is_timeline = false;
|
||||
ret = vk->vkCreateSemaphore(vk->device, &info, NULL, &cts->base.semaphores.render_complete);
|
||||
if (ret != VK_SUCCESS) {
|
||||
COMP_ERROR(cts->base.c, "vkCreateSemaphore: %s", vk_result_string(ret));
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, SEMAPHORE, cts->base.semaphores.render_complete,
|
||||
"comp_target_swapchain semaphore render complete");
|
||||
}
|
||||
|
||||
|
||||
|
@ -782,6 +791,7 @@ comp_target_swapchain_create_images(struct comp_target *ct,
|
|||
return;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, SWAPCHAIN_KHR, cts->swapchain.handle, "comp_target_swapchain swapchain");
|
||||
|
||||
/*
|
||||
* Set target info.
|
||||
|
|
|
@ -125,6 +125,7 @@ comp_window_android_create_surface(struct comp_window_android *cwa,
|
|||
return ret;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, SURFACE_KHR, surface, "comp_window_android surface");
|
||||
*out_surface = surface;
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
|
@ -268,6 +268,7 @@ comp_window_direct_create_surface(struct comp_target_swapchain *cts,
|
|||
return ret;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(get_vk(cts), SURFACE_KHR, surface, "comp_target_swapchain direct surface");
|
||||
cts->surface.handle = surface;
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
|
@ -167,6 +167,7 @@ comp_window_mswin_create_surface(struct comp_window_mswin *w, VkSurfaceKHR *out_
|
|||
return ret;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, SURFACE_KHR, surface, "comp_window_mswin surface");
|
||||
*out_surface = surface;
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
|
@ -152,12 +152,16 @@ comp_window_peek_create(struct comp_compositor *c)
|
|||
goto err_free;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, COMMAND_POOL, w->pool.pool, "comp_window_peek command pool");
|
||||
|
||||
ret = vk_cmd_pool_create_cmd_buffer(vk, &w->pool, &w->cmd);
|
||||
if (ret != VK_SUCCESS) {
|
||||
COMP_ERROR(c, "vk_cmd_pool_create_cmd_buffer: %s", vk_result_string(ret));
|
||||
goto err_pool;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, COMMAND_BUFFER, w->cmd, "comp_window_peek command buffer");
|
||||
|
||||
|
||||
/*
|
||||
* SDL
|
||||
|
|
|
@ -238,6 +238,7 @@ comp_window_wayland_create_surface(struct comp_window_wayland *w, VkSurfaceKHR *
|
|||
return ret;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, SURFACE_KHR, surface, "comp_window_wayland surface");
|
||||
*out_surface = surface;
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
|
@ -423,6 +423,7 @@ comp_window_xcb_create_surface(struct comp_window_xcb *w, VkSurfaceKHR *out_surf
|
|||
return ret;
|
||||
}
|
||||
|
||||
VK_NAME_OBJECT(vk, SURFACE_KHR, surface, "comp_window_xcb surface");
|
||||
*out_surface = surface;
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue