Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mesa: free up floating point textures (patents expired), 8.1.2 -> 8.1.4 #43378

Merged
merged 4 commits into from Jul 30, 2018

Conversation

Anton-Latukha
Copy link
Contributor

@Anton-Latukha Anton-Latukha commented Jul 11, 2018

Motivation for this change

1.a. https://cgit.freedesktop.org/mesa/mesa/commit/?id=66673bef941af344314fe9c91cad8cd330b245eb
1.b. https://www.phoronix.com/scan.php?page=news_item&px=OpenGL-Texture-Float-Freed
2. https://www.mesa3d.org/relnotes/18.1.3.html

Things done (recently updated, 2018-07-25)
  • As mesa now has floating point textures enabled by default - removed in mesa the trigger (enableTextureFloats) - that was prioply in disabled state by default, and was blocking patented features.
  • Moved old enableTextureFloats trigger key to mesa-darwin and enabled it. As it is 8.0.3 - 2012 version fossil. So I kept its current old state, and also enabled the floating point textures there.
  • Cleaned-up top-level mesa_drivers from enableTextureFloats = true;, because it now enabled by default.
  • Updated mesa 8.1.2 -> 8.1.3.
  • Removed maintainer eduarrrd from all nixpkgs descriptions, since more than a year of inactivity.
  • Removed grecurity parts and patches from Mesa, since both got agreement from vcunat and grsecurity would not work in NixOS at nearest times.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Anton-Latukha Anton-Latukha changed the title mesa: enable floating point textures (patents expired), 8.1.2 -> 8.1.3 mesa: free up floating point textures (patents expired), 8.1.2 -> 8.1.3 Jul 11, 2018
# NOTE: In Mesa >=18.1.2 - enabled by default: patents on floating point textures expired.
(lib.enableFeature enableTextureFloats "texture-float")
];

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this block of changes actually disable the feature?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it should be no change from default on this mesa version, so I certainly don't feel strongly about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I would enable floating textures for that poor mesa-darwin 8.0.3.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 11, 2018

Calling @vcunat as a package maintainer.

  1. Can we remove @eduarrrd? Since this year he seems not active?

  2. Also I touched:

{
  mesa_drivers =
    let mo = mesa_noglu.override {
      grsecEnabled = config.grsecurity or false;
      # enableTextureFloats = true;    <- this
    };
    in mo.drivers;
}

Am I right that noGL(Utils) here has the meaning non-GNU?

  1. Since grsec seems now not working/disabled in NixOS. And grsecurity hardly would have a future with this massive lawsuits. In the nearest future grsec seems would not be enabled/working/used in NixOS.
    Maybe we can reduce mesa_drivers to alias?

@vcunat
Copy link
Member

vcunat commented Jul 11, 2018

I noticed already :-) I think this is good (though I made a comment for darwin). Even (3.) would seem OK to me, but the override should be a no-op now anyway, so I don't think there's much difference.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 11, 2018

  1. mesa-noglu-18.1.3 also seems building on meson ninja fine.

I just inserted them (meson ninja and asked bison flex), and not removed autoreconfHook or anything.

mesa-noglu-18.1.3 builds successfully and fails on post-build tasks. I did not understood cause of error at current point in time.

I would post error log in below messages.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 11, 2018

Meson build:
nix-build {/home/pyro/src/nixpkgs} -A libGL:

...
Installing /build/mesa-18.1.3/build/meson-private/gl.pc to /nix/store/s6qyr86zpk66q09qjyr0fvczvdxp73x0-mesa-noglu-18.1.3/lib/pkgconfig
Running custom install script '/build/mesa-18.1.3/bin/install_megadrivers.py /build/mesa-18.1.3/build/src/mesa/drivers/dri/libmesa_dri_drivers.so lib/dri i915_dri.so i965_dri.so radeon_dri.so r200_dri.so nouveau_vieux_dri.so'
Running custom install script '/build/mesa-18.1.3/bin/install_megadrivers.py /build/mesa-18.1.3/build/src/gallium/targets/dri/libgallium_dri.so lib/dri radeonsi_dri.so nouveau_dri.so swrast_dri.so kms_swrast_dri.so r300_dri.so r600_dri.so vmwgfx_dri.so virtio_gpu_dri.so'
Running custom install script '/build/mesa-18.1.3/bin/install_megadrivers.py /build/mesa-18.1.3/build/src/gallium/targets/vdpau/libvdpau_gallium.so lib/vdpau libvdpau_r300.so.1.0.0 libvdpau_r600.so.1.0.0 libvdpau_radeonsi.so.1.0.0 libvdpau_nouveau.so.1.0.0'
Running custom install script '/build/mesa-18.1.3/bin/install_megadrivers.py /build/mesa-18.1.3/build/src/gallium/targets/xvmc/libXvMCgallium.so lib libXvMCr600.so libXvMCnouveau.so'
Running custom install script '/build/mesa-18.1.3/bin/install_megadrivers.py /build/mesa-18.1.3/build/src/gallium/targets/va/libgallium_drv_video.so lib/dri r600_drv_video.so radeonsi_drv_video.so nouveau_drv_video.so'
mv: failed to access '/nix/store/8zzyd00lsq2fmai8x2i446djrg7an40y-mesa-noglu-18.1.3-drivers/lib/': No such file or directory
builder for '/nix/store/sgi1p1kmx6mb60j3l23yvyapqjn3jfiv-mesa-noglu-18.1.3.drv' failed with exit code 1
cannot build derivation '/nix/store/fnc3r52gz6x93y1a56r371r369amcnxv-libGL-1.0.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/fnc3r52gz6x93y1a56r371r369amcnxv-libGL-1.0.0.drv' failed

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 11, 2018

  1. I should check migration of all config flags autotools -> meson compatible.

@Anton-Latukha
Copy link
Contributor Author

Did "1." - removed eduarrrd from packages, due to inactivity.

Did "2., 3." mesa_drivers reduced to alias of mesa_noglu. Because grsec == False.

Did mentioned by vcunat - freed up floating point textures in mesa-darwin.

@Anton-Latukha Anton-Latukha force-pushed the mesa-fpoint-textures branch 3 times, most recently from 51ff0f9 to ebcc635 Compare July 12, 2018 09:52
@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 12, 2018

Ok. @vcunat .
I did everything we talked about.


And also I did:

  1. Cleared-out mesa and all-packages from defunct --disable/enable-glx-rts, --disable/enable-sysfs flags. And removed patch-fix for grsecurity/PaX.

meson build (4., 5.), TLDR: won’t fix

I tried to force forward meson build. Locally translated most of configureFlags to mesonFlags.
Not every flag seems able to be translated. Couple of flags (dri looks like redundant to dri3) was leaved-out from configuration in meson configurations.

We have autoreconfHook, patchPhase, postInstall and postFixup, passthrus, chain on top of it. So I think the person with deeper understanding of mesa staging on NixOS needed, to make right choices on transition from autotools to meson build.


I refactored all to 5 commits.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 13, 2018

mesa minor release update - 1.8.4.

@Anton-Latukha Anton-Latukha changed the title mesa: free up floating point textures (patents expired), 8.1.2 -> 8.1.3 mesa: free up floating point textures (patents expired), 8.1.2 -> 8.1.4 Jul 13, 2018
vcunat pushed a commit that referenced this pull request Jul 16, 2018
@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 22, 2018

@vcunat
I synced with staging.
Cause: Massive volth merge also reduced deps in mesa-darwin.

What we do about this PR. Because enabling floating point textures is a corner-stone feature for OpenGL 3.0, and upper levels, compliance. And it also enables a big boost in operations that expect that feature enabled.

@vcunat
Copy link
Member

vcunat commented Jul 22, 2018

I'm certainly not against in principle. I plan to have a closer look at this soon.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 24, 2018

@vcunat I updated the main post. It precisely reflects what is in changes, so you don't need to re-read the thread.

Also with my finishing work on Nix POSIX installer epic NixOS/nix#1565, in nearest time I woul reach-out to you through E-mail. As it is said - I am finishing self-testing PR phase before 31 July.

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does seem good. ❤️

@vcunat vcunat merged commit 7ebc3ab into NixOS:staging Jul 30, 2018
vcunat added a commit that referenced this pull request Jul 30, 2018
@gebner gebner mentioned this pull request Aug 25, 2018
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants