Hello!

I had weird issue with your patch, that all lines that starts with space ' ' have one extra space before code (nicely visible on static void __atribute__ ... line).

I fixed it with one-liner:

$ sed 's/^ //' ~/rvp-mesa-fix.patch > ~/rvp-mesa-fix-hp.patch

Which helped:
$ cd /usr
$ patch -p1 < ~/rvp-mesa-fix-hp.patch

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -urN a/xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c b/xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c |--- a/xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c 2022-05-09 01:27:38.000000000 +0000 |+++ b/xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c 2025-12-22 22:39:24.502696165 +0000
--------------------------
Patching file xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c using Plan A...
Hunk #1 succeeded at 256.
Hunk #2 succeeded at 289.
done


I will let you once I rebuild/reinstall system with that patch.

Regards
 --Henryk Paluch

On 12/22/25 23:52, RVP wrote:
On Mon, 22 Dec 2025, RVP wrote:

Actually, that is NetBSD-added code from way back:

https://github.com/NetBSD/xsrc/commit/ eabf4f72bd144ce7a1702762e8b5147de1958b79#diff- a0dcc7bcb9c33bd013a4153c8cd470db8ca00250a5aa01a1d8350f8b8df5cac2 https://github.com/NetBSD/xsrc/commit/ d63b28c10f190a6db70dcf0ec4a2b5e182cd4a7c#diff- a0dcc7bcb9c33bd013a4153c8cd470db8ca00250a5aa01a1d8350f8b8df5cac2


Can you try this:

```
diff -urN a/xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c b/ xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c --- a/xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c 2022-05-09 01:27:38.000000000 +0000 +++ b/xsrc/external/mit/MesaLib/dist/src/mesa/main/context.c 2025-12-22 22:39:24.502696165 +0000
@@ -256,14 +256,11 @@
   * Calls all the various one-time-fini functions in Mesa
   */

-static GLbitfield api_init_mask = 0x0;
  static void __attribute__((__destructor__))
  one_time_fini(void)
  {
-   if (api_init_mask) {
-      glsl_type_singleton_decref();
-      _mesa_locale_fini();
-   }
+   glsl_type_singleton_decref();
+   _mesa_locale_fini();
  }

  /**
@@ -292,7 +289,9 @@
        _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F;
     }

+#if 0
     atexit(one_time_fini);
+#endif

  #if defined(DEBUG)
     if (MESA_VERBOSE != 0) {
```

-RVP

Reply via email to