Friday, March 18, 2011

Directing Lemmings

Phoronix just posted a link to an interview with Ryan Gordon who says
Also, I find it completely ridiculous that we're shipping open source OpenGL drivers without S3TC support because of patent concerns. Today, that's like shipping a web browser without .jpg support!
Why does so many people think that breaking the law is not only acceptable but mandatory? I don't understand why would you castigate others for following the law. Yes, every single patent is despicable, there's not one of them that's ethically valid but the solution can't be pushing someone else to be breaking the law for you.

Legally there's nothing stopping anyone from licensing s3tc or floating point patents, forking Mesa3D and shipping closed source version of it with code handling both.
It's simply that you can't reconcile Free Software with patents. You just can't add what amounts to arbitrary restrictions to your software and claim freedom. There's absolutely nothing we can do here. There were teams of lawyers looking at this stuff and the conclusion every single time was "you just can't get away with this". Jose and Brian spent a lot of time looking at ways of getting around it as well.

I don't even think we could claim that we're taking a moral stance because it's not us but the distributors who would get sued and would lose. Pushing others under the train just doesn't seem like a moral high ground. Plus all the "I'm not a lawyer but /* bad advice follows */" are just not helpful at all. It's only meaningful if you work for a company that distributes Mesa3D code and your lawyers decided that you'll fight this in court or you'll go around this using some technical quirk. Everything else is back seat driving, without even having the decency to get in the car.

41 comments:

Anonymous said...

does this pattent apply only to US or the entire world... ? Why does entire wold have to suffer when one counry has a broken and crippling patent system? Can u explain it? Why not ship mesa US edition without S3TC support?

Alejandro Nova said...

Patents are national. As far as I know, the relevant methods aren't patented in Chile and the Chilean law forbids explicitly the patenting of mathematical algorithms. So, the patent for S3TC is illegal in Chile, and I have every right to use S3TC in my computer.

Alejandro Nova said...
This comment has been removed by the author.
Alejandro Nova said...

The right solution should be to code in S3TC, and to require US based distributors to disable it. Those countries without S3TC patents are still free to use the product, and if someone steps in, makes packages with the relevant patented code, and distributes them in the US, he is entirely liable, not the distributions themselves.

As a Chilean law practitioner, the advice I give isn't valid for US law system, but is valid for the Chilean one. In South America you'll see similar situations repeated.

Anonymous said...

Why does so many people think that breaking the law is not only acceptable but mandatory? I don't understand why would you castigate others for following the law. Yes, every single patent is despicable, there's not one of them that's ethically valid but the solution can't be pushing someone else to be breaking the law for you

Because the laws are stupid. They're made for stupid people who just want to stick their hand in your pocket when such simple things as playing a DVD on your computer becomes a crime because you choose to use Linux rather than the "state sponsored" OS'es. You can roll over and be a lap dog if you want, but I won't...ever...

Beat Wolf said...

I agree with activating it. The distributions in the USA are responsible for deactivating it. I mean seriously, all those problems are basicaly caused by one country. Distributions should switch certain things on or of depending on the country selected during installation.

Seriously, this is the only reasonable thing to do.

Anonymous said...

I agree with those perfectly, who say that we should not cripple a whole operating system because of one country's broken and utterly stupid legal system.

Making separate US / Non-US Linux distributions happen, would be a wonderful thing!

Anonymous said...

I just don't have any respect for such pattens. I also play DVD's with dvdcss on my Linux system, so...

AdeBe said...

I 100% agree with previous comments. We should have a separate US/non-US forms of distribution.
Yes, I know that law in every country is different and this wouldn't solve all of the problems, BUT it should get rid of most of them.

Why does everyone have to suffer because of one's country stupid law?

Anonymous said...

A US and non-US version would also put some focus on the issue...

But as you're not doing the distribution, why don't you just make a compile time switch and write a readme explaining the issue...

gunnicom said...

Well,
some WLAN channels are illegal in some countries, too. Would you suggest disabling all channels in the kernel that could be illegal in some countries also?
So Linux would only allow one (did not count how much would remain) channel or so for all people all over the world. Then i could definitly understand people saying that linux sucks.

