Re: llvmpipe MSAA (Was: Fwd: [Mesa-users] Issues with removal of classic OSMesa)

Marek Olšák <[email protected]>
Newsgroups gmane.comp.video.mesa3d.devel,gmane.comp.video.mesa3d.user
Message-ID <CAAxE2A5q4TVZ6s60=MTGpsEJ+Xwh=7y5WfMyU2BRZpjwdKS6Kw@mail.gmail.com>
It looks like llvmpipe has real MSAA with NIR.

Marek


On Wed, Jan 6, 2021 at 5:06 AM Jose Fonseca <[email protected]> wrote:

> That's an interesting idea!
>
> 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:
>
> 1) continue to do single sample rasterization, but adjust the line coeffs
> of the triangles edges (in llvmpipe rasterizer code known as *plane
> coefficients*) to do conservative rasterization (ie, so that any fragment
> that intersects a triangle is covered) when MSAA is enabled.  See
> https://developer.nvidia.com/content/dont-be-conservative-conservative-rasterization
>
> 2) once inside the fragment shader, compute SampleMaskIn from the
> unadjusted vertex positions, using the desired number of samples (and
> corresponding sample pattern)
>
> None of this would be throwaway work: the SampleMaskIn are correct and 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.
>
> Jose
>
> ------------------------------
> *From:* mesa-dev <[email protected]> on behalf of
> Marek Olšák <[email protected]>
> *Sent:* Wednesday, January 6, 2021 05:57
> *To:* Brian Paul <[email protected]>
> *Cc:* [email protected] <[email protected]>;
> [email protected] <[email protected]>
> *Subject:* Re: [Mesa-dev] Fwd: [Mesa-users] Issues with removal of
> classic OSMesa
>
> Hi,
>
> 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.
>
> Marek
>
> On Mon, Jan 4, 2021 at 3:02 PM Brian Paul <[email protected]> wrote:
>
> Hi Andreas,
>
> I'm forwarding your message to the mesa-dev list for better visibility.
>
> BTW, when you say "antialiasing" below, what exactly do you mean?
>
> -Brian
>
>
> -------- Forwarded Message --------
> Subject:        [Mesa-users] Issues with removal of classic OSMesa
> Date:   Thu, 31 Dec 2020 12:56:04 +0100
> From:   Andreas Fänger <[email protected]>
> To:     [email protected]
>
> Hi,
>
> I've just seen that classic OSMesa has been removed (again) from Mesa3D
> a few weeks ago with this commit "mesa: Retire classic OSMesa".
>
> We are still actively using classical OSMesa for high quality rendering
> of still images in a headless environment with no GPU support
> (server-based rendering on windows and linux)
>
> Unfortunately, none of the alternative software renderers provide all
> the features that we require, which is antialiasing and anisotropic
> filtering. The current state is (correct me if I'm wrong)
>
> * softpipe: anisotropic filtering is supported, no antialiasing
>
> * llvmpipe: no anisotropic filtering, has MSAA
>
> * openswr: no anisotropic filtering, has MSAA, no OSMesa interface (?)
>
> We had hoped that classical OSMesa is only removed when there is a full
> replacement after the discussions in 2016 when OSMesa was about to be
> removed for the first time
>
> https://lists.freedesktop.org/archives/mesa-dev/2016-March/109665.html
> <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>
>
> https://lists.freedesktop.org/archives/mesa-users/2016-March/001132.html
> <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>
>
> and the commit that reverted the removal
>
>
> http://cgit.freedesktop.org/mesa/mesa/commit/?id=9601815b4be886f4d92bf74916de98f3bdb7275c
> <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>
>
> Are there any plans to enhance the renderers so that at least one of
> them is providing both anisotropic filtering and antialiasing?
>
> As far as I know, anisotropic texture filtering is also one of the
> OpenGL 4.6 requirements.
>
> In 2016 I was told that there are only very few developers involved in
> llvmpipe and that chances are not high that someone is going to port the
> softpipe anisotropic filtering implementation as llvmpipe is much more
> complex. Is there any change in that situation?
>
> If there are no such plans, is there any chance of reverting this commit
> again so that classical OSMesa is available for windows and linux in
> mesa >20?
>
> Regards,
>
> Andreas Fänger
>
> _______________________________________________
> mesa-dev mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> <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>
>
>

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.