1
0
Fork 0

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>
This commit is contained in:
Robert Mader 2023-05-16 17:21:06 +02:00 committed by Marge Bot
parent 18e06c2484
commit f73fdfb465

View file

@ -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 =