[Mesa-dev] scons: build osmesa swrast and gallium

Submitted by Andreas Fänger on March 8, 2016, 11:04 a.m.

Details

Message ID 1457435040-5524-2-git-send-email-a.faenger@e-sign.com
State New
Headers show
Series "scons: build osmesa swrast and gallium" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Andreas Fänger March 8, 2016, 11:04 a.m.
This patch makes it possible to build classic osmesa/swrast on windows
again. It was removed in commit 69db422218b0264b5b8eef45bd003a2544e9cbd6.
Although there is a gallium version of osmesa now, the swrast version
still has more features lacking in llvmpipe, e.g. anisotropic filtering.
---
 src/mesa/drivers/SConscript        |    2 +
 src/mesa/drivers/osmesa/SConscript |   40 ++++++++++++++++++++++++++++++++++++
 src/mesa/drivers/osmesa/osmesa.def |   15 +++++++++++++
 3 files changed, 57 insertions(+), 0 deletions(-)
 create mode 100644 src/mesa/drivers/osmesa/SConscript
 create mode 100644 src/mesa/drivers/osmesa/osmesa.def

Patch hide | download patch | download mbox

diff --git a/src/mesa/drivers/SConscript b/src/mesa/drivers/SConscript
index 5d654f5..476425b 100644
--- a/src/mesa/drivers/SConscript
+++ b/src/mesa/drivers/SConscript
@@ -1,5 +1,7 @@ 
 Import('*')
 
+SConscript('osmesa/SConscript')
+
 if env['x11']:
     SConscript('x11/SConscript')
 
diff --git a/src/mesa/drivers/osmesa/SConscript b/src/mesa/drivers/osmesa/SConscript
new file mode 100644
index 0000000..5933f07
--- /dev/null
+++ b/src/mesa/drivers/osmesa/SConscript
@@ -0,0 +1,40 @@ 
+Import('*')
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+    '#src',
+    '#src/mapi',
+    '#src/mesa',
+    Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
+])
+
+env.Prepend(LIBS = [
+    mesautil,
+    glapi,
+    compiler,
+    mesa,
+    glsl,
+])
+
+sources = [
+    'osmesa.c',
+]
+
+if env['platform'] == 'windows':
+    env.AppendUnique(CPPDEFINES = [
+        '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
+        'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers 
+    ])
+    if not env['gles']:
+        # prevent _glapi_* from being declared __declspec(dllimport)
+        env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
+
+    sources += ['osmesa.def']
+    
+osmesa = env.SharedLibrary(
+    target ='osmesa',
+    source = sources,
+)
+
+env.Alias('osmesa', osmesa)
diff --git a/src/mesa/drivers/osmesa/osmesa.def b/src/mesa/drivers/osmesa/osmesa.def
new file mode 100644
index 0000000..06afab7
--- /dev/null
+++ b/src/mesa/drivers/osmesa/osmesa.def
@@ -0,0 +1,15 @@ 
+;DESCRIPTION 'Mesa OSMesa lib for Win32'
+VERSION 4.1
+
+EXPORTS
+	OSMesaColorClamp
+	OSMesaCreateContext
+	OSMesaCreateContextExt
+	OSMesaDestroyContext
+	OSMesaMakeCurrent
+	OSMesaGetCurrentContext
+	OSMesaPixelStore
+	OSMesaGetIntegerv
+	OSMesaGetDepthBuffer
+	OSMesaGetColorBuffer
+	OSMesaGetProcAddress

Comments

On 8 March 2016 at 11:04, Andreas Fänger <a.faenger@e-sign.com> wrote:
> This patch makes it possible to build classic osmesa/swrast on windows
> again. It was removed in commit 69db422218b0264b5b8eef45bd003a2544e9cbd6.
> Although there is a gallium version of osmesa now, the swrast version
> still has more features lacking in llvmpipe, e.g. anisotropic filtering.
> ---
>  src/mesa/drivers/SConscript        |    2 +
>  src/mesa/drivers/osmesa/SConscript |   40 ++++++++++++++++++++++++++++++++++++
>  src/mesa/drivers/osmesa/osmesa.def |   15 +++++++++++++
>  3 files changed, 57 insertions(+), 0 deletions(-)
>  create mode 100644 src/mesa/drivers/osmesa/SConscript
>  create mode 100644 src/mesa/drivers/osmesa/osmesa.def
>
Please squash a revert of c07df0f2014636b601cdbaff63214296599b1ad5.
Otherwise the release tarball will be missing these files.

