pmaports/temp/mesa/10-adjust-cache-deflate-buffer.patch
Clayton Craft 6dd3ef2fcb mesa: Add new package tracking newer Mesa version (!256)
This adds a Mesa package overriding Mesa in Alpine, and:

1) builds a much newer version of Mesa than what is found in Alpine (by
*not* building amd/radeonsi support, so no dependency on llvm).

2) builds Mesa with tegra and etnaviv drivers (note, as of now, the
librem5 devkit gpu is not supported in the etnaviv driver here)

This breaks "pmbootstrap qemu" for some people, use --host-qemu as
workaround for now (a fix will be available soon):
https://wiki.postmarketos.org/wiki/Troubleshooting:QEMU#Using_QEMU_from_the_host_system

Since this also fixes the blackscreen bug on lg-hammerhead, the
trade-off with the qemu bug is worth it.

[ci:skip-build]: already built successfully in CI
2019-03-07 10:00:10 +01:00

16 lines
695 B
Diff

diff -ru mesa-18.1.7.orig/src/util/disk_cache.c mesa-18.1.7/src/util/disk_cache.c
--- mesa-18.1.7.orig/src/util/disk_cache.c 2018-08-24 19:25:19.000000000 +0300
+++ mesa-18.1.7/src/util/disk_cache.c 2018-12-14 13:59:15.433631846 +0200
@@ -721,8 +721,11 @@
/* From the zlib docs:
* "If the memory is available, buffers sizes on the order of 128K or 256K
* bytes should be used."
+ *
+ * But that is performance optimization for large files. To keep stack usage
+ * in sensible amount (wrt. musl default stack) we use smaller stack on Alpine.
*/
-#define BUFSIZE 256 * 1024
+#define BUFSIZE 4 * 1024
/**
* Compresses cache entry in memory and writes it to disk. Returns the size