renoX said...

What an US-centric point of view..
I don't see why all users should suffer because of insane US's laws..

Awesomeness said...

I find those "We can't use XY because it's patented" ridiculous. EVERYTHING is patented these days. The desktop trashcan is patented by Apple for example. NO ONE EVER CARED. You never saw KDE or GNOME not implementing the trashcan because of patent issues.

Pretty much everything of OpenGL is patented and those patents were sold by SGI to Microsoft years ago. NO ONE CARED!
Now suddenly: "Boohoo, S3TC and OpenGL 4.x are patented. We can't implement them."

All that patent whining is highly selective: Sometimes (eg codecs or S3TC) US-only patents are treated like they apply worldwide and sometimes they are completely ignored and the FOSS world didn't collapse.

Anonymous said...

"Phoronix just posted a link to an interview with Ryan Gordon who says
Also, I find it completely ridiculous that we're shipping open source OpenGL drivers without S3TC support because of patent concerns. Today, that's like shipping a web browser without .jpg support!"


"zack:Why does so many people think that breaking the law is not only acceptable but mandatory? I don't understand why would you castigate others for following the law. Yes, every single patent is despicable, there's not one of them that's ethically valid but the solution can't be pushing someone else to be breaking the law for you."

so what your basicly saying is the core MESA devs and the hardware Gfx card makers are shit scared in Linux land, and are to old, weary, incompetent to write a new algorithm shader to use in place of these patented algorithm's ! for anyone that own's (and so own's a licence) this hardware to make everyone happy.

end users dont care how it's done, only that it is done, and not brushed aside never to appear

Anonymous said...

Are you saying you don't see pirated movies :) ?

Zack said...

Hilarious. Of course even if your country doesn't have patents distributing Mesa3D with this code would make it /not/ Free Software. It's not magic. Personally though I do prefer the Anonymous "but I'm breaking the law anyway so should you" comments. It's just so beautifully ironic.

Actually no, the winner must the anonymous who says "end users dont care how it's done, only that it is done, and not brushed aside never to appear". Oh, we've done it, you can install the code as a separate library and it will hook into Mesa3D, it just that we can't ship it by /default/. Of course knowing that would imply a smallest amount of knowledge about this stuff and surely not being clueless would make posting your opinion online a lot less fun...

So before another useless opinion pops up: if your country doesn't respect patents or you want to be breaking the law, including the Free Software licenses themselves in your distro you can hook the s3tc or dxtc libs with Mesa and go ahead distribute them, you can also license patents and distribute them as so, but to expect others to be breaking the law for your pleasure... Well for my opinion on that reread the blog.

Anonymous said...

Just for my own understanding:

would distributing the mesa source, with --enable-patented defaulting to OFF be illegal too? Development would be centralised in the mesa git tree, distributors would be able to provide both versions based on the same source, dependent on the situation.

I think there is precedent for this. The fluendo mp3 decoder is distributed this way (MIT (copyright) licensed, clearly patented). I think ffmpeg has a similar setup: ffmpeg in Debian doesn't have certain encoders activated, but in "debian-multimedia" distributes it with the patented parts activated (I think it's hosted in OVH France).

But maybe I'm missing something.

Christopher Friedt said...

There's no way to mix patented code with free user space software in a really legal way. It needs to be separated into kernel space, and needs to be cryptographically stored, accessed, and executed. These are more than the requirements for a proprietary OS because the proprietary OS simply needs to obscure all APIs and prevent users from getting meaningful access to kernel memory.

The kind of security needed is beyond the capability of a pure software mechanism.

Anonymous said...

