Mageia Bugzilla – Attachment 7828 Details for
Bug 18465
gnome-shell-3.20.2 crashes shortly after login on NVidia hardware
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
mgarepo `svn diff' output for a new gnome-shell release
gnome-shell-3.20.2-2.diff (text/plain), 5.68 KB, created by
Theodoros Kalamatianos
on 2016-05-21 19:51:08 CEST
(
hide
)
Description:
mgarepo `svn diff' output for a new gnome-shell release
Filename:
MIME Type:
Creator:
Theodoros Kalamatianos
Created:
2016-05-21 19:51:08 CEST
Size:
5.68 KB
patch
obsolete
>Index: SOURCES/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch >=================================================================== >--- SOURCES/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch (nonexistent) >+++ SOURCES/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch (working copy) >@@ -0,0 +1,106 @@ >+From 26d339b91744dab5135ee9ea1d46fda62448ad95 Mon Sep 17 00:00:00 2001 >+From: Jan de Groot <jgc@archlinux.org> >+Date: Mon, 11 Apr 2016 14:00:33 +0000 >+Subject: [PATCH] Initialize framebuffer objects early so clutter will not >+ abort a few operations later. >+ >+Checking offscreen for COGL_INVALID_HANDLE is not sufficient, as cogl_offscreen_new_with_texture doesn't initialize framebuffer objects but lets Cogl solve this the lazy way. cogl_offscreen_new_with_texture will never return COGL_INVALID_HANDLE anyways. >+--- >+ src/st/st-theme-node-drawing.c | 35 +++++++++++++++++++++++------------ >+ src/st/st-theme-node-transition.c | 18 ++++++++++++++++-- >+ 2 files changed, 39 insertions(+), 14 deletions(-) >+ >+diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c >+index 1f28ed9..4a6a234 100644 >+--- a/src/st/st-theme-node-drawing.c >++++ b/src/st/st-theme-node-drawing.c >+@@ -2247,22 +2247,33 @@ st_theme_node_prerender_shadow (StThemeNodePaintState *state) >+ COGL_TEXTURE_NO_SLICING, >+ COGL_PIXEL_FORMAT_ANY); >+ if (buffer != COGL_INVALID_HANDLE) >+- offscreen = cogl_offscreen_new_with_texture (buffer); >+- >+- if (offscreen != COGL_INVALID_HANDLE) >+ { >+- ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height}; >++ CoglError *error = NULL; >++ >++ offscreen = cogl_offscreen_new_with_texture (buffer); >++ >++ if (cogl_framebuffer_allocate (COGL_FRAMEBUFFER (offscreen), &error)) >++ { >++ ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height}; >++ >++ cogl_framebuffer_orthographic (offscreen, 0, 0, >++ state->box_shadow_width, >++ state->box_shadow_height, 0, 1.0); >++ cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0); >+ >+- cogl_framebuffer_orthographic (offscreen, 0, 0, >+- state->box_shadow_width, >+- state->box_shadow_height, 0, 1.0); >+- cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0); >++ st_theme_node_paint_borders (state, offscreen, &box, 0xFF); >+ >+- st_theme_node_paint_borders (state, offscreen, &box, 0xFF); >+- cogl_handle_unref (offscreen); >++ cogl_handle_unref (offscreen); >+ >+- state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node), >+- buffer); >++ state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node), >++ buffer); >++ } >++ else >++ { >++ cogl_handle_unref (offscreen); >++ >++ cogl_error_free (error); >++ } >+ } >+ >+ if (buffer != COGL_INVALID_HANDLE) >+diff --git a/src/st/st-theme-node-transition.c b/src/st/st-theme-node-transition.c >+index 1eef17b..f3350a1 100644 >+--- a/src/st/st-theme-node-transition.c >++++ b/src/st/st-theme-node-transition.c >+@@ -242,6 +242,8 @@ setup_framebuffers (StThemeNodeTransition *transition, >+ StThemeNodeTransitionPrivate *priv = transition->priv; >+ guint width, height; >+ >++ CoglError *catch_error = NULL; >++ >+ /* template material to avoid unnecessary shader compilation */ >+ static CoglHandle material_template = COGL_INVALID_HANDLE; >+ >+@@ -269,13 +271,25 @@ setup_framebuffers (StThemeNodeTransition *transition, >+ if (priv->old_offscreen) >+ cogl_handle_unref (priv->old_offscreen); >+ priv->old_offscreen = cogl_offscreen_new_with_texture (priv->old_texture); >++ if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (priv->old_offscreen), &catch_error)) >++ { >++ cogl_object_unref (priv->old_offscreen); >++ cogl_error_free (catch_error); >++ priv->old_offscreen = COGL_INVALID_HANDLE; >++ g_return_val_if_fail (priv->old_offscreen != COGL_INVALID_HANDLE, FALSE); >++ } >+ >+ if (priv->new_offscreen) >+ cogl_handle_unref (priv->new_offscreen); >+ priv->new_offscreen = cogl_offscreen_new_with_texture (priv->new_texture); >+ >+- g_return_val_if_fail (priv->old_offscreen != COGL_INVALID_HANDLE, FALSE); >+- g_return_val_if_fail (priv->new_offscreen != COGL_INVALID_HANDLE, FALSE); >++ if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (priv->new_offscreen), &catch_error)) >++ { >++ cogl_object_unref (priv->new_offscreen); >++ cogl_error_free (catch_error); >++ priv->new_offscreen = COGL_INVALID_HANDLE; >++ g_return_val_if_fail (priv->new_offscreen != COGL_INVALID_HANDLE, FALSE); >++ } >+ >+ if (priv->material == NULL) >+ { >+-- >+2.7.1 >+ >Index: SPECS/gnome-shell.spec >=================================================================== >--- SPECS/gnome-shell.spec (revision 1017388) >+++ SPECS/gnome-shell.spec (working copy) >@@ -8,10 +8,11 @@ > Summary: Core user interface for the GNOME 3 desktop > Name: gnome-shell > Version: 3.20.2 >-Release: %mkrel 1 >+Release: %mkrel 2 > Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz > Source1: gnome-shell-session > Patch0001: 0001-screenShield-Allow-for-custom-backgrounds-on-login-s.patch >+Patch0002: 0001-Initialize-framebuffer-objects-early-so-clutter-will.patch > Patch100: gnome-shell-3.6.3.1-fix-evolution-calendar.patch > > License: GPLv2+ and LGPLv2+
Index: SOURCES/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch =================================================================== --- SOURCES/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch (nonexistent) +++ SOURCES/0001-Initialize-framebuffer-objects-early-so-clutter-will.patch (working copy) @@ -0,0 +1,106 @@ +From 26d339b91744dab5135ee9ea1d46fda62448ad95 Mon Sep 17 00:00:00 2001 +From: Jan de Groot <jgc@archlinux.org> +Date: Mon, 11 Apr 2016 14:00:33 +0000 +Subject: [PATCH] Initialize framebuffer objects early so clutter will not + abort a few operations later. + +Checking offscreen for COGL_INVALID_HANDLE is not sufficient, as cogl_offscreen_new_with_texture doesn't initialize framebuffer objects but lets Cogl solve this the lazy way. cogl_offscreen_new_with_texture will never return COGL_INVALID_HANDLE anyways. +--- + src/st/st-theme-node-drawing.c | 35 +++++++++++++++++++++++------------ + src/st/st-theme-node-transition.c | 18 ++++++++++++++++-- + 2 files changed, 39 insertions(+), 14 deletions(-) + +diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c +index 1f28ed9..4a6a234 100644 +--- a/src/st/st-theme-node-drawing.c ++++ b/src/st/st-theme-node-drawing.c +@@ -2247,22 +2247,33 @@ st_theme_node_prerender_shadow (StThemeNodePaintState *state) + COGL_TEXTURE_NO_SLICING, + COGL_PIXEL_FORMAT_ANY); + if (buffer != COGL_INVALID_HANDLE) +- offscreen = cogl_offscreen_new_with_texture (buffer); +- +- if (offscreen != COGL_INVALID_HANDLE) + { +- ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height}; ++ CoglError *error = NULL; ++ ++ offscreen = cogl_offscreen_new_with_texture (buffer); ++ ++ if (cogl_framebuffer_allocate (COGL_FRAMEBUFFER (offscreen), &error)) ++ { ++ ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height}; ++ ++ cogl_framebuffer_orthographic (offscreen, 0, 0, ++ state->box_shadow_width, ++ state->box_shadow_height, 0, 1.0); ++ cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0); + +- cogl_framebuffer_orthographic (offscreen, 0, 0, +- state->box_shadow_width, +- state->box_shadow_height, 0, 1.0); +- cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0); ++ st_theme_node_paint_borders (state, offscreen, &box, 0xFF); + +- st_theme_node_paint_borders (state, offscreen, &box, 0xFF); +- cogl_handle_unref (offscreen); ++ cogl_handle_unref (offscreen); + +- state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node), +- buffer); ++ state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node), ++ buffer); ++ } ++ else ++ { ++ cogl_handle_unref (offscreen); ++ ++ cogl_error_free (error); ++ } + } + + if (buffer != COGL_INVALID_HANDLE) +diff --git a/src/st/st-theme-node-transition.c b/src/st/st-theme-node-transition.c +index 1eef17b..f3350a1 100644 +--- a/src/st/st-theme-node-transition.c ++++ b/src/st/st-theme-node-transition.c +@@ -242,6 +242,8 @@ setup_framebuffers (StThemeNodeTransition *transition, + StThemeNodeTransitionPrivate *priv = transition->priv; + guint width, height; + ++ CoglError *catch_error = NULL; ++ + /* template material to avoid unnecessary shader compilation */ + static CoglHandle material_template = COGL_INVALID_HANDLE; + +@@ -269,13 +271,25 @@ setup_framebuffers (StThemeNodeTransition *transition, + if (priv->old_offscreen) + cogl_handle_unref (priv->old_offscreen); + priv->old_offscreen = cogl_offscreen_new_with_texture (priv->old_texture); ++ if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (priv->old_offscreen), &catch_error)) ++ { ++ cogl_object_unref (priv->old_offscreen); ++ cogl_error_free (catch_error); ++ priv->old_offscreen = COGL_INVALID_HANDLE; ++ g_return_val_if_fail (priv->old_offscreen != COGL_INVALID_HANDLE, FALSE); ++ } + + if (priv->new_offscreen) + cogl_handle_unref (priv->new_offscreen); + priv->new_offscreen = cogl_offscreen_new_with_texture (priv->new_texture); + +- g_return_val_if_fail (priv->old_offscreen != COGL_INVALID_HANDLE, FALSE); +- g_return_val_if_fail (priv->new_offscreen != COGL_INVALID_HANDLE, FALSE); ++ if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (priv->new_offscreen), &catch_error)) ++ { ++ cogl_object_unref (priv->new_offscreen); ++ cogl_error_free (catch_error); ++ priv->new_offscreen = COGL_INVALID_HANDLE; ++ g_return_val_if_fail (priv->new_offscreen != COGL_INVALID_HANDLE, FALSE); ++ } + + if (priv->material == NULL) + { +-- +2.7.1 + Index: SPECS/gnome-shell.spec =================================================================== --- SPECS/gnome-shell.spec (revision 1017388) +++ SPECS/gnome-shell.spec (working copy) @@ -8,10 +8,11 @@ Summary: Core user interface for the GNOME 3 desktop Name: gnome-shell Version: 3.20.2 -Release: %mkrel 1 +Release: %mkrel 2 Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz Source1: gnome-shell-session Patch0001: 0001-screenShield-Allow-for-custom-backgrounds-on-login-s.patch +Patch0002: 0001-Initialize-framebuffer-objects-early-so-clutter-will.patch Patch100: gnome-shell-3.6.3.1-fix-evolution-calendar.patch License: GPLv2+ and LGPLv2+
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18465
: 7828