Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nodejs-electron for openSUSE:Factory 
checked in at 2023-11-08 22:17:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs-electron (Old)
 and      /work/SRC/openSUSE:Factory/.nodejs-electron.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nodejs-electron"

Wed Nov  8 22:17:46 2023 rev:88 rq:1124067 version:27.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs-electron/nodejs-electron.changes  
2023-11-03 22:19:49.679349965 +0100
+++ 
/work/SRC/openSUSE:Factory/.nodejs-electron.new.17445/nodejs-electron.changes   
    2023-11-08 22:18:06.320005110 +0100
@@ -1,0 +2,6 @@
+Tue Nov  7 17:10:19 UTC 2023 - Bruno Pitrus <brunopit...@hotmail.com>
+
+- Add backported 
crash_gpu_process_and_clear_shader_cache_when_skia_reports.patch
+  * fixes “Skia shader compilation error” after some Mesa updates due to 
stale shader cache (bsc#1214274)
+
+-------------------------------------------------------------------

New:
----
  crash_gpu_process_and_clear_shader_cache_when_skia_reports.patch

BETA DEBUG BEGIN:
  New:
- Add backported 
crash_gpu_process_and_clear_shader_cache_when_skia_reports.patch
  * fixes “Skia shader compilation error” after some Mesa updates due to 
stale shader cache (bsc#1214274)
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nodejs-electron.spec ++++++
--- /var/tmp/diff_new_pack.cbpCtc/_old  2023-11-08 22:18:14.672311944 +0100
+++ /var/tmp/diff_new_pack.cbpCtc/_new  2023-11-08 22:18:14.676312092 +0100
@@ -383,6 +383,7 @@
 Patch3224:      autofill_i18n_parsing_expressions-constexpr.patch
 Patch3225:      simple_font_data-freetype-include.patch
 Patch3226:      perfetto-numeric_storage-double_t.patch
+Patch3227:      
crash_gpu_process_and_clear_shader_cache_when_skia_reports.patch
 
 
 %if %{with clang}

++++++ crash_gpu_process_and_clear_shader_cache_when_skia_reports.patch ++++++
>From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Le Hoang Quyen <lehoangqu...@chromium.org>
Date: Tue, 31 Oct 2023 08:52:25 +0000
Subject: Crash GPU process and clear shader cache when skia reports
 compileError.

Sometimes Skia failed to compile the cached GLSL because the driver had
been changed but GL_RENDERER was still the same. In this case, we better
crash the GPU process and signal the browser to clear the cache & let
Skia regenerate the GLSL in the next run.

Even if the compile failure wasn't caused by the cached GLSL. It's still
better to crash the GPU process and let the shaders be re-generated.
Because a failed compilation would have resulted in wrong rendering
even if we had allowed the process to continue its execution.

Bug: 1442633
Change-Id: Ia0e36bd4674877de5be451a6ea9c4e7fa5e34e8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4988290
Reviewed-by: Sunny Sachanandani <sunn...@chromium.org>
Commit-Queue: Quyen Le <lehoangqu...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1217461}

diff --git a/gpu/command_buffer/service/shared_context_state.cc 
b/gpu/command_buffer/service/shared_context_state.cc
index 
63f6c33ad5f41cde0fca08d60e7e10fe1154e165..f422ec52ca74f5a636e11591ba42444773a5c682
 100644
--- a/gpu/command_buffer/service/shared_context_state.cc
+++ b/gpu/command_buffer/service/shared_context_state.cc
@@ -4,6 +4,7 @@
 
 #include "gpu/command_buffer/service/shared_context_state.h"
 
+#include "base/immediate_crash.h"
 #include "base/observer_list.h"
 #include "base/strings/stringprintf.h"
 #include "base/system/sys_info.h"
@@ -101,6 +102,13 @@ void SharedContextState::compileError(const char* shader, 
const char* errors) {
                << "------------------------\n"
                << shader << "\nErrors:\n"
                << errors;
+
+    // Increase shader cache shm count and crash the GPU process so that the
+    // browser process would clear the cache.
+    GpuProcessShmCount::ScopedIncrement increment(
+        use_shader_cache_shm_count_.get());
+
+    base::ImmediateCrash();
   }
 }
 
@@ -305,6 +313,7 @@ bool SharedContextState::InitializeGanesh(
     gl::ProgressReporter* progress_reporter) {
   progress_reporter_ = progress_reporter;
   gr_shader_cache_ = cache;
+  use_shader_cache_shm_count_ = use_shader_cache_shm_count;
 
   size_t max_resource_cache_bytes;
   size_t glyph_cache_max_texture_bytes;
diff --git a/gpu/command_buffer/service/shared_context_state.h 
b/gpu/command_buffer/service/shared_context_state.h
index 
05822df27221cd5003e8c12f809805f3bd0c597b..7c21a81066afd77e310f0fdfca7da92f8f7cb4e1
 100644
--- a/gpu/command_buffer/service/shared_context_state.h
+++ b/gpu/command_buffer/service/shared_context_state.h
@@ -392,6 +392,8 @@ class GPU_GLES2_EXPORT SharedContextState
   std::vector<uint8_t> scratch_deserialization_buffer_;
   raw_ptr<gpu::raster::GrShaderCache, DanglingUntriaged> gr_shader_cache_ =
       nullptr;
+  raw_ptr<GpuProcessShmCount, DanglingUntriaged> use_shader_cache_shm_count_ =
+      nullptr;
 
   // |need_context_state_reset| is set whenever Skia may have altered the
   // driver's GL state.

Reply via email to