You are right, sadly :(

I would be happy to have it as an optional "nonfree" package in fedora

nate-m said...

> so what your basicly saying is the core MESA devs and the hardware Gfx card makers are shit scared in Linux land, and are to old, weary, incompetent to write a new algorithm shader to use in place of these patented algorithm's !

This makes no sense at all.

No, what he is _BASICALLY_SAYING_ is that it's illegal to write drivers that can allow applications to use s3c compressed textures with hardware.

There are a load of different ways to write compression algorithms. But there is only one way to do it that will be compatible with the hardware and software your using.

And patents affect far more then just USA.

I also find it amazing that all these people that are sooooo expert on USA patent laws are utterly clueless about their own.

http://www.buildingipvalue.com/08_EMEA/131-133KriegerMes.pdf

I WISH software patents were just a USA problem. But they are not.

And before any moron goes on with diatribes on how EU considers software patents invalid... so does USA patent law. It just depends on your definition on 'software patents'.

That is their definition of what is and what is not 'software patents' is not your definition.

That and your leaders are clamoring over themselves to write new IP laws and treaties. Often in Secret. See also: ACTA and 'Son of ACTA'.

They often resist USA definitions and IP laws, but it's only because USA laws are designed to benefit certain types of large USA corporations (at the expense of everybody else). Once the EU governments figure out how to do it so it benefits EU companies, you'll see a bunch of new problems appearing.

That is unless you stay on top of things.

Anonymous said...

What is the practical upshot of not supporting one texture compression scheme over another? I mean, you can load textures from compressed files in GL on Linux, I've done it...
(ie: is there some really important app that has billions of pre-made textures, or does S3TC get hardware support that makes it really useful for something?)

Just reading through the wikipedia article it looks like you could use a shader to decompress them?

As for the patent thing, it is sad, but those on the "ignore the patent" side should realise that practically every country has a treaty with the USA in regards to honouring each other's patents.

Anonymous said...

I think it's a question who is holding the patents. Maybe it can be solved by getting permission from whichever entity is holding the patent. (Maybe collection money from the community for a license).

I do believe though that the opensource community should put its foot down when it comes to that. If the khronos groups expects the open source community to chose ogl over dx because it's free and open, they should make sure ogl is actually free and open. Maybe going to mono way and cooperating with ms in order to get open source implantation is the right way.

Andreas said...

Zack, I don't see why you make a definitive statement about an unclear issue. You are asking for flames.
FWIW, I think mesa should be shipped with patented algorithms disabled and a configure switch to enable them. That should avoid legal problems for anybody who is interested in doing so.

Zack said...

@Andreas: there is nothing unclear about the issue. It might be unclear to you, but it's not to any lawyer we ever talked to about those issues. So unless you fulfill the requirements I mentioned in the last paragraph then your opinion is just not really useful to anyone. Sorry, "but this guy said on the internet" doesn't form a valid legal defense in court.

Myxal said...

@Zack:
This isn't "one guy on the internets said", this is "FreeType did it this way and were acknowledged as legit by the patent holders, why can't mesa do the same"? I have yet to get a clear answer to this question. "Beacuse I/my lawyers said so" does not pass an answer.

Zack said...

@Myxal: They're completely different patents. And if I recall correctly they didn't enable it by default as well, the patent had an expiration date and the company holding it wasn't explicitly addressing free software implementations. Anyway how does this matter at all? Do you actually think that you know more about copyright laws than the team of copyright lawyers that at least one billion dollar company using Mesa3D has on retainer and had them looking at stuff? Even if we assume that you're the greatest lawyer of them at all, unless you're willing to take that case then again, you'll be just expressing one more useless opinion.

Myxal said...

@Zack:
Ryan Gordon notwithstanding, the submitters' goal is NOT to enable it by default. Obviously the patents are different. Point being, the source code wasn't covered by the patent and wouldn't compile into an infringing binary by default. Can you explain how are the OpenGL patents different from this? Do they cover the source code or something?
"lawyers in a billion dollar company" - your appeal to authority has been noted. Has anyone actually talked to the patent holders?
"Anyway how does this matter at all?" It matters because there's a world outside of soft-patent-upholding jurisdictions, and millions of users in this world are crippled because mainline mesa maintainers are sabotaging efforts to make enabling these features easy by a compile-switch. Dozens of projects (media codecs in particular) have code that produces infringing binaries *AT USER'S OPTION* in them, are you saying the OpenGL patents are so special that you can't even distribute -disabled by default- source code?

Zack said...

@Myxal: "and millions of users in this world are crippled because mainline mesa maintainers are sabotaging efforts"...
Yes, all those people who dedicated their lives to writing free software graphics are out to screw people.

I'm not having an opinion poll about the law. If you are a lawyer and think that you can fight s3tc or floating point patents and are willing to provide legal expertise to the mesa3d project, awesome. Instead of talking to me, talk to the patent holders. They're hard to get a hold of but our lawyers managed to do it, so surely you won't have a problem with it. If you can come back with a legally binding settlement I'm sure we can whip out a new release in a few days.

Understand this, you're not convincing me, I don't matter, I'm not a lawyer, just one of the assholes who happen to have commit access to the code - you're fighting against every legal advice we've ever gotten. Unless you are a lawyer and can provide a legally binding council then we're done.

Trying to provide legal council without even the basic prerequisites for doing so (law degree) without ever having to face consequences (not being a distributor, or at least a developer) is simply a despicable thing to do.

In fact I'm sorry but unless you are a lawyer or a distributor I'll be deleting your comments from now on.

Anonymous said...

Wow, you seem to be really pissed off. Why, exactly? Why can't you stay cool and discuss that topic with actual arguments? (I'm quite confident you have some, if you hadn't you wouldn't have written this blog post)

