mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 21:40:19 +00:00
gsk: Add a profiler mark for pipeline creation
This is the Vulkan equivalent of shader compilation, it could be expensive, so lets add a mark around it.
This commit is contained in:
parent
3f342d75b2
commit
f26efd9adf
@ -9,6 +9,7 @@
|
||||
|
||||
#include "gdk/gdkdisplayprivate.h"
|
||||
#include "gdk/gdkvulkancontextprivate.h"
|
||||
#include "gdk/gdkprofilerprivate.h"
|
||||
|
||||
struct _GskVulkanDevice
|
||||
{
|
||||
@ -949,6 +950,7 @@ gsk_vulkan_device_get_vk_pipeline (GskVulkanDevice *self,
|
||||
GdkDisplay *display;
|
||||
const char *version_string;
|
||||
char *vertex_shader_name, *fragment_shader_name;
|
||||
G_GNUC_UNUSED gint64 begin_time = GDK_PROFILER_CURRENT_TIME;
|
||||
|
||||
cache_key = (PipelineCacheKey) {
|
||||
.op_class = op_class,
|
||||
@ -1125,6 +1127,10 @@ gsk_vulkan_device_get_vk_pipeline (GskVulkanDevice *self,
|
||||
NULL,
|
||||
&pipeline);
|
||||
|
||||
gdk_profiler_end_markf (begin_time,
|
||||
"Create Vulkan pipeline frag=%s vert=%s",
|
||||
fragment_shader_name, vertex_shader_name);
|
||||
|
||||
g_free (fragment_shader_name);
|
||||
g_free (vertex_shader_name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user