Thanks
Emil
> -----Ursprüngliche Nachricht-----
> Von: Emil Velikov [mailto:emil.l.velikov@gmail.com]
> Gesendet: Dienstag, 8. März 2016 12:33
> 
> On 8 March 2016 at 11:04, Andreas Fänger <a.faenger@e-sign.com> wrote:
> > This patch makes it possible to build classic osmesa/swrast on windows
> > again. It was removed in commit
> 69db422218b0264b5b8eef45bd003a2544e9cbd6.
> > Although there is a gallium version of osmesa now, the swrast version
> > still has more features lacking in llvmpipe, e.g. anisotropic filtering.
> > ---
> >  src/mesa/drivers/SConscript        |    2 +
> >  src/mesa/drivers/osmesa/SConscript |   40
> ++++++++++++++++++++++++++++++++++++
> >  src/mesa/drivers/osmesa/osmesa.def |   15 +++++++++++++
> >  3 files changed, 57 insertions(+), 0 deletions(-)  create mode 100644
> > src/mesa/drivers/osmesa/SConscript
> >  create mode 100644 src/mesa/drivers/osmesa/osmesa.def
> >
> Please squash a revert of c07df0f2014636b601cdbaff63214296599b1ad5.
> Otherwise the release tarball will be missing these files.

Hi Emil,

I don't have a lot of experience with git, so I'm not sure what I have to do. Does this mean without the proposed changes the patch
will not be part of the upcoming  11.2.0 release, but will be included in a later release? 

Andreas
Here is the updated patch. It reverts changes to Makefile.am, too.

Andreas Fänger (1):
  scons: build osmesa swrast and gallium

 src/mesa/drivers/SConscript         |  2 ++
 src/mesa/drivers/osmesa/Makefile.am |  2 ++
 src/mesa/drivers/osmesa/SConscript  | 40 +++++++++++++++++++++++++++++++++++++
 src/mesa/drivers/osmesa/osmesa.def  | 15 ++++++++++++++
 4 files changed, 59 insertions(+)
 create mode 100644 src/mesa/drivers/osmesa/SConscript
 create mode 100644 src/mesa/drivers/osmesa/osmesa.def
Not that I really care what you can or can't build (and I won't comment
on build changes), what are those features lacking in llvmpipe, beside
from anisotropic filtering (which I always considered essentially
useless for a software renderer, albeit interesting if you're curious
about the math involved)?
Last time I checked llvmpipe/softpipe had a much more robust feature set
(especially when it comes to non-legacy GL features), for starters I'll
just mention working derivatives which is usually the first thing people
still using classic swrast are hitting bugs on...

Roland