Threatening people that want to discuss your blog post with "I'll delete your comments if you are no lawyer" is absolutely counter-productive.

Zack said...

"We" as in "I and anonymous people on the internet" are not having a discussion. That's what this is all about. In this case your delusions of grandeur don't count for much unless you can actually back them up with legal credentials. How dumb do you have to be to not understand that anonymous "pfff, I think you can do it" is utterly useless when you're being sued? How dumb do you have to be to not understand that anonymous internet "go for it" vs "you absolutely can't" formed by an entire team of lawyers, are not two equally valid opinions.
I'm not mad or angry it's simply that unless you have the credentials (distributor, lawyer...) then your opinion is in this case utterly useless and there was enough of them already posted above.

FelipeC said...

Don't confuse Open Source with GPL. GPL has problems with patents, Open Source doesn't.

See for example Android; it's riddled with patents (from US perspective), yet the source code is open (with Apache license).

So companies are happy to ship that code (paying the right patents), contribute to it (they don't loose their patents), and people like me who don't give a shit can compile it and use it.

Problem solved.

Zack said...

@FelipeC: right, that's exactly why I used the term Free Software and referred to freedom and haven't mentioned Open Source. We provide Free Software. The difference is explained in a number of essays online.

castano said...

Having written a DXT compression library for a major IHV I've discussed these issues with several lawyers and hopefully that qualifies me to express my informed opinion.

First, the S3TC patent covers some variations of a decompression algorithm and a very particular compression algorithm. For your reference, see:

http://www.google.com/patents?id=QEEZAAAAEBAJ

There are other compression and decompression methods that are not patented, and some that are, while there's not too much room for innovation in the decompression, there's definitely plenty of room for new compression algorithms, and in fact various open source and free implementations exist.

Also, as far as I know, most applications do not need Mesa to compress or decompress DXT textures. I know OpenGL does support that, but in practice what most applications do is to send the raw data to the GPU and have the GPU decompress it. GPU vendors have a license of the patent, and even if they did not, that's not your problem.

I always thought that Mesa supported this usage, and that you were only required to link to a third party library in order to have a full implementation of the OpenGL spec, but reading Ryan's complaints one would think that's not the case. Can you clarify?

BTW, I'd highly recommend to *never* look at the patent database, because otherwise you would have to remove so many features from Mesa that it would probably render it completely useless.

Zack said...

@castano: hey Ignacio. Yea, that's all correct. The issue is that we don't expose GL_EXT_texture_compression_s3tc or GL_S3_s3tc without being able to compress/decompress those things. Having said that there's a way to get around it (setting "force_s3tc_enable" in dri config) which is very useful in certain cases but again, also not the default. The snafu that prevents it from being the default is that we can't just expose those extensions by default and start dropping textures/rendering when they require compress/decompress. It's trivial to diagnose when it's not working (lacking extension vs. 'things are not rendering') and trivial to get it working (install a lib in countries where patents don't hold) and is not illegal.

"I'd highly recommend to *never* look at the patent database", you know I actually thought the same thing but when we were talking to the lawyers a year ago one of them mentioned that this is no longer valid, which is good because it always seemed like an arbitrary rule. Anyway, what makes s3tc and floating point textures special is that the companies holding the relevant patents engage in active defense of them (i.e. they sue people). The best part is that even if a hardware vendor buys a license for the given os/api combination it would still be legally murky because legally you wouldn't be able to fork Mesa3D and distribute the given driver yourself since you didn't buy the license the ihv did, hence Mesa3D wouldn't really be Free Software...

Until patent holders grant us permission to use this stuff in Free Software without restrictions or some company wins a battle in court with them it's going to remain very sketchy and very unlikely that any company distributing Mesa3D would ship this stuff by default. I think the best thing we can do is what we're doing which is make it as easy as possible to get the functionality via some hooks/third party lib installation.

castano said...

You guys should then define a new MESA_texture_compression extension that provides a subset of ARB_tc restricting the supported operations to those that do not require driver compression or decompression. I'm sure that would satisfy the requirements of 99.9% of the existing applications and should be perfectly safe from a legal standpoint. Note there's already a precedent for this in OpenGL ES, but the motivation in that case was to keep the driver lean.

Zack said...

@castano: yea, unfortunately that won't help any of the existing apps and it depends on future apps/libs checking for it. Plus it still gets murky when it comes to decompression (both in Mesa3D or on the GPU) because majority of our drivers is not written by hardware vendors so it's not even a given that a vendor has a license for our os/env. I have no clue who gets sued in that case but the bottom line is that if a texture compressed by anything patent related is being passed through the stack things get complicated no matter what you do.

castano said...

> @castano: yea, unfortunately that won't
> help any of the existing apps and it
> depends on future apps/libs checking for
> it.

Ryan can probably update most of the games he has ported and open source games can be updated easily. I still think you should make it easy for users to expose the ARB_tc extension string for backward compatibility, but looking forward, I think this could be a satisfactory solution.


> Plus it still gets murky when
> it comes to decompression (both in
> Mesa3D or on the GPU) because majority of
> our drivers is not written by hardware
> vendors so it's not even a given that
> a vendor has a license for our os/env. I
> have no clue who gets sued in that case

If you don't have a license, then you should not support DXT decompression on your software driver. Even if you do have a license, as you point out, the driver won't be free software. If a third party driver developer does want to support it, I would guess that's their problem.


> but the bottom line is that if a texture
> compressed by anything patent
> related is being passed through the stack
> things get complicated no matter
> what you do.

I just don't buy that argument. The Mesa frontend in this case is an intermediary and its only responsibility is to transfer bits from the application to the driver, it does not care how these bits are produced or interpreted.

Zack said...

> I just don't buy that argument. The
> Mesa frontend in this case is an
> intermediary and its only
> responsibility is to transfer bits
> from the application to the driver,
> it does not care how these bits are
> produced or interpreted.

See the thing is that it doesn't matter who buys or doesn't buy that argument, how many people are for it or how many people are against it. If it was just a difference of opinion some of the distros would simply add that code and ship it in their packages, but that's not the case. What does matter is whether the lawyers of any of the companies distributing Mesa3D would take on that risk and right now the answer is a very clear no.

Anonymous said...

s3tc? what for? i never see any application or game, that was not able to run without it. s3tc is not needed.

-Geri

Will said...

Is the PowerVR texture format as encumbered by patents?

(Am evaluating if an OS game can safely contain such textures etc)

Maximiliano said...

could be just a question, "do you live in US?" if yes, it disable the S3TC, if not it enable it...because the worlds is not US... so us laws are not applicable in all countrys.