The GL_ARB_texture_floats OpenGL extension is disabled by default in Mesa due to patent concern (US #6,650,327). Without texture floats the radeonsi drived is severely limited (OpenGL 2.1 vs 4.5).
It can be enabled with mesa_noglu.override { enableTextureFloats = true; } but this requires a significant amount of compiling on every update.
Other distros are already building mesa with it: arch linux and debian for example.
Can we enable it as well? What do you think?
At first glance this is risky but Debian usually is very scrict (and therefore a good indicator patent-wise) and yet they enable it. It's interesting to find out their reasoning -- maybe this is not as concerning as it soinds.
It's enough to override mesa_drivers; that way you won't need to recompile any reverse dependencies.
@vcunat, thanks. I did:
mesa_drivers = (mesa_noglu.override {
enableTextureFloats = true;
}).drivers;
and nix only recompiled mesa. Anyway I think it can be quite confusing since users (myself included) expect the driver to be OpenGL 3.x or 4.x and texture floats don't look immediately related to this problem. See issue #12380.
Perhaps it should be mentioned here in the manual.
~Better use mesa_drivers.override instead of mesa_noglu.override~, as there could be other differences, e.g. grsecEnabled ATM. mesa_drivers is meant just as a build-time dependency for packages that need it.
I tried that first but apparently it's missing the override:
nix-repl> :l <nixpkgs>
Added 7224 variables.
nix-repl> mesa_drivers.override
error: attribute ‘override’ missing, at (string):1:1
Oh, I haven't realized that. Well, you can at least set grsecEnabled by hand in the override for now. (There's supposed to be some impact on speed somewhere.)
Personally I think we can allow (potentially) patented stuff even into the default drivers. Most users should be at no risk, especially within the EU. Note that in case of freetype we do include code with patent risks. With mesa we've been dragging the default for many years now, since ee0822153a.
But, to be sure, we already have hardware.opengl.s3tcSupport option so we can do it similarly. (Or perhaps generalize it to both/all mesa patent risks.)
Some background: a user reported a possible patent issue to Debian but it seem to be lost in the limbo. So there indeed may be some risk.
Given that Debian does this too (and they are much bigger than we) we may just enable this by default, but I can't assess the risk for U.S. users (I'm not one of them).
US/international companies are likely to be more cautious (and more at risk), especially if they don't plan to play games ;-)
If debian has it enabled by default I think we can and should, too.
@abbradar
enableTextureFloats = head (splitString "/" config.time.timeZone) != "America"; ?
;)
done in #24162
Most helpful comment
@abbradar
enableTextureFloats = head (splitString "/" config.time.timeZone) != "America";?;)