Am 08.03.2016 um 12:04 schrieb Andreas Fänger:
> This patch makes it possible to build classic osmesa/swrast on windows
> again. It was removed in commit 69db422218b0264b5b8eef45bd003a2544e9cbd6.
> Although there is a gallium version of osmesa now, the swrast version
> still has more features lacking in llvmpipe, e.g. anisotropic filtering.
> ---
>  src/mesa/drivers/SConscript        |    2 +
>  src/mesa/drivers/osmesa/SConscript |   40 ++++++++++++++++++++++++++++++++++++
>  src/mesa/drivers/osmesa/osmesa.def |   15 +++++++++++++
>  3 files changed, 57 insertions(+), 0 deletions(-)
>  create mode 100644 src/mesa/drivers/osmesa/SConscript
>  create mode 100644 src/mesa/drivers/osmesa/osmesa.def
> 
> diff --git a/src/mesa/drivers/SConscript b/src/mesa/drivers/SConscript
> index 5d654f5..476425b 100644
> --- a/src/mesa/drivers/SConscript
> +++ b/src/mesa/drivers/SConscript
> @@ -1,5 +1,7 @@
>  Import('*')
>  
> +SConscript('osmesa/SConscript')
> +
>  if env['x11']:
>      SConscript('x11/SConscript')
>  
> diff --git a/src/mesa/drivers/osmesa/SConscript b/src/mesa/drivers/osmesa/SConscript
> new file mode 100644
> index 0000000..5933f07
> --- /dev/null
> +++ b/src/mesa/drivers/osmesa/SConscript
> @@ -0,0 +1,40 @@
> +Import('*')
> +
> +env = env.Clone()
> +
> +env.Prepend(CPPPATH = [
> +    '#src',
> +    '#src/mapi',
> +    '#src/mesa',
> +    Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
> +])
> +
> +env.Prepend(LIBS = [
> +    mesautil,
> +    glapi,
> +    compiler,
> +    mesa,
> +    glsl,
> +])
> +
> +sources = [
> +    'osmesa.c',
> +]
> +
> +if env['platform'] == 'windows':
> +    env.AppendUnique(CPPDEFINES = [
> +        '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
> +        'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers 
> +    ])
> +    if not env['gles']:
> +        # prevent _glapi_* from being declared __declspec(dllimport)
> +        env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
> +
> +    sources += ['osmesa.def']
> +    
> +osmesa = env.SharedLibrary(
> +    target ='osmesa',
> +    source = sources,
> +)
> +
> +env.Alias('osmesa', osmesa)
> diff --git a/src/mesa/drivers/osmesa/osmesa.def b/src/mesa/drivers/osmesa/osmesa.def
> new file mode 100644
> index 0000000..06afab7
> --- /dev/null
> +++ b/src/mesa/drivers/osmesa/osmesa.def
> @@ -0,0 +1,15 @@
> +;DESCRIPTION 'Mesa OSMesa lib for Win32'
> +VERSION 4.1
> +
> +EXPORTS
> +	OSMesaColorClamp
> +	OSMesaCreateContext
> +	OSMesaCreateContextExt
> +	OSMesaDestroyContext
> +	OSMesaMakeCurrent
> +	OSMesaGetCurrentContext
> +	OSMesaPixelStore
> +	OSMesaGetIntegerv
> +	OSMesaGetDepthBuffer
> +	OSMesaGetColorBuffer
> +	OSMesaGetProcAddress
>
On 8 March 2016 at 12:06, Andreas Fänger <a.faenger@e-sign.com> wrote:
>> -----Ursprüngliche Nachricht-----
>> Von: Emil Velikov [mailto:emil.l.velikov@gmail.com]
>> Gesendet: Dienstag, 8. März 2016 12:33
>>
>> On 8 March 2016 at 11:04, Andreas Fänger <a.faenger@e-sign.com> wrote:
>> > This patch makes it possible to build classic osmesa/swrast on windows
>> > again. It was removed in commit
>> 69db422218b0264b5b8eef45bd003a2544e9cbd6.
>> > Although there is a gallium version of osmesa now, the swrast version
>> > still has more features lacking in llvmpipe, e.g. anisotropic filtering.
>> > ---
>> >  src/mesa/drivers/SConscript        |    2 +
>> >  src/mesa/drivers/osmesa/SConscript |   40
>> ++++++++++++++++++++++++++++++++++++
>> >  src/mesa/drivers/osmesa/osmesa.def |   15 +++++++++++++
>> >  3 files changed, 57 insertions(+), 0 deletions(-)  create mode 100644
>> > src/mesa/drivers/osmesa/SConscript
>> >  create mode 100644 src/mesa/drivers/osmesa/osmesa.def
>> >
>> Please squash a revert of c07df0f2014636b601cdbaff63214296599b1ad5.
>> Otherwise the release tarball will be missing these files.
>
> Hi Emil,
>
> I don't have a lot of experience with git, so I'm not sure what I have to do. Does this mean without the proposed changes the patch
> will not be part of the upcoming  11.2.0 release, but will be included in a later release?
>
Applying the suggestion has nothing to do with this ending up in
11.2.0 release. For that one should add the following line (stable
tag) in the commit message:

Cc: "11.2" <mesa-stable@lists.freedesktop.org>

On the topic of git... things are quite trivial actually.

# start from mesa/master
$ git revert 69db422218b0264b5b8eef45bd003a2544e9cbd6
# editor pops up and you fill in the justification/commit message
$ git revert c07df0f2014636b601cdbaff63214296599b1ad5
# editor pops up. mention something like the thing I did - a few lines above.
$ git rebase -i HEAD~2
# change the 'pick' in front of the second commit to "squash"
$ git commit --amend
# add the stable tag so that we pick the commit to the 11.2 branch.

If you want to be extra nice, you can version the patch (git
format-patch/send-email -v2) thus one doesn't end up picking the old
patch :-)

Personally I would do the above (I am pedantic at times), although
it'll be up-to Brian and others to decide.

-Emil
> -----Ursprüngliche Nachricht-----
> Von: Emil Velikov
> Gesendet: Dienstag, 8. März 2016 18:52
> Betreff: Re: [Mesa-dev] [PATCH] scons: build osmesa swrast and gallium
> 
> >> -----Ursprüngliche Nachricht-----
> >> Von: Emil Velikov [mailto:emil.l.velikov@gmail.com]
> >> Gesendet: Dienstag, 8. März 2016 12:33
> >>
> >> On 8 March 2016 at 11:04, Andreas Fänger <a.faenger@e-sign.com>
> wrote:
> >> > This patch makes it possible to build classic osmesa/swrast on
> >> > windows again. It was removed in commit
> >> 69db422218b0264b5b8eef45bd003a2544e9cbd6.
> >> > Although there is a gallium version of osmesa now, the swrast
> >> > version still has more features lacking in llvmpipe, e.g. anisotropic
> filtering.
> >> > ---
> >> >  src/mesa/drivers/SConscript        |    2 +
> >> >  src/mesa/drivers/osmesa/SConscript |   40
> >> ++++++++++++++++++++++++++++++++++++
> >> >  src/mesa/drivers/osmesa/osmesa.def |   15 +++++++++++++
> >> >  3 files changed, 57 insertions(+), 0 deletions(-)  create mode
> >> > 100644 src/mesa/drivers/osmesa/SConscript
> >> >  create mode 100644 src/mesa/drivers/osmesa/osmesa.def
> >> >
> >> Please squash a revert of c07df0f2014636b601cdbaff63214296599b1ad5.
> >> Otherwise the release tarball will be missing these files.
> >
> > Hi Emil,
> >
> > I don't have a lot of experience with git, so I'm not sure what I have
> > to do. Does this mean without the proposed changes the patch will not be
> part of the upcoming  11.2.0 release, but will be included in a later release?
> >
> Applying the suggestion has nothing to do with this ending up in
> 11.2.0 release. For that one should add the following line (stable
> tag) in the commit message:
> 
> Cc: "11.2" <mesa-stable@lists.freedesktop.org>
> 
> On the topic of git... things are quite trivial actually.
> 
> # start from mesa/master
> $ git revert 69db422218b0264b5b8eef45bd003a2544e9cbd6
> # editor pops up and you fill in the justification/commit message $ git revert
> c07df0f2014636b601cdbaff63214296599b1ad5
> # editor pops up. mention something like the thing I did - a few lines above.
> $ git rebase -i HEAD~2
> # change the 'pick' in front of the second commit to "squash"
> $ git commit --amend
> # add the stable tag so that we pick the commit to the 11.2 branch.
> 
> If you want to be extra nice, you can version the patch (git format-
> patch/send-email -v2) thus one doesn't end up picking the old patch :-)
> 
> Personally I would do the above (I am pedantic at times), although it'll be up-
> to Brian and others to decide.
> 

Ok, thanks. Did you see my other patch? Would that be ok or do I have to send in another one created with the commands you have described?

Andreas
> -----Ursprüngliche Nachricht-----
> Von: Roland Scheidegger
> Gesendet: Dienstag, 8. März 2016 18:26
> Betreff: Re: [Mesa-dev] [PATCH] scons: build osmesa swrast and gallium
> 
> Not that I really care what you can or can't build (and I won't comment on
> build changes), what are those features lacking in llvmpipe, beside from
> anisotropic filtering (which I always considered essentially useless for a
> software renderer, albeit interesting if you're curious about the math
> involved)?
> Last time I checked llvmpipe/softpipe had a much more robust feature set
> (especially when it comes to non-legacy GL features), for starters I'll just
> mention working derivatives which is usually the first thing people still using
> classic swrast are hitting bugs on...
> 

We are using osmesa for rendering single images on a server. No shaders at the moment, only texturing (fixed function pipeline). For us the qualitiy of the images is the most important criteria (and rendering speed, of course); therefore anisotropic filtering is absolutely necessary in order to achieve good looking images. The same with anti-aliasing: Currently we are using  GL_POLYGON_SMOOTH but this is also missing in gallium. We need an antialiasing method that is not simply blurring the whole image or texturese but affects only the edges of the polygons.

Andreas
> 
> Am 08.03.2016 um 12:04 schrieb Andreas Fänger:
> > This patch makes it possible to build classic osmesa/swrast on windows
> > again. It was removed in commit
> 69db422218b0264b5b8eef45bd003a2544e9cbd6.
> > Although there is a gallium version of osmesa now, the swrast version
> > still has more features lacking in llvmpipe, e.g. anisotropic filtering.
> > ---
> >  src/mesa/drivers/SConscript        |    2 +
> >  src/mesa/drivers/osmesa/SConscript |   40
> ++++++++++++++++++++++++++++++++++++
> >  src/mesa/drivers/osmesa/osmesa.def |   15 +++++++++++++
> >  3 files changed, 57 insertions(+), 0 deletions(-)  create mode 100644
> > src/mesa/drivers/osmesa/SConscript
> >  create mode 100644 src/mesa/drivers/osmesa/osmesa.def
> >
> > diff --git a/src/mesa/drivers/SConscript b/src/mesa/drivers/SConscript
> > index 5d654f5..476425b 100644
> > --- a/src/mesa/drivers/SConscript
> > +++ b/src/mesa/drivers/SConscript
> > @@ -1,5 +1,7 @@
> >  Import('*')
> >
> > +SConscript('osmesa/SConscript')
> > +
> >  if env['x11']:
> >      SConscript('x11/SConscript')
> >
> > diff --git a/src/mesa/drivers/osmesa/SConscript
> > b/src/mesa/drivers/osmesa/SConscript
> > new file mode 100644
> > index 0000000..5933f07
> > --- /dev/null
> > +++ b/src/mesa/drivers/osmesa/SConscript
> > @@ -0,0 +1,40 @@
> > +Import('*')
> > +
> > +env = env.Clone()
> > +
> > +env.Prepend(CPPPATH = [
> > +    '#src',
> > +    '#src/mapi',
> > +    '#src/mesa',
> > +    Dir('../../../mapi'), # src/mapi build path for python-generated
> > +GL API files/headers
> > +])
> > +
> > +env.Prepend(LIBS = [
> > +    mesautil,
> > +    glapi,
> > +    compiler,
> > +    mesa,
> > +    glsl,
> > +])
> > +
> > +sources = [
> > +    'osmesa.c',
> > +]
> > +
> > +if env['platform'] == 'windows':
> > +    env.AppendUnique(CPPDEFINES = [
> > +        '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
> > +        'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
> > +    ])
> > +    if not env['gles']:
> > +        # prevent _glapi_* from being declared __declspec(dllimport)
> > +        env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
> > +
> > +    sources += ['osmesa.def']
> > +
> > +osmesa = env.SharedLibrary(
> > +    target ='osmesa',
> > +    source = sources,
> > +)
> > +
> > +env.Alias('osmesa', osmesa)
> > diff --git a/src/mesa/drivers/osmesa/osmesa.def
> > b/src/mesa/drivers/osmesa/osmesa.def
> > new file mode 100644
> > index 0000000..06afab7
> > --- /dev/null
> > +++ b/src/mesa/drivers/osmesa/osmesa.def
> > @@ -0,0 +1,15 @@
> > +;DESCRIPTION 'Mesa OSMesa lib for Win32'
> > +VERSION 4.1
> > +
> > +EXPORTS
> > +	OSMesaColorClamp
> > +	OSMesaCreateContext
> > +	OSMesaCreateContextExt
> > +	OSMesaDestroyContext
> > +	OSMesaMakeCurrent
> > +	OSMesaGetCurrentContext
> > +	OSMesaPixelStore
> > +	OSMesaGetIntegerv
> > +	OSMesaGetDepthBuffer
> > +	OSMesaGetColorBuffer
> > +	OSMesaGetProcAddress
> >
Am 09.03.2016 um 08:41 schrieb Andreas Fänger:
>> -----Ursprüngliche Nachricht----- Von: Roland Scheidegger Gesendet:
>> Dienstag, 8. März 2016 18:26 Betreff: Re: [Mesa-dev] [PATCH] scons:
>> build osmesa swrast and gallium
>> 
>> Not that I really care what you can or can't build (and I won't
>> comment on build changes), what are those features lacking in
>> llvmpipe, beside from anisotropic filtering (which I always
>> considered essentially useless for a software renderer, albeit
>> interesting if you're curious about the math involved)? Last time I
>> checked llvmpipe/softpipe had a much more robust feature set 
>> (especially when it comes to non-legacy GL features), for starters
>> I'll just mention working derivatives which is usually the first
>> thing people still using classic swrast are hitting bugs on...
>> 
> 
> We are using osmesa for rendering single images on a server. No
> shaders at the moment, only texturing (fixed function pipeline). For
> us the qualitiy of the images is the most important criteria (and
> rendering speed, of course); therefore anisotropic filtering is
> absolutely necessary in order to achieve good looking images. The
> same with anti-aliasing: Currently we are using  GL_POLYGON_SMOOTH
> but this is also missing in gallium. We need an antialiasing method
> that is not simply blurring the whole image or texturese but affects
> only the edges of the polygons.

Ah ok. Gallium supports polygon smooth but the sw rasterization drivers
do not, it isn't supported by quite a lot of hw drivers neither (I
wasn't even aware swrast did), albeit of course hw drivers typically
support msaa (chances of llvmpipe getting support for msaa one day is
probably a lot higher than for polygon_smooth, albeit maybe the latter
could use mostly the same code as the former...).
Anisotropic would be interesting to implement, but it was just something
easy to skip (since no apis really require it) - there's just not many
developers working on llvmpipe...
Just don't get your hopes up for better support of modern GL features
for classic swrast.

Roland
> -----Ursprüngliche Nachricht-----
> Von: Roland Scheidegger Gesendet: Mittwoch, 9. März 2016 17:31
> Betreff: Re: [Mesa-dev] [PATCH] scons: build osmesa swrast and gallium
> 
> Am 09.03.2016 um 08:41 schrieb Andreas Fänger:
> >> -----Ursprüngliche Nachricht----- Von: Roland Scheidegger Gesendet:
> >> Dienstag, 8. März 2016 18:26 Betreff: Re: [Mesa-dev] [PATCH] scons:
> >> build osmesa swrast and gallium
> >>
> >> Not that I really care what you can or can't build (and I won't
> >> comment on build changes), what are those features lacking in
> >> llvmpipe, beside from anisotropic filtering (which I always
> >> considered essentially useless for a software renderer, albeit
> >> interesting if you're curious about the math involved)? Last time I
> >> checked llvmpipe/softpipe had a much more robust feature set
> >> (especially when it comes to non-legacy GL features), for starters
> >> I'll just mention working derivatives which is usually the first
> >> thing people still using classic swrast are hitting bugs on...
> >>
> >
> > We are using osmesa for rendering single images on a server. No
> > shaders at the moment, only texturing (fixed function pipeline). For
> > us the qualitiy of the images is the most important criteria (and
> > rendering speed, of course); therefore anisotropic filtering is
> > absolutely necessary in order to achieve good looking images. The same
> > with anti-aliasing: Currently we are using  GL_POLYGON_SMOOTH but this
> > is also missing in gallium. We need an antialiasing method that is not
> > simply blurring the whole image or texturese but affects only the
> > edges of the polygons.
> 
> Ah ok. Gallium supports polygon smooth but the sw rasterization drivers do
> not, it isn't supported by quite a lot of hw drivers neither (I wasn't even
> aware swrast did), albeit of course hw drivers typically support msaa
> (chances of llvmpipe getting support for msaa one day is probably a lot higher
> than for polygon_smooth, albeit maybe the latter could use mostly the same
> code as the former...).
> Anisotropic would be interesting to implement, but it was just something
> easy to skip (since no apis really require it) - there's just not many developers
> working on llvmpipe...
> Just don't get your hopes up for better support of modern GL features for
> classic swrast.
> 

