Merge #43378 into staging: mesa: enableTextureFloats

This commit is contained in:
Vladimír Čunát 2018-07-30 08:16:20 +02:00
commit 848fa35c24
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
8 changed files with 13 additions and 47 deletions

View File

@ -23,6 +23,5 @@ stdenv.mkDerivation rec {
homepage = http://6xq.net/projects/pianobar/;
platforms = platforms.linux;
license = licenses.mit; # expat version
maintainers = with maintainers; [ eduarrrd ];
};
}

View File

@ -31,6 +31,5 @@ stdenv.mkDerivation rec {
description = "Simple, yet powerful and good looking image viewer";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.eduarrrd ];
};
}

View File

@ -20,6 +20,5 @@ stdenv.mkDerivation {
description = "File manager written in Qt/C++";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.eduarrrd ];
};
}

View File

@ -50,6 +50,12 @@ let
configurePhase = ":";
configureFlags = [
# NOTE: Patents expired on June 17 2018.
# For details see: https://www.phoronix.com/scan.php?page=news_item&px=OpenGL-Texture-Float-Freed
"texture-float"
];
makeFlags = "INSTALL_DIR=\${out} CC=cc CXX=c++";
enableParallelBuilding = true;

View File

@ -4,11 +4,7 @@
, llvmPackages, libffi, libomxil-bellagio, libva-minimal
, libelf, libvdpau, valgrind-light, python2
, libglvnd
, grsecEnabled ? false
, enableRadv ? true
# Texture floats are patented, see docs/patents.txt, so we don't enable them for full Mesa.
# It's overridden for mesa_drivers.
, enableTextureFloats ? false
, galliumDrivers ? null
, driDrivers ? null
, vulkanDrivers ? null
@ -90,7 +86,6 @@ let self = stdenv.mkDerivation {
# revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved
# ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
patches = [
./glx_ro_text_segm.patch # fix for grsecurity/PaX
./symlink-drivers.patch
./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl
];
@ -115,8 +110,6 @@ let self = stdenv.mkDerivation {
("--with-vulkan-drivers=" +
builtins.concatStringsSep "," vulkanDrivers))
++ [
(enableFeature enableTextureFloats "texture-float")
(enableFeature grsecEnabled "glx-rts")
(enableFeature stdenv.isLinux "dri3")
(enableFeature stdenv.isLinux "nine") # Direct3D in Wine
"--enable-libglvnd"
@ -135,7 +128,6 @@ let self = stdenv.mkDerivation {
"--enable-xvmc"
"--enable-vdpau"
"--enable-shared-glapi"
"--enable-sysfs"
"--enable-llvm-shared-libs"
"--enable-omx-bellagio"
"--enable-va"
@ -272,7 +264,7 @@ let self = stdenv.mkDerivation {
homepage = https://www.mesa3d.org/;
license = licenses.mit; # X11 variant, in most files
platforms = platforms.linux;
maintainers = with maintainers; [ eduarrrd vcunat ];
maintainers = with maintainers; [ vcunat ];
};
};
in self

View File

@ -1,25 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 5068913..3d4271e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -429,6 +429,20 @@ AC_SUBST([GLESv2_LIB_GLOB])
AC_SUBST([VG_LIB_GLOB])
AC_SUBST([GLAPI_LIB_GLOB])
+
+dnl readonly text segment on x86 hardened platforms
+AC_ARG_ENABLE([glx_rts],
+ [AS_HELP_STRING([--enable-glx-rts],
+ [on x86, use a readonly text segment for libGL @<:@default=disabled@:>@])],
+ [enable_glx_rts="$enableval"],
+ [enable_glx_rts=no])
+if test "x$enable_glx_rts" = xyes; then
+ DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
+else
+ enable_glx_rts=no
+fi
+
+
dnl
dnl Arch/platform-specific settings
dnl

View File

@ -21,7 +21,6 @@ stdenv.mkDerivation rec {
description = "Pretty small HTTP server - a command-line tool to share files";
homepage = https://github.com/mgorny/pshs;
license = stdenv.lib.licenses.bsd3;
maintainers = [ stdenv.lib.maintainers.eduarrrd ];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -11006,19 +11006,16 @@ with pkgs;
libGLDarwinOr = alternative: if stdenv.isDarwin then libGLDarwin else alternative;
mesa_noglu = callPackage ../development/libraries/mesa {
# makes it slower, but during runtime we link against just mesa_drivers
# through /run/opengl-driver*, which is overriden according to config.grsecurity
# grsecEnabled = true; # no more support in nixpkgs ATM
llvmPackages = llvmPackages_6;
};
mesa_glu = callPackage ../development/libraries/mesa-glu { };
mesa_drivers =
let mo = mesa_noglu.override {
grsecEnabled = config.grsecurity or false;
enableTextureFloats = true;
};
in mo.drivers;
# NOTE: 2018-07-12: legacy alias:
# gcsecurity bussiness is done: https://www.theregister.co.uk/2018/02/08/bruce_perens_grsecurity_anti_slapp/
# floating point textures patents are expired,
# so package reduced to alias
mesa_drivers = mesa_noglu;
## End libGL/libGLU/Mesa stuff