mirror of
https://github.com/brl/mutter.git
synced 2025-04-09 03:39:39 +00:00
renderer/native: Add tracing for 2nd GPU copies
These traces allow seeing how long the copy operations stall in libmutter, and which copy operations actually get used. https://gitlab.gnome.org/GNOME/mutter/merge_requests/615
This commit is contained in:
parent
3794df608c
commit
720f363241
@ -70,6 +70,7 @@
|
|||||||
#include "backends/native/meta-renderer-native.h"
|
#include "backends/native/meta-renderer-native.h"
|
||||||
#include "cogl/cogl.h"
|
#include "cogl/cogl.h"
|
||||||
#include "cogl/cogl-framebuffer.h"
|
#include "cogl/cogl-framebuffer.h"
|
||||||
|
#include "cogl/cogl-trace.h"
|
||||||
#include "core/boxes-private.h"
|
#include "core/boxes-private.h"
|
||||||
|
|
||||||
#ifndef EGL_DRM_MASTER_FD_EXT
|
#ifndef EGL_DRM_MASTER_FD_EXT
|
||||||
@ -1773,6 +1774,9 @@ copy_shared_framebuffer_gpu (CoglOnscreen *onscreen,
|
|||||||
MetaDrmBufferGbm *buffer_gbm;
|
MetaDrmBufferGbm *buffer_gbm;
|
||||||
struct gbm_bo *bo;
|
struct gbm_bo *bo;
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (CopySharedFramebufferSecondaryGpu,
|
||||||
|
"FB Copy (secondary GPU)");
|
||||||
|
|
||||||
if (!meta_egl_make_current (egl,
|
if (!meta_egl_make_current (egl,
|
||||||
renderer_gpu_data->egl_display,
|
renderer_gpu_data->egl_display,
|
||||||
secondary_gpu_state->egl_surface,
|
secondary_gpu_state->egl_surface,
|
||||||
@ -1867,6 +1871,9 @@ copy_shared_framebuffer_primary_gpu (CoglOnscreen *onscre
|
|||||||
CoglOffscreen *cogl_fbo;
|
CoglOffscreen *cogl_fbo;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (CopySharedFramebufferPrimaryGpu,
|
||||||
|
"FB Copy (primary GPU)");
|
||||||
|
|
||||||
primary_gpu_data = meta_renderer_native_get_gpu_data (renderer_native,
|
primary_gpu_data = meta_renderer_native_get_gpu_data (renderer_native,
|
||||||
renderer_native->primary_gpu_kms);
|
renderer_native->primary_gpu_kms);
|
||||||
if (!primary_gpu_data->secondary.has_EGL_EXT_image_dma_buf_import_modifiers)
|
if (!primary_gpu_data->secondary.has_EGL_EXT_image_dma_buf_import_modifiers)
|
||||||
@ -2030,6 +2037,9 @@ copy_shared_framebuffer_cpu (CoglOnscreen *onscreen,
|
|||||||
gboolean ret;
|
gboolean ret;
|
||||||
MetaDrmBufferDumb *buffer_dumb;
|
MetaDrmBufferDumb *buffer_dumb;
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (CopySharedFramebufferCpu,
|
||||||
|
"FB Copy (CPU)");
|
||||||
|
|
||||||
dumb_fb = secondary_gpu_get_next_dumb_buffer (secondary_gpu_state);
|
dumb_fb = secondary_gpu_get_next_dumb_buffer (secondary_gpu_state);
|
||||||
|
|
||||||
g_assert (cogl_framebuffer_get_width (framebuffer) == dumb_fb->width);
|
g_assert (cogl_framebuffer_get_width (framebuffer) == dumb_fb->width);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user