diff options
author | Robert Mader <robert.mader@collabora.com> | 2023-05-16 17:21:06 +0200 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2023-05-17 13:37:50 +0000 |
commit | f73fdfb4651887bc2520dea226b526b36493dc02 (patch) | |
tree | 95d7bdf41071b78b94797f413c91d224abe2c922 /src | |
parent | 18e06c248436625faf5f992030a333ef138550e0 (diff) | |
download | mutter-f73fdfb4651887bc2520dea226b526b36493dc02.tar.gz |
drm-buffer-gbm: Bail out early if FBO allocation fails
A failing allocation is non-fatal here, however if it fails later in a
lazy allocation triggered by `cogl_framebuffer_create_timestamp_query()`
we end up crashing. Thus force the allocation early, like we already do
in other places.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3004>
Diffstat (limited to 'src')
-rw-r--r-- | src/backends/native/meta-drm-buffer-gbm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backends/native/meta-drm-buffer-gbm.c b/src/backends/native/meta-drm-buffer-gbm.c index 17d18115f..86c60fd00 100644 --- a/src/backends/native/meta-drm-buffer-gbm.c +++ b/src/backends/native/meta-drm-buffer-gbm.c @@ -328,6 +328,9 @@ meta_drm_buffer_gbm_fill_timings (MetaDrmBuffer *buffer, cogl_fbo = cogl_offscreen_new_with_texture (COGL_TEXTURE (cogl_tex)); cogl_object_unref (cogl_tex); + if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (cogl_fbo), error)) + goto out; + if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_TIMESTAMP_QUERY)) { info->gpu_time_before_buffer_swap_ns = |