Skip to content

Commit

Permalink
Add Mesa spec for NVK
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Feb 9, 2024
1 parent 49de5ca commit 141da21
Show file tree
Hide file tree
Showing 4 changed files with 854 additions and 0 deletions.
117 changes: 117 additions & 0 deletions staging/mesa/Mesa-MLAA-License-Clarification-Email.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@

Subject: RE: Question about Mesa MLAA license
From: Jorge Jimenez <[email protected]>
Date: 01/08/2013 12:50 PM
To: Tom Callaway <[email protected]>
CC: "[email protected]" <[email protected]>

Yes to both questions.

Thanks,
Jorge

From: Tom Callaway <[email protected]>
Sent: January 8, 2013 6:49 PM
To: Jorge Jimenez <[email protected]>
CC: [email protected]
Subject: Re: Question about Mesa MLAA license

On 01/08/2013 12:39 PM, Jorge Jimenez wrote:
> Hi Tom,
>
> What we meant with that is that we made an exception for clause 2.
> Instead of clause 2, in the case of the Mesa project, you have to name
> the technique Jimenez's MLAA in the config options of Mesa. We did that
> just to allow them to solve license issues. This exception should be for
> the Mesa project, and any project using Mesa, like Fedora.
>
> We want to widespread usage of our MLAA, so we want to avoid any kind of
> license complications. Hope current one is good for Fedora, if not
> please tell, and we'll see what we can do!

Okay, a few more questions:

* If Fedora decides to simply reproduce the quoted statement:
"Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia,
Jose I. Echevarria, Fernando Navarro and Diego Gutierrez."

Specifically, if this is done as part of documentation included with
Mesa, is that sufficient to meet clause 2 even if the Mesa config option
is not set as described in your exception?

* Currently, the Mesa config option for MLAA says: "Morphological
anti-aliasing based on Jimenez\' MLAA. 0 to disable, 8 for default
quality". Is this in compliance with your exception?

Thanks again,

~tom

==
Fedora Project

Subject: RE: Question about Mesa MLAA license
From: Jorge Jimenez <[email protected]>
Date: 01/08/2013 12:39 PM
To: "[email protected]" <[email protected]>, Tom Callaway <[email protected]>

Hi Tom,

What we meant with that is that we made an exception for clause 2.
Instead of clause 2, in the case of the Mesa project, you have to name
the technique Jimenez's MLAA in the config options of Mesa. We did that
just to allow them to solve license issues. This exception should be for
the Mesa project, and any project using Mesa, like Fedora.

We want to widespread usage of our MLAA, so we want to avoid any kind of
license complications. Hope current one is good for Fedora, if not
please tell, and we'll see what we can do!

Cheers,
Jorge

From: Tom Callaway <[email protected]>
Sent: January 8, 2013 6:30 PM
To: [email protected]
Subject: Question about Mesa MLAA license

Jorge,

Thanks for all of your fantastic graphics work! I have been auditing
Fedora (a popular distribution of Linux) for license compliance and I
came across your MLAA code in Mesa.

The license says:

* 2. Redistributions in binary form must reproduce the following
statement:
*
* "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia,
* Jose I. Echevarria, Fernando Navarro and Diego Gutierrez."
*
* Only for use in the Mesa project, this point 2 is filled by naming the
* technique Jimenez's MLAA in the Mesa config options.

That wording is unclear. When you say "Only for use in the Mesa
project...", it seems like you could either be saying:

- This code may only be used as part of Mesa.

OR

- In Mesa, you can comply with clause 2 by simply selecting "Jimenez's
MLAA" in the Mesa config options.

*****

If the first item is true, then we may have to remove the MLAA code from
Fedora's copy of Mesa. However, looking at the license on your SMAA
code, I do not believe it to be the case. Please let me know either way!

Thanks in advance,

Tom Callaway
Fedora Legal

==
Fedora Project
11 changes: 11 additions & 0 deletions staging/mesa/gnome-shell-glthread-disable.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -up mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf.dma mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf
--- mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf.dma 2022-11-25 10:32:32.175879868 +1000
+++ mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf 2022-11-25 10:32:43.743067470 +1000
@@ -653,6 +653,7 @@ TODO: document the other workarounds.
<application name="gnome-shell" executable="gnome-shell">
<option name="adaptive_sync" value="false" />
<option name="v3d_nonmsaa_texture_size_limit" value="true" />
+ <option name="mesa_glthread" value="false"/>
</application>
<application name="Desktop — Plasma" executable="plasmashell">
<option name="adaptive_sync" value="false" />
42 changes: 42 additions & 0 deletions staging/mesa/mesa-meson-c99.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
meson: C type error in strtod_l/strtof_l probe

Future compilers will fail compilation due to the C type error:

…/testfile.c: In function 'main':
…/testfile.c:12:30: error: passing argument 2 of 'strtod_l' from incompatible pointer type
12 | double d = strtod_l(s, end, loc);
| ^~~
| |
| char *
/usr/include/stdlib.h:416:43: note: expected 'char ** restrict' but argument is of type 'char *'
416 | char **__restrict __endptr, locale_t __loc)
| ~~~~~~~~~~~~~~~~~~^~~~~~~~
…/testfile.c:13:29: error: passing argument 2 of 'strtof_l' from incompatible pointer type
13 | float f = strtof_l(s, end, loc);
| ^~~
| |
| char *
/usr/include/stdlib.h:420:42: note: expected 'char ** restrict' but argument is of type 'char *'
420 | char **__restrict __endptr, locale_t __loc)
| ~~~~~~~~~~~~~~~~~~^~~~~~~~

This means that the probe no longer tests is objective and always
fails.

Submitted upstream: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26927>

diff --git a/meson.build b/meson.build
index 35cc5f1cd5fd9079..1a5d2ba492be0b31 100644
--- a/meson.build
+++ b/meson.build
@@ -1425,8 +1425,8 @@ if cc.links('''
locale_t loc = newlocale(LC_CTYPE_MASK, "C", NULL);
const char *s = "1.0";
char *end;
- double d = strtod_l(s, end, loc);
- float f = strtof_l(s, end, loc);
+ double d = strtod_l(s, &end, loc);
+ float f = strtof_l(s, &end, loc);
freelocale(loc);
return 0;
}''',
Loading

0 comments on commit 141da21

Please sign in to comment.