We are interessted in using llvmpipe, however, this is why we currently cannot do the switch and have to stick to classic mesa.
It would be really great if msaa (or GL_POLYGON_SMOOTH) would be implemented in llvmpipe together with anisotropic filtering in the near future. There already is an implementation for anisotropic filtering for softpipe (and swrast), so maybe it's possible that one of the llvmpipe developers could port it? If people are concerned with speed, maybe make it optional and provide a compiler flag to turn it on or off?

Andreas
Am 10.03.2016 um 08:47 schrieb Andreas Fänger:
> 
>> -----Ursprüngliche Nachricht----- Von: Roland Scheidegger Gesendet:
>> Mittwoch, 9. März 2016 17:31 Betreff: Re: [Mesa-dev] [PATCH] scons:
>> build osmesa swrast and gallium
>> 
>> Am 09.03.2016 um 08:41 schrieb Andreas Fänger:
>>>> -----Ursprüngliche Nachricht----- Von: Roland Scheidegger
>>>> Gesendet: Dienstag, 8. März 2016 18:26 Betreff: Re: [Mesa-dev]
>>>> [PATCH] scons: build osmesa swrast and gallium
>>>> 
>>>> Not that I really care what you can or can't build (and I
>>>> won't comment on build changes), what are those features
>>>> lacking in llvmpipe, beside from anisotropic filtering (which I
>>>> always considered essentially useless for a software renderer,
>>>> albeit interesting if you're curious about the math involved)?
>>>> Last time I checked llvmpipe/softpipe had a much more robust
>>>> feature set (especially when it comes to non-legacy GL
>>>> features), for starters I'll just mention working derivatives
>>>> which is usually the first thing people still using classic
>>>> swrast are hitting bugs on...
>>>> 
>>> 
>>> We are using osmesa for rendering single images on a server. No 
>>> shaders at the moment, only texturing (fixed function pipeline).
>>> For us the qualitiy of the images is the most important criteria
>>> (and rendering speed, of course); therefore anisotropic filtering
>>> is absolutely necessary in order to achieve good looking images.
>>> The same with anti-aliasing: Currently we are using
>>> GL_POLYGON_SMOOTH but this is also missing in gallium. We need an
>>> antialiasing method that is not simply blurring the whole image
>>> or texturese but affects only the edges of the polygons.
>> 
>> Ah ok. Gallium supports polygon smooth but the sw rasterization
>> drivers do not, it isn't supported by quite a lot of hw drivers
>> neither (I wasn't even aware swrast did), albeit of course hw
>> drivers typically support msaa (chances of llvmpipe getting support
>> for msaa one day is probably a lot higher than for polygon_smooth,
>> albeit maybe the latter could use mostly the same code as the
>> former...). Anisotropic would be interesting to implement, but it
>> was just something easy to skip (since no apis really require it) -
>> there's just not many developers working on llvmpipe... Just don't
>> get your hopes up for better support of modern GL features for 
>> classic swrast.
>> 
> 
> We are interessted in using llvmpipe, however, this is why we
> currently cannot do the switch and have to stick to classic mesa. It
> would be really great if msaa (or GL_POLYGON_SMOOTH) would be
> implemented in llvmpipe together with anisotropic filtering in the
> near future. There already is an implementation for anisotropic
> filtering for softpipe (and swrast), so maybe it's possible that one
> of the llvmpipe developers could port it? If people are concerned
> with speed, maybe make it optional and provide a compiler flag to
> turn it on or off?
> 

I'm afraid there aren't really many llvmpipe developers. Nowadays, that
would be mostly me - and I'm not currently working on it as I've got
other things to do...
I don't think aniso would really have to be disabled at compile time due
to performance concerns, with the jit code there'd only be a performance
loss if it's actually enabled, in which case that should be ok (albeit
if there's apps anyone is interested in running on llvmpipe which don't
let you disable it could still have an env var or whatever to disable it).
Patches are welcome, though...

Roland
Here is the updated patch once more to include the "v2" label and to add the 11.2 stable tag as suggested by Emil Velikov.
The 2nd version of the patch also reverts changes to Makefile.am

Andreas Fänger (1):
  scons: build osmesa swrast and gallium

 src/mesa/drivers/SConscript         |  2 ++
 src/mesa/drivers/osmesa/Makefile.am |  2 ++
 src/mesa/drivers/osmesa/SConscript  | 40 +++++++++++++++++++++++++++++++++++++
 src/mesa/drivers/osmesa/osmesa.def  | 15 ++++++++++++++
 4 files changed, 59 insertions(+)
 create mode 100644 src/mesa/drivers/osmesa/SConscript
 create mode 100644 src/mesa/drivers/osmesa/osmesa.def