<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That's an interesting idea!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
llvmpipe rasterization is complicated and very optimized, so changing llvmpipe's rasterizer to spit out MSAA coverages is very hard.  I think that a good way to approach this is to:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
1) continue to do single sample rasterization, but adjust the line coeffs of the triangles edges
<span style="background-color:rgb(255, 255, 255);display:inline !important">(in llvmpipe rasterizer code known as<span> </span></span><i style="background-color:rgb(255, 255, 255)">plane coefficients</i><span style="background-color:rgb(255, 255, 255);display:inline !important">)
 to</span> do conservative rasterization (ie, so that any fragment that intersects a triangle is covered) when MSAA is enabled.  See <a href="https://developer.nvidia.com/content/dont-be-conservative-conservative-rasterization">https://developer.nvidia.com/content/dont-be-conservative-conservative-rasterization</a></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
2) once inside the fragment shader, compute SampleMaskIn from the unadjusted vertex positions, using the desired number of samples (and corresponding sample pattern)</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
None of this would be throwaway work: the <span style="background-color:rgb(255, 255, 255);display:inline !important">SampleMaskIn<span> are correct and </span></span>could be used for full MSAA support in the future too, and the conservative rasterization
 could be a feature on its own right too eventually.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Jose</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> mesa-dev <mesa-dev-bounces@lists.freedesktop.org> on behalf of Marek Olšák <maraeo@gmail.com><br>
<b>Sent:</b> Wednesday, January 6, 2021 05:57<br>
<b>To:</b> Brian Paul <brianp@vmware.com><br>
<b>Cc:</b> mesa-dev@lists.freedesktop.org <mesa-dev@lists.freedesktop.org>; mesa-users@lists.freedesktop.org <mesa-users@lists.freedesktop.org><br>
<b>Subject:</b> Re: [Mesa-dev] Fwd: [Mesa-users] Issues with removal of classic OSMesa</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>llvmpipe could implement line and polygon smoothing by rasterizing in MSAA and passing the coverage to SampleMaskIn in the fragment shader, but doing Z/S tests and color writes and everything else single-sampled. Then, FragColor.a *= bitcount(SampleMaskIn)
 / (float)num_samples. It's roughly what OpenGL requires. There is at least one other gallium driver that does that.</div>
<div><br>
</div>
<div>Marek<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Mon, Jan 4, 2021 at 3:02 PM Brian Paul <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Hi Andreas,<br>
<br>
I'm forwarding your message to the mesa-dev list for better visibility.<br>
<br>
BTW, when you say "antialiasing" below, what exactly do you mean?<br>
<br>
-Brian<br>
<br>
<br>
-------- Forwarded Message --------<br>
Subject:        [Mesa-users] Issues with removal of classic OSMesa<br>
Date:   Thu, 31 Dec 2020 12:56:04 +0100<br>
From:   Andreas Fänger <<a href="mailto:a.faenger@e-sign.com" target="_blank">a.faenger@e-sign.com</a>><br>
To:     <a href="mailto:mesa-users@lists.freedesktop.org" target="_blank">mesa-users@lists.freedesktop.org</a><br>
<br>
Hi,<br>
<br>
I've just seen that classic OSMesa has been removed (again) from Mesa3D <br>
a few weeks ago with this commit "mesa: Retire classic OSMesa".<br>
<br>
We are still actively using classical OSMesa for high quality rendering <br>
of still images in a headless environment with no GPU support <br>
(server-based rendering on windows and linux)<br>
<br>
Unfortunately, none of the alternative software renderers provide all <br>
the features that we require, which is antialiasing and anisotropic <br>
filtering. The current state is (correct me if I'm wrong)<br>
<br>
* softpipe: anisotropic filtering is supported, no antialiasing<br>
<br>
* llvmpipe: no anisotropic filtering, has MSAA<br>
<br>
* openswr: no anisotropic filtering, has MSAA, no OSMesa interface (?)<br>
<br>
We had hoped that classical OSMesa is only removed when there is a full <br>
replacement after the discussions in 2016 when OSMesa was about to be <br>
removed for the first time<br>
<br>
<a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Farchives%2Fmesa-dev%2F2016-March%2F109665.html&data=04%7C01%7Cjfonseca%40vmware.com%7C38811048f7d4434b32cc08d8b208137f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637455095057094583%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HjIWy%2B4Mip6TkKYWUEuix41bPSgHUzZqgzwnBnjtBWA%3D&reserved=0" originalsrc="https://lists.freedesktop.org/archives/mesa-dev/2016-March/109665.html" shash="QsypgK/evogj8KyJyyoO1ZtZgxRySq6m1LjnUjdbv2e2uFT1LtHTEHx/wCJvj06vW90+1PTFkvpPaGivkq3BoMv/sFUVR0fH9Sy5R6+vRJdfWeX+wEkVU1QDMUxbp8lmRHixSrdOjCCbBPU+zeTvDWE626sw5gsiY6DiMX2DFWc=" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/mesa-dev/2016-March/109665.html</a><br>
<br>
<a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Farchives%2Fmesa-users%2F2016-March%2F001132.html&data=04%7C01%7Cjfonseca%40vmware.com%7C38811048f7d4434b32cc08d8b208137f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637455095057094583%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nSZ3ZSfFRt8Z06avVzILOg4TipMkZ9CLyGMONcOkZxk%3D&reserved=0" originalsrc="https://lists.freedesktop.org/archives/mesa-users/2016-March/001132.html" shash="XoCs7t3xUr75U9W0nQqSFnuPiVZMpJLd6lnlziI6ErVtsAxW/EzqMycTN6sJH1Qmxl4xaqwk6PVC0W1Bm+sCmOHDANxvNnX/Fu3mlPmHFMGxWyfXz76f2KItOHBhKpRjLumsjBLKgspXMP6oUAIpNLQx/VbU5ZKt9WdShu0c5hk=" rel="noreferrer" target="_blank">https://lists.freedesktop.org/archives/mesa-users/2016-March/001132.html</a><br>
<br>
and the commit that reverted the removal<br>
<br>
<a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcgit.freedesktop.org%2Fmesa%2Fmesa%2Fcommit%2F%3Fid%3D9601815b4be886f4d92bf74916de98f3bdb7275c&data=04%7C01%7Cjfonseca%40vmware.com%7C38811048f7d4434b32cc08d8b208137f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637455095057104572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DufgWCKsN0v1nvTnT9VmyRkTSWiksioEYKIabLO%2BDvI%3D&reserved=0" originalsrc="http://cgit.freedesktop.org/mesa/mesa/commit/?id=9601815b4be886f4d92bf74916de98f3bdb7275c" shash="zy6gGXfEHbwEPonPDNxdnAqGENPCan8D9OdKWMPpDXomvMPpyuzYQKTZjq365cmeK592Q79z6iklrPW4fqRbddOaZ2jSnfAjgNBdiVIRcX0IXEHKE9MoB4VgmdOdvw6xD/hNldYDEIXDYMwc6SjVQgvkfAkhhSdPh16aDEkyCXg=" rel="noreferrer" target="_blank">http://cgit.freedesktop.org/mesa/mesa/commit/?id=9601815b4be886f4d92bf74916de98f3bdb7275c</a><br>
<br>
Are there any plans to enhance the renderers so that at least one of <br>
them is providing both anisotropic filtering and antialiasing?<br>
<br>
As far as I know, anisotropic texture filtering is also one of the <br>
OpenGL 4.6 requirements.<br>
<br>
In 2016 I was told that there are only very few developers involved in <br>
llvmpipe and that chances are not high that someone is going to port the <br>
softpipe anisotropic filtering implementation as llvmpipe is much more <br>
complex. Is there any change in that situation?<br>
<br>
If there are no such plans, is there any chance of reverting this commit <br>
again so that classical OSMesa is available for windows and linux in <br>
mesa >20?<br>
<br>
Regards,<br>
<br>
Andreas Fänger<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=04%7C01%7Cjfonseca%40vmware.com%7C38811048f7d4434b32cc08d8b208137f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637455095057104572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kU2Sz0FyTbVjirPOPsjm6hGVjJJuLg5qeCB93NnNuJk%3D&reserved=0" originalsrc="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" shash="r5cV+T/XTQk+Z6wYsPLw7H0WXMj4E4du9JRx2DK+I2IyW+xGl4wEXTTjcJE9d8bnZ0jDEjNX2ncwUafX3FjohskmQDeRB22F0CV2WZSM0DfvVhqV8yzzWCiRBpKdu4Tst+A0cQOGGAYgTYD1VGg6XCjO9SdjKIbO4HvKJPqxZvo=" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote>
</div>
</div>
</body>
</html>