Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-06-18 Thread Laura Ekstrand
This looks like a useful check for WebGL compatibility:
https://threejs.org/docs/index.html#manual/introduction/WebGL-compatibility-check

On Mon, Jun 18, 2018, 3:50 PM Laura Ekstrand  wrote:

> Jordan's version is awesome.  But in general most people are concerned
> that WebGL will crash browsers.
>
> One idea is to look into using three.js, which is a front-end library for
> web graphics.  It's backed by multiple frameworks including WebGL.
>
> On Sun, Jun 17, 2018, 9:23 PM Jordan Justen 
> wrote:
>
>> On 2018-06-17 17:43:37, Jason Ekstrand wrote:
>> > On Sun, Jun 17, 2018 at 5:34 PM, Jordan Justen <
>> jordan.l.jus...@intel.com>
>> > wrote:
>> >
>> > > On 2018-06-17 16:42:13, Jason Ekstrand wrote:
>> > > > On Sun, Jun 17, 2018 at 4:21 PM, Matt Turner 
>> wrote:
>> > > >
>> > > > > Also, Erik's is animated not with JavaScript at all, but just CSS.
>> > > > > That's really cool.
>> > > > >
>> > > >
>> > > > The only thing the JS does is turn the animation on and off.  The
>> actual
>> > > > animation is pure SVG. The main reason (as I understood it) for the
>> > > > JavaScript is to make the gears *not* turn if someone has disabled
>> > > > JavaScript.  I'm sure people will disagree as to whether or not
>> that's a
>> > > > feature. :-)  I'm not sure if you can get the turn-on-hover thing
>> with
>> > > just
>> > > > SVG and not JS though... /me doesn't know either all that well.
>> > >
>> > > All the JS and webgl. :)
>> > >
>> > > https://people.freedesktop.org/~jljusten/webgl-logo/gears.html
>> > >
>> > > Actually, it doesn't start webgl until you move your mouse over the
>> > > logo. Before that it is displaying a jpg of the gears.
>> > >
>> >
>> > I like how the gears smoothly spin up and slow to a stop.  Not sure
>> what I
>> > think of the font.
>>
>> I changed the font to Roboto Slab, which I saw you mentioned earlier.
>>
>> -Jordan
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-06-18 Thread Laura Ekstrand
Jordan's version is awesome.  But in general most people are concerned that
WebGL will crash browsers.

One idea is to look into using three.js, which is a front-end library for
web graphics.  It's backed by multiple frameworks including WebGL.

On Sun, Jun 17, 2018, 9:23 PM Jordan Justen 
wrote:

> On 2018-06-17 17:43:37, Jason Ekstrand wrote:
> > On Sun, Jun 17, 2018 at 5:34 PM, Jordan Justen <
> jordan.l.jus...@intel.com>
> > wrote:
> >
> > > On 2018-06-17 16:42:13, Jason Ekstrand wrote:
> > > > On Sun, Jun 17, 2018 at 4:21 PM, Matt Turner 
> wrote:
> > > >
> > > > > Also, Erik's is animated not with JavaScript at all, but just CSS.
> > > > > That's really cool.
> > > > >
> > > >
> > > > The only thing the JS does is turn the animation on and off.  The
> actual
> > > > animation is pure SVG. The main reason (as I understood it) for the
> > > > JavaScript is to make the gears *not* turn if someone has disabled
> > > > JavaScript.  I'm sure people will disagree as to whether or not
> that's a
> > > > feature. :-)  I'm not sure if you can get the turn-on-hover thing
> with
> > > just
> > > > SVG and not JS though... /me doesn't know either all that well.
> > >
> > > All the JS and webgl. :)
> > >
> > > https://people.freedesktop.org/~jljusten/webgl-logo/gears.html
> > >
> > > Actually, it doesn't start webgl until you move your mouse over the
> > > logo. Before that it is displaying a jpg of the gears.
> > >
> >
> > I like how the gears smoothly spin up and slow to a stop.  Not sure what
> I
> > think of the font.
>
> I changed the font to Roboto Slab, which I saw you mentioned earlier.
>
> -Jordan
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 06/16] docs: Add Sphinx configuration file.

2018-06-15 Thread Laura Ekstrand
Eric,

Thanks for finding that command to shut off copyright.  I've updated the
series to add it.

Laura

On Fri, Jun 1, 2018 at 7:29 AM, Dylan Baker  wrote:

> Quoting Eric Engestrom (2018-06-01 02:41:36)
> > On Thursday, 2018-05-31 14:00:24 -0700, Dylan Baker wrote:
> > > Quoting Laura Ekstrand (2018-05-24 17:27:09)
> > > > From: Jean Hertel 
> > > >
> > > > This tells Sphinx how to build our website from reStructured Text.
> > > >
> > > > Signed-off-by: Jean Hertel 
> > > > ---
> > > >  docs/conf.py | 162 ++
> +
> > > >  1 file changed, 162 insertions(+)
> > > >  create mode 100644 docs/conf.py
> > > >
> > > > diff --git a/docs/conf.py b/docs/conf.py
> > > > new file mode 100644
> > > > index 00..dcdbdd51db
> > > > --- /dev/null
> > > > +++ b/docs/conf.py
> > > > @@ -0,0 +1,162 @@
> > > > +#!/usr/bin/env python3
> > > > +# -*- coding: utf-8 -*-
> > > > +
> > > > +import sphinx_rtd_theme
> > > > +
> > > > +#
> > > > +# The Mesa 3D Graphics Library documentation build configuration
> file, created by
> > > > +# sphinx-quickstart on Wed Mar 29 14:08:51 2017.
> > > > +#
> > > > +# This file is execfile()d with the current directory set to its
> > > > +# containing dir.
> > > > +#
> > > > +# Note that not all possible configuration values are present in
> this
> > > > +# autogenerated file.
> > > > +#
> > > > +# All configuration values have a default; values that are
> commented out
> > > > +# serve to show the default.
> > > > +
> > > > +# If extensions (or modules to document with autodoc) are in
> another directory,
> > > > +# add these directories to sys.path here. If the directory is
> relative to the
> > > > +# documentation root, use os.path.abspath to make it absolute, like
> shown here.
> > > > +#
> > > > +# import os
> > > > +# import sys
> > > > +# sys.path.insert(0, os.path.abspath('.'))
> > > > +
> > > > +
> > > > +# -- General configuration --
> --
> > > > +
> > > > +# If your documentation needs a minimal Sphinx version, state it
> here.
> > > > +#
> > > > +# needs_sphinx = '1.0'
> > > > +
> > > > +# Add any Sphinx extension module names here, as strings. They can
> be
> > > > +# extensions coming with Sphinx (named 'sphinx.ext.*') or your
> custom
> > > > +# ones.
> > > > +extensions = []
> > > > +
> > > > +# Add any paths that contain templates here, relative to this
> directory.
> > > > +templates_path = ['_templates']
> > > > +
> > > > +# The suffix(es) of source filenames.
> > > > +# You can specify multiple suffix as a list of string:
> > > > +#
> > > > +# source_suffix = ['.rst', '.md']
> > > > +source_suffix = '.rst'
> > > > +
> > > > +# The master toctree document.
> > > > +master_doc = 'index'
> > > > +
> > > > +# General information about the project.
> > > > +project = 'The Mesa 3D Graphics Library'
> > > > +copyright = '2017, Brian Paul'
> > > > +author = 'Brian Paul'
> > >
> > > Is this actually going to the final page?
> >
> > It's what appears at the bottom of every page.
> >
> > > Because this doesn't reflect the reality of the copyrights of mesa.
> >
> > Agreed; I think it's best left out, as there's no way to sanely reflect
> > the complex copyrights of mesa in a signature on each webpage. The
> > license page [1] already does that job.
> >
> > -copyright = '2017, Brian Paul'
> > +html_show_copyright = False
> >
> > [1] https://mesa3d.org/license.html
> >
>
> This seems like the most reasonable solution to me.
>
> Dylan
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 10/15] docs: Add toctree to relnotes

2018-06-15 Thread Laura Ekstrand
Eric,

Thanks for picking up on this; I have updated the link:
https://mesa-test.freedesktop.org/relnotes.html.  The 18.2.0.html page
exists even though it's not released yet.  It's a stub that Emil added.

Laura

2018-05-31 6:50 GMT-07:00 Eric Engestrom :

> On Wednesday, 2018-05-30 15:53:22 -0700, Laura Ekstrand wrote:
> > From: Jean Hertel 
> >
> > Toctree directives create automatically generated navigation sidebars.
> > This is the new relnotes sidebar.
> > ---
> >  docs/relnotes.rst | 210 ++
> 
> >  1 file changed, 210 insertions(+)
> >
> > diff --git a/docs/relnotes.rst b/docs/relnotes.rst
> > index 3cb96bb6a4..e4fa0e5efa 100644
> > --- a/docs/relnotes.rst
> > +++ b/docs/relnotes.rst
> > @@ -3,6 +3,8 @@ Release Notes
> >
> >  The release notes summarize what's new or changed in each Mesa release.
> >
> > +-  `18.2.0 release notes `__
>
> s/18.1.0/18.2.0/  ^
>
> (also note that 18.2.0 is not out and isn't expected until end of august)
>
> > +-  `18.1.0 release notes `__
> >  -  `18.0.4 release notes `__
> >  -  `18.0.3 release notes `__
> >  -  `18.0.2 release notes `__
> > @@ -231,3 +233,211 @@ file `__ and the following release
> notes.
> >  -  `3.2.1 release notes `__
> >  -  `3.2 release notes `__
> >  -  `3.1 release notes `__
> > +
> > +.. toctree::
> > +   :maxdepth: 1
> > +   :hidden:
> > +
> > +   release-calendar
> > +   relnotes/18.2.0
> > +   relnotes/18.1.0
> > +   relnotes/18.0.4
> > +   relnotes/18.0.3
> > +   relnotes/18.0.2
> > +   relnotes/18.0.1
> > +   relnotes/18.0.0
> > +   relnotes/17.3.9
> > +   relnotes/17.3.8
> > +   relnotes/17.3.7
> > +   relnotes/17.3.6
> > +   relnotes/17.3.5
> > +   relnotes/17.3.4
> > +   relnotes/17.3.3
> > +   relnotes/17.3.2
> > +   relnotes/17.3.1
> > +   relnotes/17.3.0
> > +   relnotes/17.2.8
> > +   relnotes/17.2.7
> > +   relnotes/17.2.6
> > +   relnotes/17.2.5
> > +   relnotes/17.2.4
> > +   relnotes/17.2.3
> > +   relnotes/17.2.2
> > +   relnotes/17.2.1
> > +   relnotes/17.2.0
> > +   relnotes/17.1.10
> > +   relnotes/17.1.9
> > +   relnotes/17.1.8
> > +   relnotes/17.1.7
> > +   relnotes/17.1.6
> > +   relnotes/17.1.5
> > +   relnotes/17.1.4
> > +   relnotes/17.1.3
> > +   relnotes/17.1.2
> > +   relnotes/17.1.1
> > +   relnotes/17.1.0
> > +   relnotes/17.0.7
> > +   relnotes/17.0.6
> > +   relnotes/17.0.5
> > +   relnotes/17.0.4
> > +   relnotes/17.0.3
> > +   relnotes/17.0.2
> > +   relnotes/13.0.6
> > +   relnotes/17.0.1
> > +   relnotes/13.0.5
> > +   relnotes/17.0.0
> > +   relnotes/13.0.4
> > +   relnotes/12.0.6
> > +   relnotes/13.0.3
> > +   relnotes/12.0.5
> > +   relnotes/13.0.2
> > +   relnotes/13.0.1
> > +   relnotes/12.0.4
> > +   relnotes/13.0.0
> > +   relnotes/12.0.3
> > +   relnotes/12.0.2
> > +   relnotes/12.0.1
> > +   relnotes/12.0.0
> > +   relnotes/11.2.2
> > +   relnotes/11.1.4
> > +   relnotes/11.2.1
> > +   relnotes/11.1.3
> > +   relnotes/11.2.0
> > +   relnotes/11.1.2
> > +   relnotes/11.0.9
> > +   relnotes/11.1.1
> > +   relnotes/11.0.8
> > +   relnotes/11.1.0
> > +   relnotes/11.0.7
> > +   relnotes/11.0.6
> > +   relnotes/11.0.5
> > +   relnotes/11.0.4
> > +   relnotes/11.0.3
> > +   relnotes/10.6.9
> > +   relnotes/11.0.2
> > +   relnotes/11.0.1
> > +   relnotes/10.6.8
> > +   relnotes/11.0.0
> > +   relnotes/10.6.7
> > +   relnotes/10.6.6
> > +   relnotes/10.6.5
> > +   relnotes/10.6.4
> > +   relnotes/10.6.3
> > +   relnotes/10.6.2
> > +   relnotes/10.5.9
> > +   relnotes/10.6.1
> > +   relnotes/10.5.8
> > +   relnotes/10.6.0
> > +   relnotes/10.5.7
> > +   relnotes/10.5.6
> > +   relnotes/10.5.5
> > +   relnotes/10.5.4
> > +   relnotes/10.5.3
> > +   relnotes/10.5.2
> > +   relnotes/10.4.7
> > +   relnotes/10.5.1
> > +   relnotes/10.5.0
> > +   relnotes/10.4.6
> > +   relnotes/10.4.5
> > +   relnotes/10.4.4
> > +   relnotes/10.4.3
> > +   relnotes/10.4.2
> > +   relnotes/10.3.7
> > +   relnotes/10.4.1
> > +   relnotes/10.3.6
> > +   relnotes/10.4
> > +   relnotes/10.3.5
> > +   relnotes/10.3.4
> > +   relnotes/10.3.3
> > +   relnotes/10.3.2
> > +   relnotes/10.3.1
> &

Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-06-15 Thread Laura Ekstrand
Stuart,

We are now running on our own Docker image:
https://mesa-test.freedesktop.org/.

This should have fixed both of the issues you encountered.

Thanks.

Laura

On Mon, Jun 11, 2018 at 3:24 PM, Laura Ekstrand 
wrote:

> I really like the rotate on hover effect for the gears.  I would rather
> that we use 2D WebGL for it if we could, though, since Mesa enables WebGL
> on certain platforms.
>
> Stuart, I will try to get the favicon and rtd_theme fixed.  We may have to
> make our Docker image.
>
> Thanks.
>
> Laura
>
> On Fri, Jun 8, 2018 at 7:23 AM, Erik Faye-Lund 
> wrote:
>
>> On Fri, Jun 8, 2018 at 4:09 PM Rhys Perry 
>> wrote:
>> >
>> > Might be good to do something like this: https://codepen.io/anon/pen/ER
>> NdYJ
>> > So that those with NoScript or something won't have gears constantly
>> > rotating on their screen.
>> >
>>
>> Yeah, good point.
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-06-11 Thread Laura Ekstrand
It's done already, it was a one-liner:
https://gitlab.freedesktop.org/ldeks/mesa/commits/website1_75_v2

On Mon, Jun 11, 2018 at 5:15 PM, Stuart Young  wrote:

> Laura: Brilliant. Don't let it hang any deployment though. There's so much
> more good in this that losing the favicon for a while is definitely worth
> it.
>
> On Tue, 12 Jun 2018 at 08:27, Laura Ekstrand  wrote:
>
>> I really like the rotate on hover effect for the gears.  I would rather
>> that we use 2D WebGL for it if we could, though, since Mesa enables WebGL
>> on certain platforms.
>>
>> Stuart, I will try to get the favicon and rtd_theme fixed.  We may have
>> to make our Docker image.
>>
>> Thanks.
>>
>> Laura
>>
>> On Fri, Jun 8, 2018 at 7:23 AM, Erik Faye-Lund 
>> wrote:
>>
>>> On Fri, Jun 8, 2018 at 4:09 PM Rhys Perry 
>>> wrote:
>>> >
>>> > Might be good to do something like this: https://codepen.io/anon/pen/
>>> ERNdYJ
>>> > So that those with NoScript or something won't have gears constantly
>>> > rotating on their screen.
>>> >
>>>
>>> Yeah, good point.
>>> ___
>>> mesa-dev mailing list
>>> mesa-dev@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>>
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
>
> --
> Stuart Young (aka Cefiar)
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-06-11 Thread Laura Ekstrand
I really like the rotate on hover effect for the gears.  I would rather
that we use 2D WebGL for it if we could, though, since Mesa enables WebGL
on certain platforms.

Stuart, I will try to get the favicon and rtd_theme fixed.  We may have to
make our Docker image.

Thanks.

Laura

On Fri, Jun 8, 2018 at 7:23 AM, Erik Faye-Lund  wrote:

> On Fri, Jun 8, 2018 at 4:09 PM Rhys Perry 
> wrote:
> >
> > Might be good to do something like this: https://codepen.io/anon/pen/
> ERNdYJ
> > So that those with NoScript or something won't have gears constantly
> > rotating on their screen.
> >
>
> Yeah, good point.
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 11/15] docs: Toctree for systems.rst as in jhertel docs.

2018-06-06 Thread Laura Ekstrand
So actually, Nanley Chery noticed that this puts the xlib driver in the
menu under "Deprecated systems."  Xlib driver is in active development!

Since xlib was not in the navigation menu on the old website, let's just
delete this patch.

nack'd by Laura Ekstrand (la...@jlekstrand.net)

On Wed, May 30, 2018 at 3:53 PM, Laura Ekstrand 
wrote:

> Toctree directives create automatically generated navigation sidebars.
> This is the new deprecated systems sidebar.
> ---
>  docs/systems.rst | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/docs/systems.rst b/docs/systems.rst
> index 707abeeed9..b05aff0621 100644
> --- a/docs/systems.rst
> +++ b/docs/systems.rst
> @@ -52,3 +52,9 @@ the git repo. The list includes:
>  -  DOS
>  -  fbdev
>  -  DEC/VMS
> +
> +.. toctree::
> +   :maxdepth:  1
> +   :hidden:
> +
> +   xlibdriver
> --
> 2.14.3
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 01/15] Added ci yaml file for Gitlab.

2018-06-01 Thread Laura Ekstrand
Daniel,

I literally just followed the example:

https://docs.gitlab.com/ee/ci/yaml/#pages

As I recall, there's a recursive loop if you don't use .public.

On Fri, Jun 1, 2018, 4:17 AM Daniel Stone  wrote:

> Hi,
>
> On 1 June 2018 at 11:23, Eric Engestrom  wrote:
> > On Friday, 2018-06-01 11:16:29 +0100, Daniel Stone wrote:
> >> https://docs.gitlab.com/ee/user/project/pages/introduction.html
> >> > Be aware that Pages are by default branch/tag agnostic and their
> >> > deployment relies solely on what you specify in .gitlab-ci.yml. If
> >> > you don't limit the pages job with the only parameter, whenever
> >> > a new commit is pushed to whatever branch or tag, the Pages will be
> >> > overwritten.
> >
> > Hmm, so that means we can't get MRs to build artifacts?
> > Is there a way to say "build: always; deploy: only: master"?
>
> Right, it's a little awkward, but still possible:
>
> https://docs.gitlab.com/ee/user/project/pages/getting_started_part_four.html#stages
>
> Basically, in master you build to and capture 'public', and off master
> you build to and capture another path. If you don't have an artifact
> with public/ in it, the site won't get updated, but you can still pull
> the artifacts.
>
> (I'd typed out roughly the same thing before thinking 'there must be a
> better way' and finding the docs. The only difference is that I'd had
> separate build/deploy stages to avoid duplicating the build
> instructions.)
>
> Cheers,
> Daniel
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-05-31 Thread Laura Ekstrand
A little bit of messing around this afternoon, led to this:
https://drive.google.com/file/d/1rteTv9415XEMN1E11fyN0l3hTUCCbgwz/view?usp=sharing

The gears are from Font Awesome, which comes with the RTD format.

On Thu, May 31, 2018 at 1:55 PM, Jordan Justen 
wrote:

> On 2018-05-31 12:27:04, Eric Anholt wrote:
> > Jordan Justen  writes:
> >
> > > On 2018-05-24 17:37:09, Laura Ekstrand wrote:
> > >> A few of the commits are quite large and awaiting list approval.  I
> suggest
> > >> that you take a look at the code here:
> > >> https://gitlab.freedesktop.org/ldeks/mesa/tree/website1_75,
> > >> and the new website here: https://mesa-test.freedesktop.
> org/index.html
> > >
> > > I think the theme should be changed to look somewhat close to the
> > > current mesa3d.org website before changing the main site. (Color
> > > scheme and missing icons.)
> > >
> > > Right now the test website looks like a million other sphinx websites,
> > > including every readthedocs book.
> > >
> > > Based on http://www.sphinx-doc.org/en/master/ and
> > > https://www.python.org/, I would say sphinx gives a lot of
> > > opportunities for a custom look.
> >
> > I think looking like a generic other sphinx website is a step forward,
> > and I look forward to this series landing.  No need for continuity with
> > the old theme.
>
> I think it is 1 step forward, 1 step back. As no else appears to
> agree, I'll withdraw my feedback.
>
> -Jordan
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-05-31 Thread Laura Ekstrand
The current plan is that this first patch series should just update the
website.  Then we can swap out the theme easily with one or two commands in
the next series.  The goal of this series is to move the website to the new
infrastructure.  Then we can edit content and style.

On Tue, May 29, 2018 at 11:05 PM, Jordan Justen 
wrote:

> On 2018-05-24 17:37:09, Laura Ekstrand wrote:
> > A few of the commits are quite large and awaiting list approval.  I
> suggest
> > that you take a look at the code here:
> > https://gitlab.freedesktop.org/ldeks/mesa/tree/website1_75,
> > and the new website here: https://mesa-test.freedesktop.org/index.html
>
> I think the theme should be changed to look somewhat close to the
> current mesa3d.org website before changing the main site. (Color
> scheme and missing icons.)
>
> Right now the test website looks like a million other sphinx websites,
> including every readthedocs book.
>
> Based on http://www.sphinx-doc.org/en/master/ and
> https://www.python.org/, I would say sphinx gives a lot of
> opportunities for a custom look.
>
> -Jordan
>
> > On Thu, May 24, 2018 at 5:27 PM, Laura Ekstrand 
> > wrote:
> >
> > > It's time to move the Mesa-3d.org website into the 21st century. We
> have
> > > chosen to move to Sphinx and resStructured text for a number of
> reasons:
> > >   1. Syntax highlighting for code snippets.
> > >   2. Snazzy highlighting for variables and function names.
> > >   3. Consistency with the Gallium drivers, which host their
> documentation
> > > on
> > >  ReadTheDocs.
> > >   4. Ultimately less work for us, because writing content in
> reStructured
> > > Text
> > >  is simpler and Sphinx turns it into beautiful, readable pages
> without
> > > us
> > >  having to manually fix problems in html and css.
> > >   5. With Gitlab, the Sphinx website is auto-generated every time the
> Mesa
> > >  code repository is pushed to Gitlab without us having to
> > >  build and deploy it.
> > >
> > > The new website is currently hosted at mesa-test.freedesktop.org.
> When
> > > these
> > > patches are merged, Daniel Stone will point our Gitlab CI system at
> > > mesa-3d.org.
> > >
> > > When reviewing these patches, please note:
> > > 1. This patch series does *not* touch content.  Please do not
> > > bikeshed
> > >the content of webpages here.  That will be addressed in
> later
> > >commits.
> > > 2. Please do *not* bikeshed website style here.  We are using
> the
> > >classic ReadTheDocs style for now and we will update style
> in a
> > >future commit.
> > > 3. I've done my best to make your current content look
> beautiful.
> > > If
> > >there's a problem, please let me know.
> > > 4. There were some commits to the website between when I
> started
> > > this
> > >series and now. I've done my best to incorporate your
> changes.
> > >So if you changed your content in the past two weeks, take a
> > > look
> > >at your page.
> > >
> > > I hope you'll agree that the resulting pages are much cleaner and
> easier to
> > > read.  I've learned a lot by reading these pages.
> > >
> > > Thanks.
> > >
> > > Laura Ekstrand
> > > ---
> > >
> > > Jean Hertel (3):
> > >   docs: Add Sphinx configuration file.
> > >   docs: Add a navigation sidebar.
> > >   docs: Add toctree to relnotes
> > >
> > > Laura Ekstrand (13):
> > >   Added ci yaml file for Gitlab.
> > >   docs: Add python script that converts html to rst.
> > >   docs: Remove contents.html
> > >   docs: Result of script fixing html with Beautiful Soup.
> > >   docs: Add results of script - pandoc-generated rst pages.
> > >   docs: Add command for Sphinx build.
> > >   docs: Toctree for systems.rst as in jhertel docs.
> > >   docs: Remove html files.
> > >   docs: Fix Sphinx compile errors.
> > >   docs: Edits to fix toctrees.
> > >   docs: Major manual edits to environment vars.
> > >   docs: Human edits to the website code for clarity.
> > >   docs: Remove unneeded mesa css file.
> > >
> > >  .gitlab-ci.yml   |   11 +
> > >  docs/application-issues.html |   83 --
> > >  docs/a

[Mesa-dev] [PATCH v2 15/15] docs: Human edits to the website code for clarity.

2018-05-30 Thread Laura Ekstrand
There's a lot here.  If you're interested, it's mostly whitespace fixes,
switching variable names and function names to the Sphinx orange variable
highlight style, and naming code blocks to take advantage of Pygments
syntax highlighting.
---
 docs/application-issues.rst |   8 +-
 docs/autoconf.rst   |   9 +-
 docs/codingstyle.rst|  36 +++
 docs/conf.py|   2 +-
 docs/conform.rst|   2 +-
 docs/debugging.rst  |  12 +--
 docs/devinfo.rst|  26 ++---
 docs/download.rst   |   6 +-
 docs/egl.rst|   2 +-
 docs/extensions.rst |  42 
 docs/faq.rst|  38 +++
 docs/helpwanted.rst |  14 +--
 docs/index.rst  | 240 +++-
 docs/install.rst|  64 ++--
 docs/intro.rst  | 124 +++
 docs/license.rst|  12 +--
 docs/llvmpipe.rst   |  65 +---
 docs/mangling.rst   |   4 +-
 docs/meson.rst  |  18 ++--
 docs/osmesa.rst |  12 +--
 docs/perf.rst   |  85 +++-
 docs/postprocess.rst|  11 +-
 docs/precompiled.rst|   6 +-
 docs/release-calendar.rst   | 158 ++---
 docs/releasing.rst  | 158 ++---
 docs/repository.rst |  59 ++-
 docs/shading.rst|  99 --
 docs/sourcetree.rst |  12 +--
 docs/submittingpatches.rst  | 123 ---
 docs/thanks.rst |   2 +-
 docs/versions.rst   |   8 +-
 docs/viewperf.rst   |  94 -
 docs/vmware-guest.rst   | 146 +--
 docs/xlibdriver.rst |  60 +--
 34 files changed, 882 insertions(+), 875 deletions(-)

diff --git a/docs/application-issues.rst b/docs/application-issues.rst
index 3ab4da4fc9..7c9096875b 100644
--- a/docs/application-issues.rst
+++ b/docs/application-issues.rst
@@ -24,18 +24,18 @@ Some old OpenGL games (approx. ten years or older) may 
crash during
 start-up because of an extension string buffer-overflow problem.
 
 The problem is a modern OpenGL driver will return a very long string for
-the glGetString(GL\_EXTENSIONS) query and if the application naively
+the ``glGetString(GL_EXTENSIONS)`` query and if the application naively
 copies the string into a fixed-size buffer it can overflow the buffer
 and crash the application.
 
-The work-around is to set the MESA\_EXTENSION\_MAX\_YEAR environment
+The work-around is to set the ``MESA_EXTENSION_MAX_YEAR`` environment
 variable to the approximate release year of the game. This will cause
-the glGetString(GL\_EXTENSIONS) query to only report extensions older
+the ``glGetString(GL_EXTENSIONS)`` query to only report extensions older
 than the given year.
 
 For example, if the game was released in 2001, do
 
-::
+.. code-block:: bash
 
 export MESA_EXTENSION_MAX_YEAR=2001
 
diff --git a/docs/autoconf.rst b/docs/autoconf.rst
index 25ba71cf66..d972babc6d 100644
--- a/docs/autoconf.rst
+++ b/docs/autoconf.rst
@@ -16,7 +16,7 @@ The autoconf generated configure script can be used to guess 
your
 platform and change various options for building Mesa. To use the
 configure script, type:
 
-::
+.. code-block:: bash
 
 ./configure
 
@@ -28,7 +28,7 @@ can pass them to ``autogen.sh``. It will run ``configure`` 
with these
 options after it is generated. Once you have run ``configure`` and set
 the options to your preference, type:
 
-::
+.. code-block:: bash
 
 make
 
@@ -61,7 +61,10 @@ Some of the generic autoconf options are used with Mesa:
 there's only one config file provided when dri drivers are enabled -
 it's ``drirc``.
 
-``--enable-static, --disable-shared``
+``--enable-static``
+.. same as below
+
+``--disable-shared``
 By default, Mesa will build shared libraries. Either of these
 options will force static libraries to be built. It is not currently
 possible to build static and shared libraries in a single pass.
diff --git a/docs/codingstyle.rst b/docs/codingstyle.rst
index 026652f0ca..565c3ce1c9 100644
--- a/docs/codingstyle.rst
+++ b/docs/codingstyle.rst
@@ -17,7 +17,7 @@ Basic formatting guidelines
 -  Opening braces go on the same line as the if/for/while statement. For
example:
 
-   ::
+   .. code-block:: c
 
   if (condition) {
  foo;
@@ -30,30 +30,30 @@ Basic formatting guidelines
 -  This GNU indent command generally does the right thing for
formatting:
 
-   ::
+   .. code-block:: bash
 
   indent -br -i3 -npcs --no-tabs infile.c -o outfile.c
 
--  | Use comments wherever you think it would be helpful for other
- developers. Several specific cases and style examples follow. Note
- that we roughly follow
- `Doxygen `__ conventions.
-   | Single-line comments:
+-  Use comments wherev

[Mesa-dev] [PATCH v2 12/15] docs: Edits to fix toctrees.

2018-05-30 Thread Laura Ekstrand
ReStructured Text toctrees are used to automatically generate the
sidebar.  But all top-level headings get added to it by default.  In
order to workaround this, you must create one and only one
top-level heading for each page.
---
 docs/download.rst  |  2 +-
 docs/faq.rst   |  2 +-
 docs/index.rst | 42 +-
 docs/install.rst   |  9 -
 docs/intro.rst |  2 +-
 docs/license.rst   |  3 +++
 docs/lists.rst |  2 +-
 docs/llvmpipe.rst  |  3 +++
 docs/osmesa.rst|  2 +-
 docs/releasing.rst |  2 +-
 docs/systems.rst   |  7 +--
 11 files changed, 46 insertions(+), 30 deletions(-)

diff --git a/docs/download.rst b/docs/download.rst
index 6317269342..a71f3b5cac 100644
--- a/docs/download.rst
+++ b/docs/download.rst
@@ -1,5 +1,5 @@
 Downloading
-===
+'''
 
 Primary Mesa download site:
 `ftp.freedesktop.org `__ (FTP) or
diff --git a/docs/faq.rst b/docs/faq.rst
index 46c349fc4c..543ef548b6 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -1,5 +1,5 @@
 Mesa Frequently Asked Questions
-===
+'''
 
 Last updated: 9 October 2012
 
diff --git a/docs/index.rst b/docs/index.rst
index 1894b46a4b..2e3283063d 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -3,14 +3,15 @@
:caption: Documentation
:hidden:
 
-   intro
+   Introduction 
+   self
developers
systems
license
-   faq
+   FAQ 
relnotes
thanks
-   conformance
+   Conformance 
 
 .. toctree::
:maxdepth: 1
@@ -19,7 +20,6 @@
 
download
install
-   autoconf
precompiled
 
 .. toctree::
@@ -30,23 +30,7 @@
lists
bugs
webmaster
-   useful-links
-
-.. toctree::
-   :maxdepth: 1
-   :caption: Developer Topics
-   :hidden:
-
-   repository
-   sourcetree
-   utilities
-   helpwanted
-   devinfo
-   codingstyle
-   submittingpatches
-   releasing
-   sourcedocs
-   dispatch
+   Mesa/DRI Wiki 
 
 .. toctree::
:maxdepth: 1
@@ -68,6 +52,22 @@
application-issues
viewperf
 
+.. toctree::
+   :maxdepth: 1
+   :caption: Developer Topics
+   :hidden:
+
+   repository
+   sourcetree
+   utilities
+   helpwanted
+   devinfo
+   codingstyle
+   submittingpatches
+   releasing
+   sourcedocs
+   dispatch
+
 
 .. toctree::
:maxdepth: 1
diff --git a/docs/install.rst b/docs/install.rst
index 8f5920091c..177e393d56 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -1,5 +1,12 @@
 Compiling and Installing
-
+
+
+.. toctree::
+   :maxdepth: 1
+   :hidden:
+
+   Autoconf 
+   Meson 
 
 #. `Prerequisites for building <#prereq-general>`__
 
diff --git a/docs/intro.rst b/docs/intro.rst
index 11be79643a..a85a257fc8 100644
--- a/docs/intro.rst
+++ b/docs/intro.rst
@@ -1,5 +1,5 @@
 Introduction
-
+
 
 The Mesa project began as an open-source implementation of the
 `OpenGL `__ specification - a system for
diff --git a/docs/license.rst b/docs/license.rst
index e6ffb06623..40387f4dc2 100644
--- a/docs/license.rst
+++ b/docs/license.rst
@@ -1,3 +1,6 @@
+License & Copyright
+'''
+
 Disclaimer
 ==
 
diff --git a/docs/lists.rst b/docs/lists.rst
index da71722cfb..2984b7fcc3 100644
--- a/docs/lists.rst
+++ b/docs/lists.rst
@@ -1,5 +1,5 @@
 Mailing Lists
-=
+'
 
 There are four Mesa 3D / DRI mailing lists:
 
diff --git a/docs/llvmpipe.rst b/docs/llvmpipe.rst
index b232b8a18f..e88bf3d6a7 100644
--- a/docs/llvmpipe.rst
+++ b/docs/llvmpipe.rst
@@ -1,3 +1,6 @@
+Gallium LLVMPipe Driver
+'''
+
 Introduction
 
 
diff --git a/docs/osmesa.rst b/docs/osmesa.rst
index 570f119b3a..3317b5ed4e 100644
--- a/docs/osmesa.rst
+++ b/docs/osmesa.rst
@@ -1,5 +1,5 @@
 Off-screen Rendering
-
+
 
 Mesa's off-screen interface is used for rendering into user-allocated
 memory without any sort of window system or operating system
diff --git a/docs/releasing.rst b/docs/releasing.rst
index ad7dcb9c38..46aefc5849 100644
--- a/docs/releasing.rst
+++ b/docs/releasing.rst
@@ -1,5 +1,5 @@
 Releasing process
-=
+'
 
 -  `Overview <#overview>`__
 -  `Release schedule <#schedule>`__
diff --git a/docs/systems.rst b/docs/systems.rst
index b05aff0621..d299086f85 100644
--- a/docs/systems.rst
+++ b/docs/systems.rst
@@ -1,5 +1,5 @@
-Supported Systems and Drivers
-=
+Platforms & Drivers
+'''
 
 Mesa is primarily developed and used on Linux systems. But there's also
 support for Windows, other flavors of Unix and other systems such as
@@ -9,6 +9,9 @@ software drivers.
 The primary API is OpenGL but there's also support for OpenGL ES 1, ES2
 and ES 3, OpenVG, OpenCL, VDPAU, XvMC and the EGL interface.
 
+Supported Systems and Drivers
+=
+
 Hardware drivers include:
 

[Mesa-dev] [PATCH v2 11/15] docs: Toctree for systems.rst as in jhertel docs.

2018-05-30 Thread Laura Ekstrand
Toctree directives create automatically generated navigation sidebars.
This is the new deprecated systems sidebar.
---
 docs/systems.rst | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/docs/systems.rst b/docs/systems.rst
index 707abeeed9..b05aff0621 100644
--- a/docs/systems.rst
+++ b/docs/systems.rst
@@ -52,3 +52,9 @@ the git repo. The list includes:
 -  DOS
 -  fbdev
 -  DEC/VMS
+
+.. toctree::
+   :maxdepth:  1
+   :hidden:
+
+   xlibdriver
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 14/15] docs: Major manual edits to environment vars.

2018-05-30 Thread Laura Ekstrand
This is a huge page.  The edits I've done here take full advantage of
reStructured text and Sphinx's awesome built-in style for explaining
commands and variables.  Enjoy!
---
 docs/envvars.rst | 604 ++-
 1 file changed, 425 insertions(+), 179 deletions(-)

diff --git a/docs/envvars.rst b/docs/envvars.rst
index a9db746e79..a1427552e7 100644
--- a/docs/envvars.rst
+++ b/docs/envvars.rst
@@ -8,78 +8,122 @@ but they can sometimes be useful for debugging end-user 
issues.
 LibGL environment variables
 ---
 
--  LIBGL\_DEBUG - If defined debug information will be printed to
-   stderr. If set to 'verbose' additional information will be printed.
--  LIBGL\_DRIVERS\_PATH - colon-separated list of paths to search for
+``LIBGL_DEBUG``
+   If defined debug information will be printed to
+   stderr. If set to ``verbose`` additional information will be printed.
+
+``LIBGL_DRIVERS_PATH``
+   colon-separated list of paths to search for
DRI drivers
--  LIBGL\_ALWAYS\_INDIRECT - if set to \`true\`, forces an indirect
+
+``LIBGL_ALWAYS_INDIRECT``
+   if set to ``true``, forces an indirect
rendering context/connection.
--  LIBGL\_ALWAYS\_SOFTWARE - if set to \`true\`, always use software
+
+``LIBGL_ALWAYS_SOFTWARE``
+   if set to ``true``, always use software
rendering
--  LIBGL\_NO\_DRAWARRAYS - if set to \`true\`, do not use DrawArrays GLX
+
+``LIBGL_NO_DRAWARRAYS``
+   if set to ``true``, do not use DrawArrays GLX
protocol (for debugging)
--  LIBGL\_SHOW\_FPS - print framerate to stdout based on the number of
-   glXSwapBuffers calls per second.
--  LIBGL\_DRI3\_DISABLE - disable DRI3 if set to \`true\`.
+
+``LIBGL_SHOW_FPS``
+   print framerate to stdout based on the number of
+   ``glXSwapBuffers`` calls per second.
+
+``LIBGL_DRI3_DISABLE``
+   disable DRI3 if set to ``true``.
 
 Core Mesa environment variables
 ---
 
--  MESA\_NO\_ASM - if set, disables all assembly language optimizations
--  MESA\_NO\_MMX - if set, disables Intel MMX optimizations
--  MESA\_NO\_3DNOW - if set, disables AMD 3DNow! optimizations
--  MESA\_NO\_SSE - if set, disables Intel SSE optimizations
--  MESA\_NO\_ERROR - if set to 1, error checking is disabled as per
-   KHR\_no\_error. This will result in undefined behaviour for invalid
+``MESA_NO_ASM``
+   if set, disables all assembly language optimizations
+
+``MESA_NO_MMX``
+   if set, disables Intel MMX optimizations
+
+``MESA_NO_3DNOW``
+   if set, disables AMD 3DNow! optimizations
+
+``MESA_NO_SSE``
+   if set, disables Intel SSE optimizations
+
+``MESA_NO_ERROR``
+   if set to 1, error checking is disabled as per
+   ``KHR_no_error``. This will result in undefined behaviour for invalid
use of the api, but can reduce CPU use for apps that are known to be
error free.
--  MESA\_DEBUG - if set, error messages are printed to stderr. For
-   example, if the application generates a GL\_INVALID\_ENUM error, a
+
+``MESA_DEBUG``
+   if set, error messages are printed to stderr. For
+   example, if the application generates a ``GL_INVALID_ENUM`` error, a
corresponding error message indicating where the error occurred, and
possibly why, will be printed to stderr.
-   For release builds, MESA\_DEBUG defaults to off (no debug output).
-   MESA\_DEBUG accepts the following comma-separated list of named
-   flags, which adds extra behaviour to just set MESA\_DEBUG=1:
+   For release builds, ``MESA_DEBUG`` defaults to off (no debug output).
+   ``MESA_DEBUG`` accepts the following comma-separated list of named
+   flags, which adds extra behaviour to just set ``MESA_DEBUG=1``:
+
+   ``silent``
+  turn off debug messages. Only useful for debug builds.
 
-   -  silent - turn off debug messages. Only useful for debug builds.
-   -  flush - flush after each drawing command
-   -  incomplete\_tex - extra debug messages when a texture is
+   ``flush``
+  flush after each drawing command
+
+   ``incomplete_tex``
+  extra debug messages when a texture is
   incomplete
-   -  incomplete\_fbo - extra debug messages when a fbo is incomplete
-   -  context - create a debug context (see
-  GLX\_CONTEXT\_DEBUG\_BIT\_ARB) and print error and performance
-  messages to stderr (or MESA\_LOG\_FILE).
 
--  MESA\_LOG\_FILE - specifies a file name for logging all errors,
+   ``incomplete_fbo``
+  extra debug messages when a fbo is incomplete
+
+   ``context``
+  create a debug context (see
+  ``GLX_CONTEXT_DEBUG_BIT_ARB``) and print error and performance
+  messages to stderr (or ``MESA_LOG_FILE``).
+
+``MESA_LOG_FILE``
+   specifies a file name for logging all errors,
warnings, etc., rather than stderr
--  MESA\_TEX\_PROG - if set, implement conventional texture env modes
+
+``MESA_TEX_PROG``
+   if set, implement conventional texture env modes
with fragment programs (intended for developers only)
--  MESA\_TNL\_PROG - if set, implement conven

[Mesa-dev] [PATCH v2 09/15] docs: Add a navigation sidebar.

2018-05-30 Thread Laura Ekstrand
From: Jean Hertel 

This is the new main sidebar.
---
 docs/index.rst | 90 ++
 1 file changed, 90 insertions(+)

diff --git a/docs/index.rst b/docs/index.rst
index dbb4a4ddec..1894b46a4b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,3 +1,93 @@
+.. toctree::
+   :maxdepth: 1
+   :caption: Documentation
+   :hidden:
+
+   intro
+   developers
+   systems
+   license
+   faq
+   relnotes
+   thanks
+   conformance
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Download / Install
+   :hidden:
+
+   download
+   install
+   autoconf
+   precompiled
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Resources
+   :hidden:
+
+   lists
+   bugs
+   webmaster
+   useful-links
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Developer Topics
+   :hidden:
+
+   repository
+   sourcetree
+   utilities
+   helpwanted
+   devinfo
+   codingstyle
+   submittingpatches
+   releasing
+   sourcedocs
+   dispatch
+
+.. toctree::
+   :maxdepth: 1
+   :caption: User Topics
+   :hidden:
+
+   shading
+   egl
+   opengles
+   envvars
+   osmesa
+   debugging
+   perf
+   extensions
+   mangling
+   llvmpipe
+   vmware-guest
+   postprocess
+   application-issues
+   viewperf
+
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Links
+   :hidden:
+
+   Gallium Documentation 
+   NIR Documentation 
+   OpenGL website 
+   DRI website 
+   Developer blogs 
+
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Hosted by
+   :hidden:
+
+   freedesktop 
+
 News
 
 
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 04/15] docs: Result of script fixing html with Beautiful Soup.

2018-05-30 Thread Laura Ekstrand
Beautiful Soup patched our html in these ways:
- Creating closing tags e.g.  where there were none in order to create
  semantically complete html (like xhtml)
- Removing the old header, which is no longer needed
- Removing the old content bar to avoid confusion
- Removing the outer  from the content, which was tripping up
  Pandoc in converting the html to rst.
---
 docs/application-issues.html |   29 +-
 docs/autoconf.html   |   66 +-
 docs/bugs.html   |   38 +-
 docs/codingstyle.html|   80 +-
 docs/conform.html|   25 +-
 docs/debugging.html  |   24 +-
 docs/developers.html |   32 +-
 docs/devinfo.html|   33 +-
 docs/dispatch.html   |   47 +-
 docs/download.html   |   35 +-
 docs/egl.html|   27 +-
 docs/envvars.html|  204 ++--
 docs/extensions.html |   68 +-
 docs/faq.html|   72 +-
 docs/helpwanted.html |   38 +-
 docs/index.html  |  123 +--
 docs/install.html|   87 +-
 docs/intro.html  |  165 ++--
 docs/license.html|   38 +-
 docs/lists.html  |   26 +-
 docs/llvmpipe.html   |   74 +-
 docs/mangling.html   |   27 +-
 docs/meson.html  |   41 +-
 docs/opengles.html   |   27 +-
 docs/osmesa.html |   36 +-
 docs/perf.html   |   52 +-
 docs/postprocess.html|   38 +-
 docs/precompiled.html|   32 +-
 docs/release-calendar.html   |   30 +-
 docs/releasing.html  |  132 ++-
 docs/relnotes.html   |  472 +
 docs/relnotes/10.0.1.html|   32 +-
 docs/relnotes/10.0.2.html|   30 +-
 docs/relnotes/10.0.3.html|   30 +-
 docs/relnotes/10.0.4.html|   30 +-
 docs/relnotes/10.0.5.html|   32 +-
 docs/relnotes/10.0.html  |   31 +-
 docs/relnotes/10.1.1.html|   29 +-
 docs/relnotes/10.1.2.html|   27 +-
 docs/relnotes/10.1.3.html|   27 +-
 docs/relnotes/10.1.4.html|   27 +-
 docs/relnotes/10.1.5.html|   27 +-
 docs/relnotes/10.1.6.html|   27 +-
 docs/relnotes/10.1.html  |   27 +-
 docs/relnotes/10.2.1.html|   27 +-
 docs/relnotes/10.2.2.html|   27 +-
 docs/relnotes/10.2.3.html|   27 +-
 docs/relnotes/10.2.4.html|   27 +-
 docs/relnotes/10.2.5.html|   27 +-
 docs/relnotes/10.2.6.html|   27 +-
 docs/relnotes/10.2.7.html|   27 +-
 docs/relnotes/10.2.8.html|   27 +-
 docs/relnotes/10.2.9.html|   27 +-
 docs/relnotes/10.2.html  |   27 +-
 docs/relnotes/10.3.1.html|   27 +-
 docs/relnotes/10.3.2.html|   27 +-
 docs/relnotes/10.3.3.html|   27 +-
 docs/relnotes/10.3.4.html|   27 +-
 docs/relnotes/10.3.5.html|   27 +-
 docs/relnotes/10.3.6.html|   27 +-
 docs/relnotes/10.3.7.html|   27 +-
 docs/relnotes/10.3.html  |   31 +-
 docs/relnotes/10.4.1.html|   27 +-
 docs/relnotes/10.4.2.html|   27 +-
 docs/relnotes/10.4.3.html|   27 +-
 docs/relnotes/10.4.4.html|   27 +-
 docs/relnotes/10.4.5.html|   27 +-
 docs/relnotes/10.4.6.html|   27 +-
 docs/relnotes/10.4.7.html|   27 +-
 docs/relnotes/10.4.html  |   29 +-
 docs/relnotes/10.5.0.html|   31 +-
 docs/relnotes/10.5.1.html|   27 +-
 docs/relnotes/10.5.2.html|   27 +-
 docs/relnotes/10.5.3.html|   27 +-
 docs/relnotes/10.5.4.html|   27 +-
 docs/relnotes/10.5.5.html|   27 +-
 docs/relnotes/10.5.6.html|   27 +-
 docs/relnotes/10.5.7.html|   27 +-
 docs/relnotes/10.5.8.html|   27 +-
 docs/relnotes/10.5.9.html|   27 +-
 docs/relnotes/10.6.0.html|   33 +-
 docs/relnotes/10.6.1.html|   27 +-
 docs/relnotes/10.6.2.html|   27 +-
 docs/relnotes/10.6.3.html|   29 +-
 docs/relnotes/10.6.4.html|   27 +-
 docs/relnotes/10.6.5.html|   27 +-
 docs/relnotes/10.6.6.html|   31 +-
 docs/relnotes/10.6.7.html|   27 +-
 docs/relnotes/10.6.8.html|   27 +-
 docs/relnotes/10.6.9.html|   29 +-
 docs/relnotes/11.0.0.html|   41 +-
 docs/relnotes/11.0.1.html|   27 +-
 docs/relnotes/11.0.2.html|   27 +-
 docs/relnotes/11.0.3.html|   27 +-
 docs/relnotes/11.0.4.html|   29 +-
 docs/relnotes/11.0.5.html|   27 +-
 docs/relnotes/11.0.6.html|   27 +-
 docs/relnotes/11.0.7.html|   27 +-
 docs/relnotes/11.0.8.html|   27 +-
 docs/relnotes/11.0.9.html|   27 +-
 docs/relnotes/11.1.0.html|   39 +-
 docs/relnotes/11.1.1.html|   27 +-
 docs/relnotes/11.1.2.html|   27 +-
 docs/relnotes/11.1.3.html|   27 +-
 docs/relnotes/11.1.4.html|   27 +-
 docs/relnotes/11.2.0.html|   37 +-
 docs/relnotes/11.2.1.html|   27 +-
 docs/relnotes/11.2.2.html|   27 +-
 docs/relnotes/12.0.0.html|   35 +-
 docs/relnotes/12.0.1.html|   27 +-
 docs/relnotes/12.0.2.html|   31 +-
 docs/relnotes/12.0.3.html|   27 +-
 docs/relnotes/12.0.4.html|   31 +-
 docs/relnotes/12.0.5.html|   27 +-
 docs/relnotes/12.0.6.html|   29 +-
 docs/relnotes/13

[Mesa-dev] [PATCH v2 05/15] docs: Rename html to rst

2018-05-30 Thread Laura Ekstrand
This should tell git that the files are really the same.  That way, we
don't lose the file history.
---
 docs/{application-issues.html => application-issues.rst} | 0
 docs/{autoconf.html => autoconf.rst} | 0
 docs/{bugs.html => bugs.rst} | 0
 docs/{codingstyle.html => codingstyle.rst}   | 0
 docs/{conform.html => conform.rst}   | 0
 docs/{debugging.html => debugging.rst}   | 0
 docs/{developers.html => developers.rst} | 0
 docs/{devinfo.html => devinfo.rst}   | 0
 docs/{dispatch.html => dispatch.rst} | 0
 docs/{download.html => download.rst} | 0
 docs/{egl.html => egl.rst}   | 0
 docs/{envvars.html => envvars.rst}   | 0
 docs/{extensions.html => extensions.rst} | 0
 docs/{faq.html => faq.rst}   | 0
 docs/{helpwanted.html => helpwanted.rst} | 0
 docs/{index.html => index.rst}   | 0
 docs/{install.html => install.rst}   | 0
 docs/{intro.html => intro.rst}   | 0
 docs/{license.html => license.rst}   | 0
 docs/{lists.html => lists.rst}   | 0
 docs/{llvmpipe.html => llvmpipe.rst} | 0
 docs/{mangling.html => mangling.rst} | 0
 docs/{meson.html => meson.rst}   | 0
 docs/{opengles.html => opengles.rst} | 0
 docs/{osmesa.html => osmesa.rst} | 0
 docs/{perf.html => perf.rst} | 0
 docs/{postprocess.html => postprocess.rst}   | 0
 docs/{precompiled.html => precompiled.rst}   | 0
 docs/{release-calendar.html => release-calendar.rst} | 0
 docs/{releasing.html => releasing.rst}   | 0
 docs/{relnotes.html => relnotes.rst} | 0
 docs/relnotes/{10.0.1.html => 10.0.1.rst}| 0
 docs/relnotes/{10.0.2.html => 10.0.2.rst}| 0
 docs/relnotes/{10.0.3.html => 10.0.3.rst}| 0
 docs/relnotes/{10.0.4.html => 10.0.4.rst}| 0
 docs/relnotes/{10.0.5.html => 10.0.5.rst}| 0
 docs/relnotes/{10.0.html => 10.0.rst}| 0
 docs/relnotes/{10.1.1.html => 10.1.1.rst}| 0
 docs/relnotes/{10.1.2.html => 10.1.2.rst}| 0
 docs/relnotes/{10.1.3.html => 10.1.3.rst}| 0
 docs/relnotes/{10.1.4.html => 10.1.4.rst}| 0
 docs/relnotes/{10.1.5.html => 10.1.5.rst}| 0
 docs/relnotes/{10.1.6.html => 10.1.6.rst}| 0
 docs/relnotes/{10.1.html => 10.1.rst}| 0
 docs/relnotes/{10.2.1.html => 10.2.1.rst}| 0
 docs/relnotes/{10.2.2.html => 10.2.2.rst}| 0
 docs/relnotes/{10.2.3.html => 10.2.3.rst}| 0
 docs/relnotes/{10.2.4.html => 10.2.4.rst}| 0
 docs/relnotes/{10.2.5.html => 10.2.5.rst}| 0
 docs/relnotes/{10.2.6.html => 10.2.6.rst}| 0
 docs/relnotes/{10.2.7.html => 10.2.7.rst}| 0
 docs/relnotes/{10.2.8.html => 10.2.8.rst}| 0
 docs/relnotes/{10.2.9.html => 10.2.9.rst}| 0
 docs/relnotes/{10.2.html => 10.2.rst}| 0
 docs/relnotes/{10.3.1.html => 10.3.1.rst}| 0
 docs/relnotes/{10.3.2.html => 10.3.2.rst}| 0
 docs/relnotes/{10.3.3.html => 10.3.3.rst}| 0
 docs/relnotes/{10.3.4.html => 10.3.4.rst}| 0
 docs/relnotes/{10.3.5.html => 10.3.5.rst}| 0
 docs/relnotes/{10.3.6.html => 10.3.6.rst}| 0
 docs/relnotes/{10.3.7.html => 10.3.7.rst}| 0
 docs/relnotes/{10.3.html => 10.3.rst}| 0
 docs/relnotes/{10.4.1.html => 10.4.1.rst}| 0
 docs/relnotes/{10.4.2.html => 10.4.2.rst}| 0
 docs/relnotes/{10.4.3.html => 10.4.3.rst}| 0
 docs/relnotes/{10.4.4.html => 10.4.4.rst}| 0
 docs/relnotes/{10.4.5.html => 10.4.5.rst}| 0
 docs/relnotes/{10.4.6.html => 10.4.6.rst}| 0
 docs/relnotes/{10.4.7.html => 10.4.7.rst}| 0
 docs/relnotes/{10.4.html => 10.4.rst}| 0
 docs/relnotes/{10.5.0.html => 10.5.0.rst}| 0
 docs/relnotes/{10.5.1.html => 10.5.1.rst}| 0
 docs/relnotes/{10.5.2.html => 10.5.2.rst}| 0
 docs/relnotes/{10.5.3.html => 10.5.3.rst}| 0
 docs/relnotes/{10.5.4.html => 10.5.4.rst}| 0
 docs/relnotes/{10.5.5.html => 10.5.5.rst}| 0
 docs/relnotes/{10.5.6.html => 10.5.6.rst}| 0
 docs/relnotes/{10.5.7.html => 10.5.7.rst}| 0
 docs/relnotes/{10.5.8.html => 10.5.8.rst}|

[Mesa-dev] [PATCH v2 13/15] docs: Fix Sphinx compile errors.

2018-05-30 Thread Laura Ekstrand
This just involves some quick fixes to formatting of the affected pages.
---
 docs/autoconf.rst|  1 +
 docs/dispatch.rst| 72 ++--
 docs/egl.rst |  2 ++
 docs/releasing.rst   | 14 +-
 docs/relnotes/17.0.5.rst |  2 +-
 docs/relnotes/9.2.2.rst  |  1 -
 6 files changed, 44 insertions(+), 48 deletions(-)

diff --git a/docs/autoconf.rst b/docs/autoconf.rst
index 007252feb0..25ba71cf66 100644
--- a/docs/autoconf.rst
+++ b/docs/autoconf.rst
@@ -102,6 +102,7 @@ There are also a few general options for altering the Mesa 
build:
 This option ensures that assembly will not be used.
 
 ``--build=``
+.. See host
 ``--host=``
 By default, the build will compile code for the architecture that
 it's running on. In order to build cross-compile Mesa on a x86-64
diff --git a/docs/dispatch.rst b/docs/dispatch.rst
index d6f8542c68..aba7192c31 100644
--- a/docs/dispatch.rst
+++ b/docs/dispatch.rst
@@ -62,18 +62,17 @@ conceptually simple:
 This can be implemented in just a few lines of C code. The file
 ``src/mesa/glapi/glapitemp.h`` contains code very similar to this.
 
-
+--+
-| ::   
|
-|  
|
-| void glVertex3f(GLfloat x, GLfloat y, GLfloat z) 
|
-| {
|
-| const struct _glapi_table * const dispatch = GET_DISPATCH(); 
|
-|  
|
-| (*dispatch->Vertex3f)(x, y, z);  
|
-| }
|
-
+--+
-| Sample dispatch function 
|
-
+--+
+Sample dispatch function
+
+
+.. code-block:: c
+
+ void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
+ {
+ const struct _glapi_table * const dispatch = GET_DISPATCH();
+
+ (*dispatch->Vertex3f)(x, y, z);
+ }
 
 The problem with this simple implementation is the large amount of
 overhead that it adds to every GL function call.
@@ -118,16 +117,14 @@ resulting implementation of ``GET_DISPATCH`` is slightly 
more complex,
 but it avoids the expensive ``pthread_getspecific`` call in the common
 case.
 
-
+--+
-| ::   
|
-|  
|
-| #define GET_DISPATCH() \ 
|
-| (_glapi_Dispatch != NULL) \  
|
-| ? _glapi_Dispatch : pthread_getspecific(&_glapi_Dispatch_key 
|
-| )
|
-
+--+
-| Improved ``GET_DISPATCH`` Implementation 
|
-
+--+
+Improved ``GET_DISPATCH`` Implementation
+
+.. code-block:: c
+
+#define GET_DISPATCH() \
+(_glapi_Dispatch != NULL) \
+? _glapi_Dispatch : pthread_getspecific(&_glapi_Dispatch_key)
+
 
 3.2. ELF TLS
 
@@ -145,16 +142,14 @@ with direct rendering drivers that use either interface. 
Once the
 pointer is properly declared, ``GET_DISPACH`` becomes a simple variable
 reference.
 
-
+--+
-| ::   
|
-|  
|
-| extern __thread struct _glapi_table *_glapi_tls_Dispatch 
|
-| __attribute__((tls_model("initial-exec")));  
|
-|  
|
-| #define GET_DISPATCH() _glapi_tls_Dispatch   
|
-
+--+
-| TLS ``GET_DISPATCH`` Implementation  
|
-
+--+
+TLS ``GET_DISPATCH`` Implementation
+^^^
+.. code-block:: c
+
+   extern __thread struct _glapi_table *_glapi_tls_Dispatch
+   __at

[Mesa-dev] [PATCH v2 06/15] docs: Add results of script - pandoc-generated rst pages.

2018-05-30 Thread Laura Ekstrand
---
 docs/application-issues.rst |   90 +-
 docs/autoconf.rst   |  406 ++-
 docs/bugs.rst   |   75 +-
 docs/codingstyle.rst|  244 +-
 docs/conform.rst| 1343 +-
 docs/debugging.rst  |   66 +-
 docs/developers.rst |   63 +-
 docs/devinfo.rst|  103 +-
 docs/dispatch.rst   |  510 ++--
 docs/download.rst   |  130 +-
 docs/egl.rst|  311 +--
 docs/envvars.rst|  746 +++---
 docs/extensions.rst |   80 +-
 docs/faq.rst|  614 ++---
 docs/helpwanted.rst |  110 +-
 docs/index.rst  | 4365 
 docs/install.rst|  335 ++-
 docs/intro.rst  |  609 ++---
 docs/license.rst|  163 +-
 docs/lists.rst  |  129 +-
 docs/llvmpipe.rst   |  519 ++--
 docs/mangling.rst   |   32 +-
 docs/meson.rst  |  301 +--
 docs/opengles.rst   |   85 +-
 docs/osmesa.rst |   82 +-
 docs/perf.rst   |  112 +-
 docs/postprocess.rst|   75 +-
 docs/precompiled.rst|   35 +-
 docs/release-calendar.rst   |  218 +-
 docs/releasing.rst  |  877 +++
 docs/relnotes.rst   |  482 ++--
 docs/relnotes/10.0.1.rst|  192 +-
 docs/relnotes/10.0.2.rst|  211 +-
 docs/relnotes/10.0.3.rst|  307 ++-
 docs/relnotes/10.0.4.rst|  331 ++-
 docs/relnotes/10.0.5.rst|  235 +-
 docs/relnotes/10.0.rst  |  254 +-
 docs/relnotes/10.1.1.rst|  434 ++--
 docs/relnotes/10.1.2.rst|  323 ++-
 docs/relnotes/10.1.3.rst|  107 +-
 docs/relnotes/10.1.4.rst|  119 +-
 docs/relnotes/10.1.5.rst|  124 +-
 docs/relnotes/10.1.6.rst|  176 +-
 docs/relnotes/10.1.rst  |   90 +-
 docs/relnotes/10.2.1.rst|   72 +-
 docs/relnotes/10.2.2.rst|  261 +-
 docs/relnotes/10.2.3.rst|  158 +-
 docs/relnotes/10.2.4.rst|  214 +-
 docs/relnotes/10.2.5.rst|  340 ++-
 docs/relnotes/10.2.6.rst|  205 +-
 docs/relnotes/10.2.7.rst|  346 ++-
 docs/relnotes/10.2.8.rst|  167 +-
 docs/relnotes/10.2.9.rst|  121 +-
 docs/relnotes/10.2.rst  |  121 +-
 docs/relnotes/10.3.1.rst|  229 +-
 docs/relnotes/10.3.2.rst|  147 +-
 docs/relnotes/10.3.3.rst|  378 ++-
 docs/relnotes/10.3.4.rst|  132 +-
 docs/relnotes/10.3.5.rst|  110 +-
 docs/relnotes/10.3.6.rst|  155 +-
 docs/relnotes/10.3.7.rst|  118 +-
 docs/relnotes/10.3.rst  |  681 ++---
 docs/relnotes/10.4.1.rst|  120 +-
 docs/relnotes/10.4.2.rst|  161 +-
 docs/relnotes/10.4.3.rst|  257 +-
 docs/relnotes/10.4.4.rst|  115 +-
 docs/relnotes/10.4.5.rst|  146 +-
 docs/relnotes/10.4.6.rst|  182 +-
 docs/relnotes/10.4.7.rst|  172 +-
 docs/relnotes/10.4.rst  |  504 ++--
 docs/relnotes/10.5.0.rst|  406 +--
 docs/relnotes/10.5.1.rst|  379 ++-
 docs/relnotes/10.5.2.rst|  160 +-
 docs/relnotes/10.5.3.rst|  162 +-
 docs/relnotes/10.5.4.rst|  165 +-
 docs/relnotes/10.5.5.rst|  116 +-
 docs/relnotes/10.5.6.rst|  187 +-
 docs/relnotes/10.5.7.rst|  134 +-
 docs/relnotes/10.5.8.rst|  130 +-
 docs/relnotes/10.5.9.rst|  194 +-
 docs/relnotes/10.6.0.rst|  672 ++---
 docs/relnotes/10.6.1.rst|  134 +-
 docs/relnotes/10.6.2.rst|  283 +--
 docs/relnotes/10.6.3.rst|  124 +-
 docs/relnotes/10.6.4.rst|  181 +-
 docs/relnotes/10.6.5.rst|  153 +-
 docs/relnotes/10.6.6.rst|  224 +-
 docs/relnotes/10.6.7.rst|   87 +-
 docs/relnotes/10.6.8.rst|  162 +-
 docs/relnotes/10.6.9.rst|  161 +-
 docs/relnotes/11.0.0.rst|  512 ++--
 docs/relnotes/11.0.1.rst|  166 +-
 docs/relnotes/11.0.2.rst|  104 +-
 docs/relnotes/11.0.3.rst|  297 +--
 docs/relnotes/11.0.4.rst|  256 +-
 docs/relnotes/11.0.5.rst|  238 +-
 docs/relnotes/11.0.6.rst|  179 +-
 docs/relnotes/11.0.7.rst|  252 +-
 docs/relnotes/11.0.8.rst|  357 ++-
 docs/relnotes/11.0.9.rst|  160 +-
 docs/relnotes/11.1.0.rst|  559 +++--
 docs/relnotes/11.1.1.rst|  345 ++-
 docs/relnotes/11.1.2.rst|  271 +-
 docs/relnotes/11.1.3.rst|  519 ++--
 docs/relnotes/11.1.4.rst|  272 +-
 docs/relnotes/11.2.0.rst|  589 ++---
 docs/relnotes/11.2.1.rst|  138 +-
 docs/relnotes/11.2.2.rst|  317 ++-
 docs/relnotes/12.0.0.rst|  676 ++---
 docs/relnotes/12.0.1.rst|   75 +-
 docs/relnotes/12.0.2.rst|  763 +++---
 docs/relnotes/12.0.3.rst|   82 +-
 docs/relnotes/12.0.4.rst|  547 ++--
 docs/relnotes/12.0.5.rst|  177 +-
 docs/relnotes/12.0.6.rst|  219 +-
 docs/relnotes/13.0.0.rst|  617 ++---
 docs/relnotes/13.0.1.rst|  323 ++-
 docs/relnotes/13.0.2.rst|  328 ++-
 docs/relnotes/13.0.3.rst|  307 ++-
 docs/relnotes/13.0.4.rst|  379 ++-
 docs/relnotes/13.0.5.rst|  381 ++-
 docs/relnotes/13.0.6.rst|  505 ++--
 docs/relnotes/17.0.0.rst|  548 +++--
 docs/relnotes/17.0.1.rst|  374 ++-
 docs/relnotes/17.0.2.rst|  286 +--

[Mesa-dev] [PATCH v2 07/15] docs: Add Sphinx configuration file.

2018-05-30 Thread Laura Ekstrand
From: Jean Hertel 

This tells Sphinx how to build our website from reStructured Text.

Signed-off-by: Jean Hertel 
---
 docs/conf.py | 162 +++
 1 file changed, 162 insertions(+)
 create mode 100644 docs/conf.py

diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 00..33bf717a87
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,162 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import sphinx_rtd_theme
+
+#
+# The Mesa 3D Graphics Library documentation build configuration file, created 
by
+# sphinx-quickstart on Wed Mar 29 14:08:51 2017.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- General configuration 
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'The Mesa 3D Graphics Library'
+copyright = '2017, Brian Paul'
+author = 'Brian Paul'
+
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = 'latest'
+# The full version, including alpha/beta/rc tags.
+release = 'latest'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This patterns also effect to html_static_path and html_extra_path
+exclude_patterns = []
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output --
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#
+# html_theme_options = {}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = []
+
+
+# -- Options for HTMLHelp output --
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'TheMesa3DGraphicsLibrarydoc'
+
+
+# -- Options for LaTeX output -
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#
+# 'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#
+# 'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#
+# 'preamble': '',
+
+# Latex figure (float) alignment
+#
+# 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+(master_doc, 'TheMesa3DGraphicsLibrary.tex', 'The Mesa 3D Graphics Library 
Documentation',
+ 'Brian Paul', 'manual'),
+]
+
+
+# -- Options for manual page output ---
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+(master_doc, 'themesa3dgraphicslibrary', 'The

[Mesa-dev] [PATCH v2 02/15] docs: Add python script that converts html to rst.

2018-05-30 Thread Laura Ekstrand
Use Beautiful Soup to fix bad html, then use pandoc for converting to
rst.
---
 docs/rstConverter.py | 23 +++
 1 file changed, 23 insertions(+)
 create mode 100755 docs/rstConverter.py

diff --git a/docs/rstConverter.py b/docs/rstConverter.py
new file mode 100755
index 00..5321fdde8b
--- /dev/null
+++ b/docs/rstConverter.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python3
+import glob
+import subprocess
+from bs4 import BeautifulSoup
+
+pages = glob.glob("*.html")
+pages += glob.glob("relnotes/*.html")
+for filename in pages:
+# Fix some annoyingly bad html.
+with open(filename) as f:
+soup = BeautifulSoup(f, 'html5lib')
+soup.find("div", "header").extract() # Get rid of old header
+soup.iframe.extract() # Get rid of old contents bar.
+soup.find("div", "content").unwrap() # Strip the content div.
+
+# Write out the better html.
+with open(filename, 'wt') as f:
+f.write(str(soup))
+
+# Convert to rst with pandoc.
+name = filename.split(".html")[0]
+bashCmd = "pandoc " + filename + " -o " + name + ".rst"
+subprocess.run(bashCmd.split())
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 00/16] Move the Mesa Website to Sphinx

2018-05-30 Thread Laura Ekstrand
v2: - Preserve git file history by forcing a rename
- Squash Sphinx compiler fixes to conf.py and relnotes.rst into original
  configuration and toctree commits, respectively.
- Rebase to include 18.1.0 and 18.2.0 releases.

Some of these commits are large.  I recommend going to view the branch at
https://gitlab.freedesktop.org/ldeks/mesa/commits/website1_75_v2.

It's time to move the Mesa-3d.org website into the 21st century. We have
chosen to move to Sphinx and resStructured text for a number of reasons:
  1. Syntax highlighting for code snippets.
  2. Snazzy highlighting for variables and function names.
  3. Consistency with the Gallium drivers, which host their documentation on
 ReadTheDocs.
  4. Ultimately less work for us, because writing content in reStructured Text
 is simpler and Sphinx turns it into beautiful, readable pages without us
 having to manually fix problems in html and css.
  5. With Gitlab, the Sphinx website is auto-generated every time the Mesa
 code repository is pushed to Gitlab without us having to
 build and deploy it.

The new website is currently hosted at mesa-test.freedesktop.org.  When these
patches are merged, Daniel Stone will point our Gitlab CI system at
mesa-3d.org.

When reviewing these patches, please note:
1. This patch series does *not* touch content.  Please do not bikeshed
   the content of webpages here.  That will be addressed in later
   commits.
2. Please do *not* bikeshed website style here.  We are using the
   classic ReadTheDocs style for now and we will update style in a
   future commit.
3. I've done my best to make your current content look beautiful.  If
   there's a problem, please let me know.
4. There were some commits to the website between when I started this
   series and now. I've done my best to incorporate your changes.
   So if you changed your content in the past two weeks, take a look
   at your page.

I hope you'll agree that the resulting pages are much cleaner and easier to
read.  I've learned a lot by reading these pages.

Thanks.

Laura Ekstrand
---

Jean Hertel (3):
  docs: Add Sphinx configuration file.
  docs: Add a navigation sidebar.
  docs: Add toctree to relnotes

Laura Ekstrand (13):
  Added ci yaml file for Gitlab.
  docs: Add python script that converts html to rst.
  docs: Remove contents.html
  docs: Result of script fixing html with Beautiful Soup.
  docs: Add results of script - pandoc-generated rst pages.
  docs: Add command for Sphinx build.
  docs: Toctree for systems.rst as in jhertel docs.
  docs: Remove html files.
  docs: Fix Sphinx compile errors.
  docs: Edits to fix toctrees.
  docs: Major manual edits to environment vars.
  docs: Human edits to the website code for clarity.
  docs: Remove unneeded mesa css file.

 .gitlab-ci.yml   |   11 +
 docs/application-issues.html |   83 --
 docs/application-issues.rst  |   48 +
 docs/autoconf.html   |  257 
 docs/autoconf.rst|  209 +++
 docs/bugs.html   |   64 -
 docs/bugs.rst|   33 +
 docs/codingstyle.html|  142 --
 docs/codingstyle.rst |  124 ++
 docs/conf.py |  162 +++
 docs/conform.html|  703 --
 docs/conform.rst |  675 ++
 docs/contents.html   |  108 --
 docs/debugging.html  |   47 -
 docs/debugging.rst   |   21 +
 docs/developers.html |   58 -
 docs/developers.rst  |   25 +
 docs/devinfo.html|   83 --
 docs/devinfo.rst |   43 +
 docs/dispatch.html   |  278 
 docs/dispatch.rst|  257 
 docs/download.html   |  112 --
 docs/download.rst|   73 ++
 docs/egl.html|  259 
 docs/egl.rst |  117 ++
 docs/envvars.html|  383 --
 docs/envvars.rst |  615 +
 docs/extensions.html |   51 -
 docs/extensions.rst  |   31 +
 docs/faq.html|  392 --
 docs/faq.rst |  308 +
 docs/helpwanted.html |   88 --
 docs/helpwanted.rst  |   46 +
 docs/index.html  | 2380 -
 docs/index.rst   | 2438 ++
 docs/install.html|  252 
 docs/install.rst |  193 +++
 docs/intro.html  |  404 --
 docs/intro.rst   |  308 +
 docs/license.html|  121 --
 docs/license.rst |   89 ++
 docs/lists.html  |   97 --
 docs/lists.rst   |   62 +
 docs/llvmpipe.html   |  330 -
 docs/llvmpipe.rst|  277 
 docs/mangling.html   |   37 -
 docs/mangling.rst|   14 +
 docs/mesa.css|   63 -
 docs/meson.html  

[Mesa-dev] [PATCH v2 03/15] docs: Remove contents.html and old mesa.css file.

2018-05-30 Thread Laura Ekstrand
The old navigation bar, may it rest in peace, causes major problems when
running the rstConverter.py script.  It and the css file are also unneeded.
Let's get rid of them now.
---
 docs/contents.html | 108 -
 docs/mesa.css  |  63 ---
 2 files changed, 171 deletions(-)
 delete mode 100644 docs/contents.html
 delete mode 100644 docs/mesa.css

diff --git a/docs/contents.html b/docs/contents.html
deleted file mode 100644
index 9a86019e2f..00
--- a/docs/contents.html
+++ /dev/null
@@ -1,108 +0,0 @@
-http://www.w3.org/TR/html4/loose.dtd";>
-
-
-  
-  Contents
-  
-
-  
-  
-
-  
-
-
-
-Documentation
-
-Introduction
-News
-Developers
-Platforms and Drivers
-License & Copyright
-FAQ
-Release Notes
-Acknowledgements
-Conformance Testing
-more docs below...
-
-
-Download / Install
-
-Downloading / Unpacking
-Compiling / Installing
-  
-Autoconf
-Meson
-  
-
-Precompiled Libraries
-
-
-Resources
-
-Mailing Lists
-Bug Database
-Webmaster
-https://dri.freedesktop.org/"; target="_parent">Mesa/DRI Wiki
-
-
-User Topics
-
-Shading Language
-EGL
-OpenGL ES
-Environment Variables
-Off-Screen Rendering
-Debugging Tips
-Performance Tips
-Mesa Extensions
-GL Function Name Mangling
-Gallium llvmpipe driver
-VMware SVGA3D guest driver
-Gallium post-processing
-Application Issues
-Viewperf Issues
-
-
-Developer Topics
-
-Source Code Repository
-Source Code Tree
-Utilities
-Help Wanted
-Development Notes
-Coding Style
-Submitting patches
-Releasing process
-Release calendar
-Source Documentation
-GL Dispatch
-
-
-Links
-
-https://www.opengl.org"; target="_parent">OpenGL website
-https://dri.freedesktop.org"; target="_parent">DRI website
-https://www.freedesktop.org"; target="_parent">freedesktop.org
-https://planet.freedesktop.org"; target="_parent">Developer 
blogs
-
-
-Hosted by:
-
-
-https://freedesktop.org"; target="_parent">freedesktop.org
-
-
-
-
diff --git a/docs/mesa.css b/docs/mesa.css
deleted file mode 100644
index 7ab8152b04..00
--- a/docs/mesa.css
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Mesa CSS */
-body {
-   background-color: #ff;
-   font: 14px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
-   color: black;
-   link: #88;
-}
-
-h1 {
-   font: 24px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
-   font-weight: bold;
-   color: black;
-}
-
-h2 {
-   font: 18px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif, bold;
-   font-weight: bold;
-   color: black;
-}
-
-code {
-   font-family: monospace;
-   font-size: 10pt;
-   color: black;
-}
-
-
-pre {
-   /*font-family: monospace;*/
-   font-size: 10pt;
-   /*color: black;*/
-}
-
-iframe {
-  width: 19em;
-  height: 80em;
-  border: none;
-  float: left;
-}
-
-.content {
-  position: absolute;
-  left: 20em;
-  right: 10px;
-  overflow: hidden
-}
-
-.header {
-  background: black url('gears.png') 15px no-repeat;
-  margin:0;
-  padding: 5px;
-  clear:both;
-}
-
-.header h1 {
-  background: url('gears.png') right no-repeat;
-  color: white;
-  font: x-large sans-serif;
-  text-align: center;
-  height: 50px;
-  margin: 0;
-  padding-top: 30px;
-}
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 08/15] docs: Add command for Sphinx build.

2018-05-30 Thread Laura Ekstrand
This does two things.  1. It pulls a Docker image which is a Linux
system with Sphinx and the Read the Docs Sphinx theme already installed.
2. It uses sphinx-build to build html from our rst pages.
---
 .gitlab-ci.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 29b30541b5..8eb03c58e6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,10 @@
+image: suttang/sphinx-rtd-theme
+
 pages:
stage: deploy
script:
- mkdir .public
-   - cp -r docs/* .public
+   - sphinx-build -b html -j 4 docs .public
- mv .public public
artifacts:
  paths:
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 10/15] docs: Add toctree to relnotes

2018-05-30 Thread Laura Ekstrand
From: Jean Hertel 

Toctree directives create automatically generated navigation sidebars.
This is the new relnotes sidebar.
---
 docs/relnotes.rst | 210 ++
 1 file changed, 210 insertions(+)

diff --git a/docs/relnotes.rst b/docs/relnotes.rst
index 3cb96bb6a4..e4fa0e5efa 100644
--- a/docs/relnotes.rst
+++ b/docs/relnotes.rst
@@ -3,6 +3,8 @@ Release Notes
 
 The release notes summarize what's new or changed in each Mesa release.
 
+-  `18.2.0 release notes `__
+-  `18.1.0 release notes `__
 -  `18.0.4 release notes `__
 -  `18.0.3 release notes `__
 -  `18.0.2 release notes `__
@@ -231,3 +233,211 @@ file `__ and the following release notes.
 -  `3.2.1 release notes `__
 -  `3.2 release notes `__
 -  `3.1 release notes `__
+
+.. toctree::
+   :maxdepth: 1
+   :hidden:
+
+   release-calendar
+   relnotes/18.2.0
+   relnotes/18.1.0
+   relnotes/18.0.4
+   relnotes/18.0.3
+   relnotes/18.0.2
+   relnotes/18.0.1
+   relnotes/18.0.0
+   relnotes/17.3.9
+   relnotes/17.3.8
+   relnotes/17.3.7
+   relnotes/17.3.6
+   relnotes/17.3.5
+   relnotes/17.3.4
+   relnotes/17.3.3
+   relnotes/17.3.2
+   relnotes/17.3.1
+   relnotes/17.3.0
+   relnotes/17.2.8
+   relnotes/17.2.7
+   relnotes/17.2.6
+   relnotes/17.2.5
+   relnotes/17.2.4
+   relnotes/17.2.3
+   relnotes/17.2.2
+   relnotes/17.2.1
+   relnotes/17.2.0
+   relnotes/17.1.10
+   relnotes/17.1.9
+   relnotes/17.1.8
+   relnotes/17.1.7
+   relnotes/17.1.6
+   relnotes/17.1.5
+   relnotes/17.1.4
+   relnotes/17.1.3
+   relnotes/17.1.2
+   relnotes/17.1.1
+   relnotes/17.1.0
+   relnotes/17.0.7
+   relnotes/17.0.6
+   relnotes/17.0.5
+   relnotes/17.0.4
+   relnotes/17.0.3
+   relnotes/17.0.2
+   relnotes/13.0.6
+   relnotes/17.0.1
+   relnotes/13.0.5
+   relnotes/17.0.0
+   relnotes/13.0.4
+   relnotes/12.0.6
+   relnotes/13.0.3
+   relnotes/12.0.5
+   relnotes/13.0.2
+   relnotes/13.0.1
+   relnotes/12.0.4
+   relnotes/13.0.0
+   relnotes/12.0.3
+   relnotes/12.0.2
+   relnotes/12.0.1
+   relnotes/12.0.0
+   relnotes/11.2.2
+   relnotes/11.1.4
+   relnotes/11.2.1
+   relnotes/11.1.3
+   relnotes/11.2.0
+   relnotes/11.1.2
+   relnotes/11.0.9
+   relnotes/11.1.1
+   relnotes/11.0.8
+   relnotes/11.1.0
+   relnotes/11.0.7
+   relnotes/11.0.6
+   relnotes/11.0.5
+   relnotes/11.0.4
+   relnotes/11.0.3
+   relnotes/10.6.9
+   relnotes/11.0.2
+   relnotes/11.0.1
+   relnotes/10.6.8
+   relnotes/11.0.0
+   relnotes/10.6.7
+   relnotes/10.6.6
+   relnotes/10.6.5
+   relnotes/10.6.4
+   relnotes/10.6.3
+   relnotes/10.6.2
+   relnotes/10.5.9
+   relnotes/10.6.1
+   relnotes/10.5.8
+   relnotes/10.6.0
+   relnotes/10.5.7
+   relnotes/10.5.6
+   relnotes/10.5.5
+   relnotes/10.5.4
+   relnotes/10.5.3
+   relnotes/10.5.2
+   relnotes/10.4.7
+   relnotes/10.5.1
+   relnotes/10.5.0
+   relnotes/10.4.6
+   relnotes/10.4.5
+   relnotes/10.4.4
+   relnotes/10.4.3
+   relnotes/10.4.2
+   relnotes/10.3.7
+   relnotes/10.4.1
+   relnotes/10.3.6
+   relnotes/10.4
+   relnotes/10.3.5
+   relnotes/10.3.4
+   relnotes/10.3.3
+   relnotes/10.3.2
+   relnotes/10.3.1
+   relnotes/10.2.9
+   relnotes/10.3
+   relnotes/10.2.8
+   relnotes/10.2.7
+   relnotes/10.2.6
+   relnotes/10.2.5
+   relnotes/10.2.4
+   relnotes/10.2.3
+   relnotes/10.2.2
+   relnotes/10.2.1
+   relnotes/10.2
+   relnotes/10.1.6
+   relnotes/10.1.5
+   relnotes/10.1.4
+   relnotes/10.1.3
+   relnotes/10.1.2
+   relnotes/10.1.1
+   relnotes/10.1
+   relnotes/10.0.5
+   relnotes/10.0.4
+   relnotes/10.0.3
+   relnotes/10.0.2
+   relnotes/10.0.1
+   relnotes/10.0
+   relnotes/9.2.5
+   relnotes/9.2.4
+   relnotes/9.2.3
+   relnotes/9.2.2
+   relnotes/9.2.1
+   relnotes/9.2
+   relnotes/9.1.7
+   relnotes/9.1.6
+   relnotes/9.1.5
+   relnotes/9.1.4
+   relnotes/9.1.3
+   relnotes/9.1.2
+   relnotes/9.1.1
+   relnotes/9.1
+   relnotes/9.0.3
+   relnotes/9.0.2
+   relnotes/9.0.1
+   relnotes/9.0
+   relnotes/8.0.5
+   relnotes/8.0.4
+   relnotes/8.0.3
+   relnotes/8.0.2
+   relnotes/8.0.1
+   relnotes/8.0
+   relnotes/7.11.2
+   relnotes/7.11.1
+   relnotes/7.11
+   relnotes/7.10.3
+   relnotes/7.10.2
+   relnotes/7.10.1
+   relnotes/7.10
+   relnotes/7.9.2
+   relnotes/7.9.1
+   relnotes/7.9
+   relnotes/7.8.3
+   relnotes/7.8.2
+   relnotes/7.8.1
+   relnotes/7.8
+   relnotes/7.7.1
+   relnotes/7.7
+   relnotes/7.6.1
+   relnotes/7.6
+   relnotes/7.5.2
+   relnotes/7.5.1
+   relnotes/7.5
+   relnotes/7.4.4
+   relnotes/7.4.3
+   relnotes/7.4.2
+   relnotes/7.4.1
+   relnotes/7.4
+   relnotes/7.3
+   relnotes/7.2
+   relnotes/7.1
+   relnotes/7.0.4
+   relnotes/7.0.3
+   relnotes/7.0.2
+   relnotes/7.0.1
+   relnotes/7.0
+   relnotes/6.5.3
+   relnotes/6.5.2
+   relnotes/6.5.1
+   relnotes/6.5
+   relnotes/6.4.2
+   relnotes/6.4.1
+   relnotes/6.4
+   Older Versions 
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 01/15] Added ci yaml file for Gitlab.

2018-05-30 Thread Laura Ekstrand
For now, all this does is copy our current webpage into a public folder.
Daniel Stone has the server configured to check this public folder and
host the index.html as mesa-test.freedesktop.org. When this patch series
is approved, Daniel will change it to point at mesa-3d.org.
---
 .gitlab-ci.yml | 9 +
 1 file changed, 9 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00..29b30541b5
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,9 @@
+pages:
+   stage: deploy
+   script:
+   - mkdir .public
+   - cp -r docs/* .public
+   - mv .public public
+   artifacts:
+ paths:
+ - public
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 02/16] docs: Add python script that converts html to rst.

2018-05-29 Thread Laura Ekstrand
Nevermind, Jason used a git revert trick to get it to work.  The v2 will
have the diff and preserve the git file history.

On Fri, May 25, 2018 at 7:58 PM, Laura Ekstrand 
wrote:

> I specifically tried forcing a rename earlier, but it doesn't work.  Git
> sees too much change.  The only way I could get it to work was manually
> renaming the HTML files to rst first, then committing, then converting to
> rst.
>
> The problem with that strategy is that then the Pandoc command for
> converting to rst doesn't make sense.  (.rst to .rst? What?)
>
> Laura
>
> On Fri, May 25, 2018, 4:26 AM Eric Engestrom 
> wrote:
>
>> On Thursday, 2018-05-24 17:27:05 -0700, Laura Ekstrand wrote:
>> > Use Beautiful Soup to fix bad html, then use pandoc for converting to
>> > rst.
>> > ---
>> >  docs/rstConverter.py | 23 +++
>> >  1 file changed, 23 insertions(+)
>> >  create mode 100755 docs/rstConverter.py
>> >
>> > diff --git a/docs/rstConverter.py b/docs/rstConverter.py
>> > new file mode 100755
>> > index 00..5321fdde8b
>> > --- /dev/null
>> > +++ b/docs/rstConverter.py
>> > @@ -0,0 +1,23 @@
>> > +#!/usr/bin/python3
>> > +import glob
>> > +import subprocess
>> > +from bs4 import BeautifulSoup
>> > +
>> > +pages = glob.glob("*.html")
>> > +pages += glob.glob("relnotes/*.html")
>> > +for filename in pages:
>> > +# Fix some annoyingly bad html.
>> > +with open(filename) as f:
>> > +soup = BeautifulSoup(f, 'html5lib')
>> > +soup.find("div", "header").extract() # Get rid of old header
>> > +soup.iframe.extract() # Get rid of old contents bar.
>> > +soup.find("div", "content").unwrap() # Strip the content div.
>>
>> Good call on using beautifulsoup to clean the html before converting it!
>>
>> > +
>> > +# Write out the better html.
>> > +with open(filename, 'wt') as f:
>> > +f.write(str(soup))
>> > +
>> > +# Convert to rst with pandoc.
>> > +name = filename.split(".html")[0]
>> > +bashCmd = "pandoc " + filename + " -o " + name + ".rst"
>> > +subprocess.run(bashCmd.split())
>>
>> Idea: remove the old html at the same time as we introduce the rst
>> (commit-wise), so that git picks it up as a rename with changes, which
>> hopefully would be easier to check as a 1:1 of any given conversion?
>>
>> (In case this is as unclear as I think it is, I'm thinking about how we
>> can review individual pages conversions; say index.html -> index.rst, to
>> see that no release has been dropped in the process. If git shows this
>> as a rename with changes, I expect it will be easier to check than if
>> one commit creates all the rst files and another deletes all the html)
>>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 02/16] docs: Add python script that converts html to rst.

2018-05-25 Thread Laura Ekstrand
I specifically tried forcing a rename earlier, but it doesn't work.  Git
sees too much change.  The only way I could get it to work was manually
renaming the HTML files to rst first, then committing, then converting to
rst.

The problem with that strategy is that then the Pandoc command for
converting to rst doesn't make sense.  (.rst to .rst? What?)

Laura

On Fri, May 25, 2018, 4:26 AM Eric Engestrom 
wrote:

> On Thursday, 2018-05-24 17:27:05 -0700, Laura Ekstrand wrote:
> > Use Beautiful Soup to fix bad html, then use pandoc for converting to
> > rst.
> > ---
> >  docs/rstConverter.py | 23 +++
> >  1 file changed, 23 insertions(+)
> >  create mode 100755 docs/rstConverter.py
> >
> > diff --git a/docs/rstConverter.py b/docs/rstConverter.py
> > new file mode 100755
> > index 00..5321fdde8b
> > --- /dev/null
> > +++ b/docs/rstConverter.py
> > @@ -0,0 +1,23 @@
> > +#!/usr/bin/python3
> > +import glob
> > +import subprocess
> > +from bs4 import BeautifulSoup
> > +
> > +pages = glob.glob("*.html")
> > +pages += glob.glob("relnotes/*.html")
> > +for filename in pages:
> > +# Fix some annoyingly bad html.
> > +with open(filename) as f:
> > +soup = BeautifulSoup(f, 'html5lib')
> > +soup.find("div", "header").extract() # Get rid of old header
> > +soup.iframe.extract() # Get rid of old contents bar.
> > +soup.find("div", "content").unwrap() # Strip the content div.
>
> Good call on using beautifulsoup to clean the html before converting it!
>
> > +
> > +# Write out the better html.
> > +with open(filename, 'wt') as f:
> > +f.write(str(soup))
> > +
> > +# Convert to rst with pandoc.
> > +name = filename.split(".html")[0]
> > +bashCmd = "pandoc " + filename + " -o " + name + ".rst"
> > +subprocess.run(bashCmd.split())
>
> Idea: remove the old html at the same time as we introduce the rst
> (commit-wise), so that git picks it up as a rename with changes, which
> hopefully would be easier to check as a 1:1 of any given conversion?
>
> (In case this is as unclear as I think it is, I'm thinking about how we
> can review individual pages conversions; say index.html -> index.rst, to
> see that no release has been dropped in the process. If git shows this
> as a rename with changes, I expect it will be easier to check than if
> one commit creates all the rst files and another deletes all the html)
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-05-24 Thread Laura Ekstrand
A few of the commits are quite large and awaiting list approval.  I suggest
that you take a look at the code here:
https://gitlab.freedesktop.org/ldeks/mesa/tree/website1_75,
and the new website here: https://mesa-test.freedesktop.org/index.html

Laura

On Thu, May 24, 2018 at 5:27 PM, Laura Ekstrand 
wrote:

> It's time to move the Mesa-3d.org website into the 21st century. We have
> chosen to move to Sphinx and resStructured text for a number of reasons:
>   1. Syntax highlighting for code snippets.
>   2. Snazzy highlighting for variables and function names.
>   3. Consistency with the Gallium drivers, which host their documentation
> on
>  ReadTheDocs.
>   4. Ultimately less work for us, because writing content in reStructured
> Text
>  is simpler and Sphinx turns it into beautiful, readable pages without
> us
>  having to manually fix problems in html and css.
>   5. With Gitlab, the Sphinx website is auto-generated every time the Mesa
>  code repository is pushed to Gitlab without us having to
>  build and deploy it.
>
> The new website is currently hosted at mesa-test.freedesktop.org.  When
> these
> patches are merged, Daniel Stone will point our Gitlab CI system at
> mesa-3d.org.
>
> When reviewing these patches, please note:
> 1. This patch series does *not* touch content.  Please do not
> bikeshed
>the content of webpages here.  That will be addressed in later
>commits.
> 2. Please do *not* bikeshed website style here.  We are using the
>classic ReadTheDocs style for now and we will update style in a
>future commit.
> 3. I've done my best to make your current content look beautiful.
> If
>there's a problem, please let me know.
> 4. There were some commits to the website between when I started
> this
>series and now. I've done my best to incorporate your changes.
>So if you changed your content in the past two weeks, take a
> look
>at your page.
>
> I hope you'll agree that the resulting pages are much cleaner and easier to
> read.  I've learned a lot by reading these pages.
>
> Thanks.
>
> Laura Ekstrand
> ---
>
> Jean Hertel (3):
>   docs: Add Sphinx configuration file.
>   docs: Add a navigation sidebar.
>   docs: Add toctree to relnotes
>
> Laura Ekstrand (13):
>   Added ci yaml file for Gitlab.
>   docs: Add python script that converts html to rst.
>   docs: Remove contents.html
>   docs: Result of script fixing html with Beautiful Soup.
>   docs: Add results of script - pandoc-generated rst pages.
>   docs: Add command for Sphinx build.
>   docs: Toctree for systems.rst as in jhertel docs.
>   docs: Remove html files.
>   docs: Fix Sphinx compile errors.
>   docs: Edits to fix toctrees.
>   docs: Major manual edits to environment vars.
>   docs: Human edits to the website code for clarity.
>   docs: Remove unneeded mesa css file.
>
>  .gitlab-ci.yml   |   11 +
>  docs/application-issues.html |   83 --
>  docs/application-issues.rst  |   48 +
>  docs/autoconf.html   |  257 
>  docs/autoconf.rst|  209 +++
>  docs/bugs.html   |   64 -
>  docs/bugs.rst|   33 +
>  docs/codingstyle.html|  142 --
>  docs/codingstyle.rst |  124 ++
>  docs/conf.py |  162 +++
>  docs/conform.html|  703 --
>  docs/conform.rst |  675 ++
>  docs/contents.html   |  108 --
>  docs/debugging.html  |   47 -
>  docs/debugging.rst   |   21 +
>  docs/developers.html |   58 -
>  docs/developers.rst  |   25 +
>  docs/devinfo.html|   83 --
>  docs/devinfo.rst |   43 +
>  docs/dispatch.html   |  278 
>  docs/dispatch.rst|  257 
>  docs/download.html   |  112 --
>  docs/download.rst|   73 ++
>  docs/egl.html|  259 
>  docs/egl.rst |  117 ++
>  docs/envvars.html|  383 --
>  docs/envvars.rst |  615 +
>  docs/extensions.html |   51 -
>  docs/extensions.rst  |   31 +
>  docs/faq.html|  392 --
>  docs/faq.rst |  308 +
>  docs/helpwanted.html |   88 --
>  docs/helpwanted.rst  |   46 +
>  docs/index.html  | 2380 -
>  docs/index.rst   | 2438 ++
>  docs/install.html|  252 
>  docs/install.rst |  193 +++
>  docs/intro.html  |  404 -

[Mesa-dev] [PATCH 16/16] docs: Remove unneeded mesa css file.

2018-05-24 Thread Laura Ekstrand
Goodbye old css file.  You belong in 1999 from whence you came.
---
 docs/mesa.css | 63 ---
 1 file changed, 63 deletions(-)
 delete mode 100644 docs/mesa.css

diff --git a/docs/mesa.css b/docs/mesa.css
deleted file mode 100644
index 7ab8152b04..00
--- a/docs/mesa.css
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Mesa CSS */
-body {
-   background-color: #ff;
-   font: 14px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
-   color: black;
-   link: #88;
-}
-
-h1 {
-   font: 24px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
-   font-weight: bold;
-   color: black;
-}
-
-h2 {
-   font: 18px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif, bold;
-   font-weight: bold;
-   color: black;
-}
-
-code {
-   font-family: monospace;
-   font-size: 10pt;
-   color: black;
-}
-
-
-pre {
-   /*font-family: monospace;*/
-   font-size: 10pt;
-   /*color: black;*/
-}
-
-iframe {
-  width: 19em;
-  height: 80em;
-  border: none;
-  float: left;
-}
-
-.content {
-  position: absolute;
-  left: 20em;
-  right: 10px;
-  overflow: hidden
-}
-
-.header {
-  background: black url('gears.png') 15px no-repeat;
-  margin:0;
-  padding: 5px;
-  clear:both;
-}
-
-.header h1 {
-  background: url('gears.png') right no-repeat;
-  color: white;
-  font: x-large sans-serif;
-  text-align: center;
-  height: 50px;
-  margin: 0;
-  padding-top: 30px;
-}
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 12/16] docs: Fix Sphinx compile errors.

2018-05-24 Thread Laura Ekstrand
This just involves some quick fixes to formatting of the affected pages.
---
 docs/autoconf.rst|  1 +
 docs/conf.py |  2 +-
 docs/dispatch.rst| 72 ++--
 docs/egl.rst |  2 ++
 docs/releasing.rst   | 14 +-
 docs/relnotes.rst| 72 +++-
 docs/relnotes/17.0.5.rst |  2 +-
 docs/relnotes/9.2.2.rst  |  1 -
 8 files changed, 86 insertions(+), 80 deletions(-)

diff --git a/docs/autoconf.rst b/docs/autoconf.rst
index 007252feb0..25ba71cf66 100644
--- a/docs/autoconf.rst
+++ b/docs/autoconf.rst
@@ -102,6 +102,7 @@ There are also a few general options for altering the Mesa 
build:
 This option ensures that assembly will not be used.
 
 ``--build=``
+.. See host
 ``--host=``
 By default, the build will compile code for the architecture that
 it's running on. In order to build cross-compile Mesa on a x86-64
diff --git a/docs/conf.py b/docs/conf.py
index dcdbdd51db..33bf717a87 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -99,7 +99,7 @@ html_theme = 'sphinx_rtd_theme'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = []
 
 
 # -- Options for HTMLHelp output --
diff --git a/docs/dispatch.rst b/docs/dispatch.rst
index d6f8542c68..aba7192c31 100644
--- a/docs/dispatch.rst
+++ b/docs/dispatch.rst
@@ -62,18 +62,17 @@ conceptually simple:
 This can be implemented in just a few lines of C code. The file
 ``src/mesa/glapi/glapitemp.h`` contains code very similar to this.
 
-
+--+
-| ::   
|
-|  
|
-| void glVertex3f(GLfloat x, GLfloat y, GLfloat z) 
|
-| {
|
-| const struct _glapi_table * const dispatch = GET_DISPATCH(); 
|
-|  
|
-| (*dispatch->Vertex3f)(x, y, z);  
|
-| }
|
-
+--+
-| Sample dispatch function 
|
-
+--+
+Sample dispatch function
+
+
+.. code-block:: c
+
+ void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
+ {
+ const struct _glapi_table * const dispatch = GET_DISPATCH();
+
+ (*dispatch->Vertex3f)(x, y, z);
+ }
 
 The problem with this simple implementation is the large amount of
 overhead that it adds to every GL function call.
@@ -118,16 +117,14 @@ resulting implementation of ``GET_DISPATCH`` is slightly 
more complex,
 but it avoids the expensive ``pthread_getspecific`` call in the common
 case.
 
-
+--+
-| ::   
|
-|  
|
-| #define GET_DISPATCH() \ 
|
-| (_glapi_Dispatch != NULL) \  
|
-| ? _glapi_Dispatch : pthread_getspecific(&_glapi_Dispatch_key 
|
-| )
|
-
+--+
-| Improved ``GET_DISPATCH`` Implementation 
|
-
+--+
+Improved ``GET_DISPATCH`` Implementation
+
+.. code-block:: c
+
+#define GET_DISPATCH() \
+(_glapi_Dispatch != NULL) \
+? _glapi_Dispatch : pthread_getspecific(&_glapi_Dispatch_key)
+
 
 3.2. ELF TLS
 
@@ -145,16 +142,14 @@ with direct rendering drivers that use either interface. 
Once the
 pointer is properly declared, ``GET_DISPACH`` becomes a simple variable
 reference.
 
-
+--+
-| ::   
|
-|  
|
-| extern __thread struct _glapi_table *_glapi_tls_Dispatch 
|
-| __a

[Mesa-dev] [PATCH 13/16] docs: Edits to fix toctrees.

2018-05-24 Thread Laura Ekstrand
ReStructured Text toctrees are used to automatically generate the
sidebar.  But all top-level headings get added to it by default.  In
order to workaround this, you must create one and only one
top-level heading for each page.
---
 docs/download.rst  |  2 +-
 docs/faq.rst   |  2 +-
 docs/index.rst | 42 +-
 docs/install.rst   |  9 -
 docs/intro.rst |  2 +-
 docs/license.rst   |  3 +++
 docs/lists.rst |  2 +-
 docs/llvmpipe.rst  |  3 +++
 docs/osmesa.rst|  2 +-
 docs/releasing.rst |  2 +-
 docs/systems.rst   |  7 +--
 11 files changed, 46 insertions(+), 30 deletions(-)

diff --git a/docs/download.rst b/docs/download.rst
index 6317269342..a71f3b5cac 100644
--- a/docs/download.rst
+++ b/docs/download.rst
@@ -1,5 +1,5 @@
 Downloading
-===
+'''
 
 Primary Mesa download site:
 `ftp.freedesktop.org `__ (FTP) or
diff --git a/docs/faq.rst b/docs/faq.rst
index 46c349fc4c..543ef548b6 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -1,5 +1,5 @@
 Mesa Frequently Asked Questions
-===
+'''
 
 Last updated: 9 October 2012
 
diff --git a/docs/index.rst b/docs/index.rst
index f2ab63fb63..08553e8562 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -3,14 +3,15 @@
:caption: Documentation
:hidden:
 
-   intro
+   Introduction 
+   self
developers
systems
license
-   faq
+   FAQ 
relnotes
thanks
-   conformance
+   Conformance 
 
 .. toctree::
:maxdepth: 1
@@ -19,7 +20,6 @@
 
download
install
-   autoconf
precompiled
 
 .. toctree::
@@ -30,23 +30,7 @@
lists
bugs
webmaster
-   useful-links
-
-.. toctree::
-   :maxdepth: 1
-   :caption: Developer Topics
-   :hidden:
-
-   repository
-   sourcetree
-   utilities
-   helpwanted
-   devinfo
-   codingstyle
-   submittingpatches
-   releasing
-   sourcedocs
-   dispatch
+   Mesa/DRI Wiki 
 
 .. toctree::
:maxdepth: 1
@@ -68,6 +52,22 @@
application-issues
viewperf
 
+.. toctree::
+   :maxdepth: 1
+   :caption: Developer Topics
+   :hidden:
+
+   repository
+   sourcetree
+   utilities
+   helpwanted
+   devinfo
+   codingstyle
+   submittingpatches
+   releasing
+   sourcedocs
+   dispatch
+
 
 .. toctree::
:maxdepth: 1
diff --git a/docs/install.rst b/docs/install.rst
index 8f5920091c..177e393d56 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -1,5 +1,12 @@
 Compiling and Installing
-
+
+
+.. toctree::
+   :maxdepth: 1
+   :hidden:
+
+   Autoconf 
+   Meson 
 
 #. `Prerequisites for building <#prereq-general>`__
 
diff --git a/docs/intro.rst b/docs/intro.rst
index 11be79643a..a85a257fc8 100644
--- a/docs/intro.rst
+++ b/docs/intro.rst
@@ -1,5 +1,5 @@
 Introduction
-
+
 
 The Mesa project began as an open-source implementation of the
 `OpenGL `__ specification - a system for
diff --git a/docs/license.rst b/docs/license.rst
index e6ffb06623..40387f4dc2 100644
--- a/docs/license.rst
+++ b/docs/license.rst
@@ -1,3 +1,6 @@
+License & Copyright
+'''
+
 Disclaimer
 ==
 
diff --git a/docs/lists.rst b/docs/lists.rst
index da71722cfb..2984b7fcc3 100644
--- a/docs/lists.rst
+++ b/docs/lists.rst
@@ -1,5 +1,5 @@
 Mailing Lists
-=
+'
 
 There are four Mesa 3D / DRI mailing lists:
 
diff --git a/docs/llvmpipe.rst b/docs/llvmpipe.rst
index b232b8a18f..e88bf3d6a7 100644
--- a/docs/llvmpipe.rst
+++ b/docs/llvmpipe.rst
@@ -1,3 +1,6 @@
+Gallium LLVMPipe Driver
+'''
+
 Introduction
 
 
diff --git a/docs/osmesa.rst b/docs/osmesa.rst
index 570f119b3a..3317b5ed4e 100644
--- a/docs/osmesa.rst
+++ b/docs/osmesa.rst
@@ -1,5 +1,5 @@
 Off-screen Rendering
-
+
 
 Mesa's off-screen interface is used for rendering into user-allocated
 memory without any sort of window system or operating system
diff --git a/docs/releasing.rst b/docs/releasing.rst
index dff272bd30..aa3dec0e8f 100644
--- a/docs/releasing.rst
+++ b/docs/releasing.rst
@@ -1,5 +1,5 @@
 Releasing process
-=
+'
 
 -  `Overview <#overview>`__
 -  `Release schedule <#schedule>`__
diff --git a/docs/systems.rst b/docs/systems.rst
index b05aff0621..d299086f85 100644
--- a/docs/systems.rst
+++ b/docs/systems.rst
@@ -1,5 +1,5 @@
-Supported Systems and Drivers
-=
+Platforms & Drivers
+'''
 
 Mesa is primarily developed and used on Linux systems. But there's also
 support for Windows, other flavors of Unix and other systems such as
@@ -9,6 +9,9 @@ software drivers.
 The primary API is OpenGL but there's also support for OpenGL ES 1, ES2
 and ES 3, OpenVG, OpenCL, VDPAU, XvMC and the EGL interface.
 
+Supported Systems and Drivers
+=
+
 Hardware drivers include:
 

[Mesa-dev] [PATCH 14/16] docs: Major manual edits to environment vars.

2018-05-24 Thread Laura Ekstrand
This is a huge page.  The edits I've done here take full advantage of
reStructured text and Sphinx's awesome built-in style for explaining
commands and variables.  Enjoy!
---
 docs/envvars.rst | 604 ++-
 1 file changed, 425 insertions(+), 179 deletions(-)

diff --git a/docs/envvars.rst b/docs/envvars.rst
index a9db746e79..a1427552e7 100644
--- a/docs/envvars.rst
+++ b/docs/envvars.rst
@@ -8,78 +8,122 @@ but they can sometimes be useful for debugging end-user 
issues.
 LibGL environment variables
 ---
 
--  LIBGL\_DEBUG - If defined debug information will be printed to
-   stderr. If set to 'verbose' additional information will be printed.
--  LIBGL\_DRIVERS\_PATH - colon-separated list of paths to search for
+``LIBGL_DEBUG``
+   If defined debug information will be printed to
+   stderr. If set to ``verbose`` additional information will be printed.
+
+``LIBGL_DRIVERS_PATH``
+   colon-separated list of paths to search for
DRI drivers
--  LIBGL\_ALWAYS\_INDIRECT - if set to \`true\`, forces an indirect
+
+``LIBGL_ALWAYS_INDIRECT``
+   if set to ``true``, forces an indirect
rendering context/connection.
--  LIBGL\_ALWAYS\_SOFTWARE - if set to \`true\`, always use software
+
+``LIBGL_ALWAYS_SOFTWARE``
+   if set to ``true``, always use software
rendering
--  LIBGL\_NO\_DRAWARRAYS - if set to \`true\`, do not use DrawArrays GLX
+
+``LIBGL_NO_DRAWARRAYS``
+   if set to ``true``, do not use DrawArrays GLX
protocol (for debugging)
--  LIBGL\_SHOW\_FPS - print framerate to stdout based on the number of
-   glXSwapBuffers calls per second.
--  LIBGL\_DRI3\_DISABLE - disable DRI3 if set to \`true\`.
+
+``LIBGL_SHOW_FPS``
+   print framerate to stdout based on the number of
+   ``glXSwapBuffers`` calls per second.
+
+``LIBGL_DRI3_DISABLE``
+   disable DRI3 if set to ``true``.
 
 Core Mesa environment variables
 ---
 
--  MESA\_NO\_ASM - if set, disables all assembly language optimizations
--  MESA\_NO\_MMX - if set, disables Intel MMX optimizations
--  MESA\_NO\_3DNOW - if set, disables AMD 3DNow! optimizations
--  MESA\_NO\_SSE - if set, disables Intel SSE optimizations
--  MESA\_NO\_ERROR - if set to 1, error checking is disabled as per
-   KHR\_no\_error. This will result in undefined behaviour for invalid
+``MESA_NO_ASM``
+   if set, disables all assembly language optimizations
+
+``MESA_NO_MMX``
+   if set, disables Intel MMX optimizations
+
+``MESA_NO_3DNOW``
+   if set, disables AMD 3DNow! optimizations
+
+``MESA_NO_SSE``
+   if set, disables Intel SSE optimizations
+
+``MESA_NO_ERROR``
+   if set to 1, error checking is disabled as per
+   ``KHR_no_error``. This will result in undefined behaviour for invalid
use of the api, but can reduce CPU use for apps that are known to be
error free.
--  MESA\_DEBUG - if set, error messages are printed to stderr. For
-   example, if the application generates a GL\_INVALID\_ENUM error, a
+
+``MESA_DEBUG``
+   if set, error messages are printed to stderr. For
+   example, if the application generates a ``GL_INVALID_ENUM`` error, a
corresponding error message indicating where the error occurred, and
possibly why, will be printed to stderr.
-   For release builds, MESA\_DEBUG defaults to off (no debug output).
-   MESA\_DEBUG accepts the following comma-separated list of named
-   flags, which adds extra behaviour to just set MESA\_DEBUG=1:
+   For release builds, ``MESA_DEBUG`` defaults to off (no debug output).
+   ``MESA_DEBUG`` accepts the following comma-separated list of named
+   flags, which adds extra behaviour to just set ``MESA_DEBUG=1``:
+
+   ``silent``
+  turn off debug messages. Only useful for debug builds.
 
-   -  silent - turn off debug messages. Only useful for debug builds.
-   -  flush - flush after each drawing command
-   -  incomplete\_tex - extra debug messages when a texture is
+   ``flush``
+  flush after each drawing command
+
+   ``incomplete_tex``
+  extra debug messages when a texture is
   incomplete
-   -  incomplete\_fbo - extra debug messages when a fbo is incomplete
-   -  context - create a debug context (see
-  GLX\_CONTEXT\_DEBUG\_BIT\_ARB) and print error and performance
-  messages to stderr (or MESA\_LOG\_FILE).
 
--  MESA\_LOG\_FILE - specifies a file name for logging all errors,
+   ``incomplete_fbo``
+  extra debug messages when a fbo is incomplete
+
+   ``context``
+  create a debug context (see
+  ``GLX_CONTEXT_DEBUG_BIT_ARB``) and print error and performance
+  messages to stderr (or ``MESA_LOG_FILE``).
+
+``MESA_LOG_FILE``
+   specifies a file name for logging all errors,
warnings, etc., rather than stderr
--  MESA\_TEX\_PROG - if set, implement conventional texture env modes
+
+``MESA_TEX_PROG``
+   if set, implement conventional texture env modes
with fragment programs (intended for developers only)
--  MESA\_TNL\_PROG - if set, implement conven

[Mesa-dev] [PATCH 08/16] docs: Add a navigation sidebar.

2018-05-24 Thread Laura Ekstrand
From: Jean Hertel 

This is the new main sidebar.
---
 docs/index.rst | 90 ++
 1 file changed, 90 insertions(+)

diff --git a/docs/index.rst b/docs/index.rst
index e11b1e4ecc..f2ab63fb63 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,3 +1,93 @@
+.. toctree::
+   :maxdepth: 1
+   :caption: Documentation
+   :hidden:
+
+   intro
+   developers
+   systems
+   license
+   faq
+   relnotes
+   thanks
+   conformance
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Download / Install
+   :hidden:
+
+   download
+   install
+   autoconf
+   precompiled
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Resources
+   :hidden:
+
+   lists
+   bugs
+   webmaster
+   useful-links
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Developer Topics
+   :hidden:
+
+   repository
+   sourcetree
+   utilities
+   helpwanted
+   devinfo
+   codingstyle
+   submittingpatches
+   releasing
+   sourcedocs
+   dispatch
+
+.. toctree::
+   :maxdepth: 1
+   :caption: User Topics
+   :hidden:
+
+   shading
+   egl
+   opengles
+   envvars
+   osmesa
+   debugging
+   perf
+   extensions
+   mangling
+   llvmpipe
+   vmware-guest
+   postprocess
+   application-issues
+   viewperf
+
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Links
+   :hidden:
+
+   Gallium Documentation 
+   NIR Documentation 
+   OpenGL website 
+   DRI website 
+   Developer blogs 
+
+
+.. toctree::
+   :maxdepth: 1
+   :caption: Hosted by
+   :hidden:
+
+   freedesktop 
+
 News
 
 
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 10/16] docs: Toctree for systems.rst as in jhertel docs.

2018-05-24 Thread Laura Ekstrand
Toctree directives create automatically generated navigation sidebars.
This is the new deprecated systems sidebar.
---
 docs/systems.rst | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/docs/systems.rst b/docs/systems.rst
index 707abeeed9..b05aff0621 100644
--- a/docs/systems.rst
+++ b/docs/systems.rst
@@ -52,3 +52,9 @@ the git repo. The list includes:
 -  DOS
 -  fbdev
 -  DEC/VMS
+
+.. toctree::
+   :maxdepth:  1
+   :hidden:
+
+   xlibdriver
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 02/16] docs: Add python script that converts html to rst.

2018-05-24 Thread Laura Ekstrand
Use Beautiful Soup to fix bad html, then use pandoc for converting to
rst.
---
 docs/rstConverter.py | 23 +++
 1 file changed, 23 insertions(+)
 create mode 100755 docs/rstConverter.py

diff --git a/docs/rstConverter.py b/docs/rstConverter.py
new file mode 100755
index 00..5321fdde8b
--- /dev/null
+++ b/docs/rstConverter.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python3
+import glob
+import subprocess
+from bs4 import BeautifulSoup
+
+pages = glob.glob("*.html")
+pages += glob.glob("relnotes/*.html")
+for filename in pages:
+# Fix some annoyingly bad html.
+with open(filename) as f:
+soup = BeautifulSoup(f, 'html5lib')
+soup.find("div", "header").extract() # Get rid of old header
+soup.iframe.extract() # Get rid of old contents bar.
+soup.find("div", "content").unwrap() # Strip the content div.
+
+# Write out the better html.
+with open(filename, 'wt') as f:
+f.write(str(soup))
+
+# Convert to rst with pandoc.
+name = filename.split(".html")[0]
+bashCmd = "pandoc " + filename + " -o " + name + ".rst"
+subprocess.run(bashCmd.split())
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 07/16] docs: Add command for Sphinx build.

2018-05-24 Thread Laura Ekstrand
This does two things.  1. It pulls a Docker image which is a Linux
system with Sphinx and the Read the Docs Sphinx theme already installed.
2. It uses sphinx-build to build html from our rst pages.
---
 .gitlab-ci.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 29b30541b5..8eb03c58e6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,10 @@
+image: suttang/sphinx-rtd-theme
+
 pages:
stage: deploy
script:
- mkdir .public
-   - cp -r docs/* .public
+   - sphinx-build -b html -j 4 docs .public
- mv .public public
artifacts:
  paths:
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 06/16] docs: Add Sphinx configuration file.

2018-05-24 Thread Laura Ekstrand
From: Jean Hertel 

This tells Sphinx how to build our website from reStructured Text.

Signed-off-by: Jean Hertel 
---
 docs/conf.py | 162 +++
 1 file changed, 162 insertions(+)
 create mode 100644 docs/conf.py

diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 00..dcdbdd51db
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,162 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import sphinx_rtd_theme
+
+#
+# The Mesa 3D Graphics Library documentation build configuration file, created 
by
+# sphinx-quickstart on Wed Mar 29 14:08:51 2017.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- General configuration 
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'The Mesa 3D Graphics Library'
+copyright = '2017, Brian Paul'
+author = 'Brian Paul'
+
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = 'latest'
+# The full version, including alpha/beta/rc tags.
+release = 'latest'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This patterns also effect to html_static_path and html_extra_path
+exclude_patterns = []
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output --
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#
+# html_theme_options = {}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+
+# -- Options for HTMLHelp output --
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'TheMesa3DGraphicsLibrarydoc'
+
+
+# -- Options for LaTeX output -
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#
+# 'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#
+# 'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#
+# 'preamble': '',
+
+# Latex figure (float) alignment
+#
+# 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+(master_doc, 'TheMesa3DGraphicsLibrary.tex', 'The Mesa 3D Graphics Library 
Documentation',
+ 'Brian Paul', 'manual'),
+]
+
+
+# -- Options for manual page output ---
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+(master_doc, 'themesa3dgraphicslibra

[Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-05-24 Thread Laura Ekstrand
It's time to move the Mesa-3d.org website into the 21st century. We have
chosen to move to Sphinx and resStructured text for a number of reasons:
  1. Syntax highlighting for code snippets.
  2. Snazzy highlighting for variables and function names.
  3. Consistency with the Gallium drivers, which host their documentation on
 ReadTheDocs.
  4. Ultimately less work for us, because writing content in reStructured Text
 is simpler and Sphinx turns it into beautiful, readable pages without us
 having to manually fix problems in html and css.
  5. With Gitlab, the Sphinx website is auto-generated every time the Mesa
 code repository is pushed to Gitlab without us having to
 build and deploy it.

The new website is currently hosted at mesa-test.freedesktop.org.  When these
patches are merged, Daniel Stone will point our Gitlab CI system at
mesa-3d.org.

When reviewing these patches, please note:
1. This patch series does *not* touch content.  Please do not bikeshed
   the content of webpages here.  That will be addressed in later
   commits.
2. Please do *not* bikeshed website style here.  We are using the
   classic ReadTheDocs style for now and we will update style in a
   future commit.
3. I've done my best to make your current content look beautiful.  If
   there's a problem, please let me know.
4. There were some commits to the website between when I started this
   series and now. I've done my best to incorporate your changes.
   So if you changed your content in the past two weeks, take a look
   at your page.

I hope you'll agree that the resulting pages are much cleaner and easier to
read.  I've learned a lot by reading these pages.

Thanks.

Laura Ekstrand
---

Jean Hertel (3):
  docs: Add Sphinx configuration file.
  docs: Add a navigation sidebar.
  docs: Add toctree to relnotes

Laura Ekstrand (13):
  Added ci yaml file for Gitlab.
  docs: Add python script that converts html to rst.
  docs: Remove contents.html
  docs: Result of script fixing html with Beautiful Soup.
  docs: Add results of script - pandoc-generated rst pages.
  docs: Add command for Sphinx build.
  docs: Toctree for systems.rst as in jhertel docs.
  docs: Remove html files.
  docs: Fix Sphinx compile errors.
  docs: Edits to fix toctrees.
  docs: Major manual edits to environment vars.
  docs: Human edits to the website code for clarity.
  docs: Remove unneeded mesa css file.

 .gitlab-ci.yml   |   11 +
 docs/application-issues.html |   83 --
 docs/application-issues.rst  |   48 +
 docs/autoconf.html   |  257 
 docs/autoconf.rst|  209 +++
 docs/bugs.html   |   64 -
 docs/bugs.rst|   33 +
 docs/codingstyle.html|  142 --
 docs/codingstyle.rst |  124 ++
 docs/conf.py |  162 +++
 docs/conform.html|  703 --
 docs/conform.rst |  675 ++
 docs/contents.html   |  108 --
 docs/debugging.html  |   47 -
 docs/debugging.rst   |   21 +
 docs/developers.html |   58 -
 docs/developers.rst  |   25 +
 docs/devinfo.html|   83 --
 docs/devinfo.rst |   43 +
 docs/dispatch.html   |  278 
 docs/dispatch.rst|  257 
 docs/download.html   |  112 --
 docs/download.rst|   73 ++
 docs/egl.html|  259 
 docs/egl.rst |  117 ++
 docs/envvars.html|  383 --
 docs/envvars.rst |  615 +
 docs/extensions.html |   51 -
 docs/extensions.rst  |   31 +
 docs/faq.html|  392 --
 docs/faq.rst |  308 +
 docs/helpwanted.html |   88 --
 docs/helpwanted.rst  |   46 +
 docs/index.html  | 2380 -
 docs/index.rst   | 2438 ++
 docs/install.html|  252 
 docs/install.rst |  193 +++
 docs/intro.html  |  404 --
 docs/intro.rst   |  308 +
 docs/license.html|  121 --
 docs/license.rst |   89 ++
 docs/lists.html  |   97 --
 docs/lists.rst   |   62 +
 docs/llvmpipe.html   |  330 -
 docs/llvmpipe.rst|  277 
 docs/mangling.html   |   37 -
 docs/mangling.rst|   14 +
 docs/mesa.css|   63 -
 docs/meson.html  |  179 ---
 docs/meson.rst   |  129 ++
 docs/opengles.html   |   70 -
 docs/opengles.rst|   54 +
 docs/osmesa.html |   81 --
 docs/osmesa.rst  |   45 +
 docs/perf.html   |   76 --
 docs/perf.rst|   75 ++
 docs/postprocess.html|   64 -
 docs/postprocess.rst |   34 +
 docs/precompi

[Mesa-dev] [PATCH 09/16] docs: Add toctree to relnotes

2018-05-24 Thread Laura Ekstrand
From: Jean Hertel 

Toctree directives create automatically generated navigation sidebars.
This is the new relnotes sidebar.
---
 docs/relnotes.rst | 197 ++
 1 file changed, 197 insertions(+)

diff --git a/docs/relnotes.rst b/docs/relnotes.rst
index 3cb96bb6a4..aecec6ae3d 100644
--- a/docs/relnotes.rst
+++ b/docs/relnotes.rst
@@ -231,3 +231,200 @@ file `__ and the following release notes.
 -  `3.2.1 release notes `__
 -  `3.2 release notes `__
 -  `3.1 release notes `__
+
+.. toctree::
+   :maxdepth: 1
+
+   relnotes/17.0.4
+   relnotes/17.0.3
+   relnotes/17.0.2
+   relnotes/13.0.6
+   relnotes/17.0.1
+   relnotes/13.0.5
+   relnotes/17.0.0
+   relnotes/13.0.4
+   relnotes/12.0.6
+   relnotes/13.0.3
+   relnotes/12.0.5
+   relnotes/13.0.2
+   relnotes/13.0.1
+   relnotes/12.0.4
+   relnotes/13.0.0
+   relnotes/12.0.3
+   relnotes/12.0.2
+   relnotes/12.0.1
+   relnotes/12.0.0
+   relnotes/11.2.2
+   relnotes/11.1.4
+   relnotes/11.2.1
+   relnotes/11.1.3
+   relnotes/11.2.0
+   relnotes/11.1.2
+   relnotes/11.0.9
+   relnotes/11.1.1
+   relnotes/11.0.8
+   relnotes/11.1.0
+   relnotes/11.0.7
+   relnotes/11.0.6
+   relnotes/11.0.5
+   relnotes/11.0.4
+   relnotes/11.0.3
+   relnotes/10.6.9
+   relnotes/11.0.2
+   relnotes/11.0.1
+   relnotes/10.6.8
+   relnotes/11.0.0
+   relnotes/10.6.7
+   relnotes/10.6.6
+   relnotes/10.6.5
+   relnotes/10.6.4
+   relnotes/10.6.3
+   relnotes/10.6.2
+   relnotes/10.5.9
+   relnotes/10.6.1
+   relnotes/10.5.8
+   relnotes/10.6.0
+   relnotes/10.5.7
+   relnotes/10.5.6
+   relnotes/10.5.5
+   relnotes/10.5.4
+   relnotes/10.5.3
+   relnotes/10.5.2
+   relnotes/10.4.7
+   relnotes/10.5.1
+   relnotes/10.5.0
+   relnotes/10.4.6
+   relnotes/10.4.5
+   relnotes/10.4.4
+   relnotes/10.4.3
+   relnotes/10.4.2
+   relnotes/10.3.7
+   relnotes/10.4.1
+   relnotes/10.3.6
+   relnotes/10.4
+   relnotes/10.3.5
+   relnotes/10.3.4
+   relnotes/10.3.3
+   relnotes/10.3.2
+   relnotes/10.3.1
+   relnotes/10.2.9
+   relnotes/10.3
+   relnotes/10.2.8
+   relnotes/10.2.7
+   relnotes/10.2.6
+   relnotes/10.2.5
+   relnotes/10.2.4
+   relnotes/10.2.3
+   relnotes/10.2.2
+   relnotes/10.2.1
+   relnotes/10.2
+   relnotes/10.1.6
+   relnotes/10.1.5
+   relnotes/10.1.4
+   relnotes/10.1.3
+   relnotes/10.1.2
+   relnotes/10.1.1
+   relnotes/10.1
+   relnotes/10.0.5
+   relnotes/10.0.4
+   relnotes/10.0.3
+   relnotes/10.0.2
+   relnotes/10.0.1
+   relnotes/10.0
+   relnotes/9.2.5
+   relnotes/9.2.4
+   relnotes/9.2.3
+   relnotes/9.2.2
+   relnotes/9.2.1
+   relnotes/9.2
+   relnotes/9.1.7
+   relnotes/9.1.6
+   relnotes/9.1.5
+   relnotes/9.1.4
+   relnotes/9.1.3
+   relnotes/9.1.2
+   relnotes/9.1.1
+   relnotes/9.1
+   relnotes/9.0.3
+   relnotes/9.0.2
+   relnotes/9.0.1
+   relnotes/9.0
+   relnotes/8.0.5
+   relnotes/8.0.4
+   relnotes/8.0.3
+   relnotes/8.0.2
+   relnotes/8.0.1
+   relnotes/8.0
+   relnotes/7.11.2
+   relnotes/7.11.1
+   relnotes/7.11
+   relnotes/7.10.3
+   relnotes/7.10.2
+   relnotes/7.10.1
+   relnotes/7.10
+   relnotes/7.9.2
+   relnotes/7.9.1
+   relnotes/7.9
+   relnotes/7.8.3
+   relnotes/7.8.2
+   relnotes/7.8.1
+   relnotes/7.8
+   relnotes/7.7.1
+   relnotes/7.7
+   relnotes/7.6.1
+   relnotes/7.6
+   relnotes/7.5.2
+   relnotes/7.5.1
+   relnotes/7.5
+   relnotes/7.4.4
+   relnotes/7.4.3
+   relnotes/7.4.2
+   relnotes/7.4.1
+   relnotes/7.4
+   relnotes/7.3
+   relnotes/7.2
+   relnotes/7.1
+   relnotes/7.0.4
+   relnotes/7.0.3
+   relnotes/7.0.2
+   relnotes/7.0.1
+   relnotes/7.0
+   relnotes/6.5.3
+   relnotes/6.5.2
+   relnotes/6.5.1
+   relnotes/6.5
+   relnotes/6.4.2
+   relnotes/6.4.1
+   relnotes/6.4
+
+Versions of Mesa prior to 6.4 are summarized in the versions file and the 
following release notes.
+
+.. toctree::
+   :maxdepth: 1
+
+   versions
+   relnotes/6.3.2
+   relnotes/6.3.1
+   relnotes/6.3
+   relnotes/6.2.1
+   relnotes/6.2
+   relnotes/6.1
+   relnotes/6.0.1
+   relnotes/6.0
+   relnotes/5.1
+   relnotes/5.0.2
+   relnotes/5.0.1
+   relnotes/5.0
+   relnotes/4.1
+   relnotes/4.0.3
+   relnotes/4.0.2
+   relnotes/4.0.1
+   relnotes/4.0
+   relnotes/3.5
+   relnotes/3.4.2
+   relnotes/3.4.1
+   relnotes/3.4
+   relnotes/3.3
+   relnotes/3.2.1
+   relnotes/3.2
+   relnotes/3.1
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 03/16] docs: Remove contents.html

2018-05-24 Thread Laura Ekstrand
The old navigation bar, may it rest in peace, causes major problems when
running the rstConverter.py script.  It's also unneeded.
Let's get rid of it now.
---
 docs/contents.html | 108 -
 1 file changed, 108 deletions(-)
 delete mode 100644 docs/contents.html

diff --git a/docs/contents.html b/docs/contents.html
deleted file mode 100644
index 9a86019e2f..00
--- a/docs/contents.html
+++ /dev/null
@@ -1,108 +0,0 @@
-http://www.w3.org/TR/html4/loose.dtd";>
-
-
-  
-  Contents
-  
-
-  
-  
-
-  
-
-
-
-Documentation
-
-Introduction
-News
-Developers
-Platforms and Drivers
-License & Copyright
-FAQ
-Release Notes
-Acknowledgements
-Conformance Testing
-more docs below...
-
-
-Download / Install
-
-Downloading / Unpacking
-Compiling / Installing
-  
-Autoconf
-Meson
-  
-
-Precompiled Libraries
-
-
-Resources
-
-Mailing Lists
-Bug Database
-Webmaster
-https://dri.freedesktop.org/"; target="_parent">Mesa/DRI Wiki
-
-
-User Topics
-
-Shading Language
-EGL
-OpenGL ES
-Environment Variables
-Off-Screen Rendering
-Debugging Tips
-Performance Tips
-Mesa Extensions
-GL Function Name Mangling
-Gallium llvmpipe driver
-VMware SVGA3D guest driver
-Gallium post-processing
-Application Issues
-Viewperf Issues
-
-
-Developer Topics
-
-Source Code Repository
-Source Code Tree
-Utilities
-Help Wanted
-Development Notes
-Coding Style
-Submitting patches
-Releasing process
-Release calendar
-Source Documentation
-GL Dispatch
-
-
-Links
-
-https://www.opengl.org"; target="_parent">OpenGL website
-https://dri.freedesktop.org"; target="_parent">DRI website
-https://www.freedesktop.org"; target="_parent">freedesktop.org
-https://planet.freedesktop.org"; target="_parent">Developer 
blogs
-
-
-Hosted by:
-
-
-https://freedesktop.org"; target="_parent">freedesktop.org
-
-
-
-
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 01/16] Added ci yaml file for Gitlab.

2018-05-24 Thread Laura Ekstrand
For now, all this does is copy our current webpage into a public folder.
Daniel Stone has the server configured to check this public folder and
host the index.html as mesa-test.freedesktop.org. When this patch series
is approved, Daniel will change it to point at mesa-3d.org.
---
 .gitlab-ci.yml | 9 +
 1 file changed, 9 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00..29b30541b5
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,9 @@
+pages:
+   stage: deploy
+   script:
+   - mkdir .public
+   - cp -r docs/* .public
+   - mv .public public
+   artifacts:
+ paths:
+ - public
-- 
2.14.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] docs: Intel Mesa Drivers infographic

2018-05-16 Thread Laura Ekstrand
https://drive.google.com/file/d/1D0k3-p88xEame5gepJQfIcCyZhG4CAsW/view?usp=sharing

On Mon, May 14, 2018 at 5:44 PM, Jason Ekstrand 
wrote:

> One more comment: NIR is *not* a stable API.
>
> On Mon, May 14, 2018 at 2:10 PM, Laura Ekstrand 
> wrote:
>
>> I've made the edits.  https://drive.google.com/file/
>> d/1D0k3-p88xEame5gepJQfIcCyZhG4CAsW/view?usp=sharing
>>
>> Thanks.
>>
>> Laura
>>
>> On Fri, May 11, 2018 at 5:07 PM, Jason Ekstrand 
>> wrote:
>>
>>> Couple of edits:
>>>
>>> i915:  I'd leave the bit about "embedded" out.  I don't think it's used
>>> for any new deployments at this point.
>>>
>>> 1965: How about "Implements intel-specific parts of OpenGL entrypoints"
>>>
>>> ISL isn't really for converting between surface formats.  A better
>>> one-sentence description would be "A library for computing image sizes and
>>> memory layouts"
>>>
>>> BLORP: How about "blit, clear, and resolve functionality" rather than
>>> "driver functionality"
>>>
>>> NIR: Not really a "front-end" more of an "optimizing middle compiler"
>>>
>>> Looks snazzy though. :-)
>>>
>>> On Thu, May 10, 2018 at 6:19 PM, Laura Ekstrand 
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I developed the following infographic to inform readers about the
>>>> various parts that make up the Intel Mesa drivers.  It is intended to help
>>>> groups inside Intel better understand the open source community, and at the
>>>> same time, it helps train newcomers to Mesa in driver architecture.
>>>>
>>>> I haven't put this in a tree yet since it is a combination of a
>>>> LibreOffice Draw document and a binary image file.
>>>>
>>>> Thanks.
>>>>
>>>> Laura
>>>>
>>>> https://drive.google.com/file/d/1D0k3-p88xEame5gepJQfIcCyZhG
>>>> 4CAsW/view?usp=sharing
>>>>
>>>> ___
>>>> mesa-dev mailing list
>>>> mesa-dev@lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>>>
>>>>
>>>
>>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] docs: Intel Mesa Drivers infographic

2018-05-14 Thread Laura Ekstrand
I've made the edits.
https://drive.google.com/file/d/1D0k3-p88xEame5gepJQfIcCyZhG4CAsW/view?usp=sharing

Thanks.

Laura

On Fri, May 11, 2018 at 5:07 PM, Jason Ekstrand 
wrote:

> Couple of edits:
>
> i915:  I'd leave the bit about "embedded" out.  I don't think it's used
> for any new deployments at this point.
>
> 1965: How about "Implements intel-specific parts of OpenGL entrypoints"
>
> ISL isn't really for converting between surface formats.  A better
> one-sentence description would be "A library for computing image sizes and
> memory layouts"
>
> BLORP: How about "blit, clear, and resolve functionality" rather than
> "driver functionality"
>
> NIR: Not really a "front-end" more of an "optimizing middle compiler"
>
> Looks snazzy though. :-)
>
> On Thu, May 10, 2018 at 6:19 PM, Laura Ekstrand 
> wrote:
>
>> Hi All,
>>
>> I developed the following infographic to inform readers about the various
>> parts that make up the Intel Mesa drivers.  It is intended to help groups
>> inside Intel better understand the open source community, and at the same
>> time, it helps train newcomers to Mesa in driver architecture.
>>
>> I haven't put this in a tree yet since it is a combination of a
>> LibreOffice Draw document and a binary image file.
>>
>> Thanks.
>>
>> Laura
>>
>> https://drive.google.com/file/d/1D0k3-p88xEame5gepJQfIcCyZhG
>> 4CAsW/view?usp=sharing
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] docs: Intel Mesa Drivers infographic

2018-05-10 Thread Laura Ekstrand
Hi All,

I developed the following infographic to inform readers about the various
parts that make up the Intel Mesa drivers.  It is intended to help groups
inside Intel better understand the open source community, and at the same
time, it helps train newcomers to Mesa in driver architecture.

I haven't put this in a tree yet since it is a combination of a LibreOffice
Draw document and a binary image file.

Thanks.

Laura

https://drive.google.com/file/d/1D0k3-p88xEame5gepJQfIcCyZhG4CAsW/view?usp=sharing
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2018-04-05 Thread Laura Ekstrand
So I spoke with Daniel Stone today about the infrastructure.  He estimates
it will be ready to deploy the website in 2-3 weeks, at the most.  So I'd
say the infrastructure will be there when we are ready.

In the new system, our website will be running in its own container managed
by freedesktop's new Gitlab server. So what we need to do for the deploy is:

1.  Fork mesa into a repo on Gitlab.com (https://gitlab.freedesktop.org).
2.  Create a .gitlab-ci.yml file which compiles the website from the files.
(https://docs.gitlab.com/ee/ci/yaml/).

In order to get the files ready, we need to make sure that they are rebased
on top of Mesa master and reviewed.  I started rebasing here:
https://cgit.freedesktop.org/~ldeks/mesa?h=website2.  That preserves the
git history well, but if it's not a big deal to everyone else, we could
just rebase Jean's branch.  I don't think much has changed.

Thanks.

Laura

On Thu, Apr 5, 2018 at 11:18 AM, Emil Velikov 
wrote:

> On 5 April 2018 at 19:10, Laura Ekstrand  wrote:
> > Emil,
> >
> > Specifically, what infrastructure do you need?  Gallium is already
> carrying
> > Sphinx around as a dependency.
> >
> The gallium docs are hosted on readthedocs.org. And I doubt we want to
> move the main mesa3d.org website there ;-)
> Currently mesa3d.org, most graphics stuff and others are on
> freedesktop.org infrastructure.
>
> HTH
> Emil
> P.S. Can I buy you to use interleaved posting/plain text email, please?
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2018-04-05 Thread Laura Ekstrand
Emil,

Specifically, what infrastructure do you need?  Gallium is already carrying
Sphinx around as a dependency.

Laura

On Thu, Apr 5, 2018 at 11:07 AM, Emil Velikov 
wrote:

> Hi everyone,
>
> On 5 April 2018 at 01:58, Laura Ekstrand  wrote:
> > I forgot to note that you have to choose space->ignore in the diff
> options
> > on cgit in order to see the easy-to-read git diff.
> >
> I really should have made this more obvious. The key blocker isn't
> about reviewing the patches, but having the required infra to deploy
> it.
>
> Eric E, was planning to look that up, although ETIME and potential
> gitlab move got in the way.
> I'm not sure how we're doing on the latter, but I'm hoping that we
> would be soon.
>
> HTH
> Emil
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2018-04-04 Thread Laura Ekstrand
I forgot to note that you have to choose space->ignore in the diff options
on cgit in order to see the easy-to-read git diff.

On Wed, Apr 4, 2018 at 5:57 PM, Laura Ekstrand  wrote:

> Jean,
>
> The main problem is not the conversion to rst.  It's preserving the git
> history so that the patches are easily reviewable.
>
> I've started a branch here:  https://cgit.freedesktop.org/~
> ldeks/mesa?h=website2.  You see that the git diff shows me that the text
> of the website hasn't changed at all?
>
> I will probably squish the rename commits together at some point.  But the
> format changes have to be in separate patches so git recognizes that the
> text of the website hasn't really changed.
>
> Thanks.
>
> Laura
>
> On Tue, Apr 3, 2018 at 1:36 PM, Jean Hertel 
> wrote:
>
>> Hi Laura,
>>
>>
>> Aurelio Silves pointed me out that there is the possibility of using
>> pandoc for the conversion of mesa html sources to rst.
>>
>> You can take a look here: https://pandoc.org/index.html
>>
>> Depending on your distribution, probably there is a package for this.
>>
>>
>> Also, if there is anything else I can do, send me an email and I will do
>> the best I can to help.
>>
>> Kind Regards,
>>
>> Jean Hertel
>>
>>
>> --
>> *De:* Jean Hertel 
>> *Enviado:* segunda-feira, 2 de abril de 2018 21:19
>> *Para:* Laura Ekstrand
>>
>> *Cc:* Emil Velikov; Vedran Miletić; mesa-dev@lists.freedesktop.org;
>> Jason Ekstrand
>> *Assunto:* Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx
>>
>> Hi Laura,
>>
>> I haven't used any script.
>> I made all the HTML to rst translations by hand, file by file.
>>
>> Kind Regards,
>> Jean Hertel
>>
>> Em 2 de abril de 2018 19:09:34 BRT, Laura Ekstrand 
>> escreveu:
>>
>> Hi Jean,
>>
>> I'm going to play around with your patches to get them into a format that
>> Mesa devs can review.  This will blow the history away.
>>
>> The problem is that your workflow in 1 & 2 ruins the Git history for
>> reviewers.  It makes the patch series hard to read.
>>
>> Could you provide us with your script for translating HTML to rst?  Go
>> ahead and commit it to your repo as a patch.
>>
>> Thanks.
>>
>> Laura
>>
>> On Sun, Apr 1, 2018 at 6:12 AM, Jean Hertel 
>> wrote:
>>
>> Hi Laura,
>>
>>
>> The commits have the idea of being atomic, so it makes sense to have a
>> lot of them.
>>
>> Some of them are just fixes, and can be squashed.
>>
>>
>> Please keep in mind that no CSS file is supposed to live there, as we are
>> using an existing template from readTheDocs.
>>
>> The commits are doing mainly two things:
>>
>> 1 - Create a new file and translate the old HTML content into a rst
>> format.
>>
>> 2 - Delete the old file
>>
>> Kind Regards,
>>
>> Jean Hertel
>>
>> --
>> *De:* Laura Ekstrand 
>> *Enviado:* sábado, 31 de março de 2018 22:06
>> *Para:* Jean Hertel
>> *Cc:* Emil Velikov; Vedran Miletić; mesa-dev@lists.freedesktop.org;
>> Jason Ekstrand
>> *Assunto:* Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx
>>
>> Jean,
>>
>> I've taken at look at your sphinx-docs branch (
>> https://github.com/jlHertel/mesa).
>>
>> Oh my you have a lot of commits there!  It would be simpler for me to
>> review if you could squash some of them together.
>>
>> I am thinking a series on the order of 30 patches to start - just the
>> pretty CSS stuff in Sphinx.
>>
>> Once we get the page to look nicer, then we can start editing the content
>> for readability!!!
>>
>> Thanks.
>>
>> Laura
>>
>> On Sat, Mar 31, 2018 at 5:57 PM, Laura Ekstrand 
>> wrote:
>>
>> Hello Jean,
>>
>> Has anyone reviewed your patch series yet?   I would like to get these
>> website updates moving.
>>
>> Thanks.
>>
>> Laura
>>
>> On Tue, Jun 6, 2017 at 10:43 AM, Jean Hertel 
>> wrote:
>>
>> Hello Emil,
>>
>> I've updated the website with the new release notes template.
>>
>> Please take a look at: http://mesa2.jeanhertel.com.br/relnotes.html
>>
>>
>> What about rebasing my current work on top of mesa-master?
>> (Remembering that github comments referencing directly the commit will be
>> loss)
>>
>>
>> The repository: https://github.com/jlHertel/mesa
>> Demo site: http://mesa2.jeanhertel.com.br/
>>
>> Best regards,
>> Jean Hertel
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>>
>>
>>
>>
>> --
>> Enviado de meu dispositivo Android com K-9 mail. Desculpe-me pela
>> brevidade.
>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2018-04-04 Thread Laura Ekstrand
Jean,

The main problem is not the conversion to rst.  It's preserving the git
history so that the patches are easily reviewable.

I've started a branch here:
https://cgit.freedesktop.org/~ldeks/mesa?h=website2.  You see that the git
diff shows me that the text of the website hasn't changed at all?

I will probably squish the rename commits together at some point.  But the
format changes have to be in separate patches so git recognizes that the
text of the website hasn't really changed.

Thanks.

Laura

On Tue, Apr 3, 2018 at 1:36 PM, Jean Hertel  wrote:

> Hi Laura,
>
>
> Aurelio Silves pointed me out that there is the possibility of using
> pandoc for the conversion of mesa html sources to rst.
>
> You can take a look here: https://pandoc.org/index.html
>
> Depending on your distribution, probably there is a package for this.
>
>
> Also, if there is anything else I can do, send me an email and I will do
> the best I can to help.
>
> Kind Regards,
>
> Jean Hertel
>
>
> --
> *De:* Jean Hertel 
> *Enviado:* segunda-feira, 2 de abril de 2018 21:19
> *Para:* Laura Ekstrand
>
> *Cc:* Emil Velikov; Vedran Miletić; mesa-dev@lists.freedesktop.org; Jason
> Ekstrand
> *Assunto:* Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx
>
> Hi Laura,
>
> I haven't used any script.
> I made all the HTML to rst translations by hand, file by file.
>
> Kind Regards,
> Jean Hertel
>
> Em 2 de abril de 2018 19:09:34 BRT, Laura Ekstrand 
> escreveu:
>
> Hi Jean,
>
> I'm going to play around with your patches to get them into a format that
> Mesa devs can review.  This will blow the history away.
>
> The problem is that your workflow in 1 & 2 ruins the Git history for
> reviewers.  It makes the patch series hard to read.
>
> Could you provide us with your script for translating HTML to rst?  Go
> ahead and commit it to your repo as a patch.
>
> Thanks.
>
> Laura
>
> On Sun, Apr 1, 2018 at 6:12 AM, Jean Hertel 
> wrote:
>
> Hi Laura,
>
>
> The commits have the idea of being atomic, so it makes sense to have a lot
> of them.
>
> Some of them are just fixes, and can be squashed.
>
>
> Please keep in mind that no CSS file is supposed to live there, as we are
> using an existing template from readTheDocs.
>
> The commits are doing mainly two things:
>
> 1 - Create a new file and translate the old HTML content into a rst format.
>
> 2 - Delete the old file
>
> Kind Regards,
>
> Jean Hertel
>
> --
> *De:* Laura Ekstrand 
> *Enviado:* sábado, 31 de março de 2018 22:06
> *Para:* Jean Hertel
> *Cc:* Emil Velikov; Vedran Miletić; mesa-dev@lists.freedesktop.org; Jason
> Ekstrand
> *Assunto:* Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx
>
> Jean,
>
> I've taken at look at your sphinx-docs branch (
> https://github.com/jlHertel/mesa).
>
> Oh my you have a lot of commits there!  It would be simpler for me to
> review if you could squash some of them together.
>
> I am thinking a series on the order of 30 patches to start - just the
> pretty CSS stuff in Sphinx.
>
> Once we get the page to look nicer, then we can start editing the content
> for readability!!!
>
> Thanks.
>
> Laura
>
> On Sat, Mar 31, 2018 at 5:57 PM, Laura Ekstrand 
> wrote:
>
> Hello Jean,
>
> Has anyone reviewed your patch series yet?   I would like to get these
> website updates moving.
>
> Thanks.
>
> Laura
>
> On Tue, Jun 6, 2017 at 10:43 AM, Jean Hertel 
> wrote:
>
> Hello Emil,
>
> I've updated the website with the new release notes template.
>
> Please take a look at: http://mesa2.jeanhertel.com.br/relnotes.html
>
>
> What about rebasing my current work on top of mesa-master?
> (Remembering that github comments referencing directly the commit will be
> loss)
>
>
> The repository: https://github.com/jlHertel/mesa
> Demo site: http://mesa2.jeanhertel.com.br/
>
> Best regards,
> Jean Hertel
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
>
>
>
> --
> Enviado de meu dispositivo Android com K-9 mail. Desculpe-me pela
> brevidade.
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2018-04-02 Thread Laura Ekstrand
Hi Jean,

I'm going to play around with your patches to get them into a format that
Mesa devs can review.  This will blow the history away.

The problem is that your workflow in 1 & 2 ruins the Git history for
reviewers.  It makes the patch series hard to read.

Could you provide us with your script for translating HTML to rst?  Go
ahead and commit it to your repo as a patch.

Thanks.

Laura

On Sun, Apr 1, 2018 at 6:12 AM, Jean Hertel  wrote:

> Hi Laura,
>
>
> The commits have the idea of being atomic, so it makes sense to have a lot
> of them.
>
> Some of them are just fixes, and can be squashed.
>
>
> Please keep in mind that no CSS file is supposed to live there, as we are
> using an existing template from readTheDocs.
>
> The commits are doing mainly two things:
>
> 1 - Create a new file and translate the old HTML content into a rst format.
>
> 2 - Delete the old file
>
> Kind Regards,
>
> Jean Hertel
>
> --
> *De:* Laura Ekstrand 
> *Enviado:* sábado, 31 de março de 2018 22:06
> *Para:* Jean Hertel
> *Cc:* Emil Velikov; Vedran Miletić; mesa-dev@lists.freedesktop.org; Jason
> Ekstrand
> *Assunto:* Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx
>
> Jean,
>
> I've taken at look at your sphinx-docs branch (
> https://github.com/jlHertel/mesa).
>
> Oh my you have a lot of commits there!  It would be simpler for me to
> review if you could squash some of them together.
>
> I am thinking a series on the order of 30 patches to start - just the
> pretty CSS stuff in Sphinx.
>
> Once we get the page to look nicer, then we can start editing the content
> for readability!!!
>
> Thanks.
>
> Laura
>
> On Sat, Mar 31, 2018 at 5:57 PM, Laura Ekstrand 
> wrote:
>
> Hello Jean,
>
> Has anyone reviewed your patch series yet?   I would like to get these
> website updates moving.
>
> Thanks.
>
> Laura
>
> On Tue, Jun 6, 2017 at 10:43 AM, Jean Hertel 
> wrote:
>
> Hello Emil,
>
> I've updated the website with the new release notes template.
>
> Please take a look at: http://mesa2.jeanhertel.com.br/relnotes.html
>
>
> What about rebasing my current work on top of mesa-master?
> (Remembering that github comments referencing directly the commit will be
> loss)
>
>
> The repository: https://github.com/jlHertel/mesa
> Demo site: http://mesa2.jeanhertel.com.br/
>
> Best regards,
> Jean Hertel
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2018-03-31 Thread Laura Ekstrand
Jean,

I've taken at look at your sphinx-docs branch
(https://github.com/jlHertel/mesa).


Oh my you have a lot of commits there!  It would be simpler for me to
review if you could squash some of them together.

I am thinking a series on the order of 30 patches to start - just the
pretty CSS stuff in Sphinx.

Once we get the page to look nicer, then we can start editing the content
for readability!!!

Thanks.

Laura

On Sat, Mar 31, 2018 at 5:57 PM, Laura Ekstrand 
wrote:

> Hello Jean,
>
> Has anyone reviewed your patch series yet?   I would like to get these
> website updates moving.
>
> Thanks.
>
> Laura
>
> On Tue, Jun 6, 2017 at 10:43 AM, Jean Hertel 
> wrote:
>
>> Hello Emil,
>>
>> I've updated the website with the new release notes template.
>>
>> Please take a look at: http://mesa2.jeanhertel.com.br/relnotes.html
>>
>>
>> What about rebasing my current work on top of mesa-master?
>> (Remembering that github comments referencing directly the commit will be
>> loss)
>>
>>
>> The repository: https://github.com/jlHertel/mesa
>> Demo site: http://mesa2.jeanhertel.com.br/
>>
>> Best regards,
>> Jean Hertel
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2018-03-31 Thread Laura Ekstrand
Hello Jean,

Has anyone reviewed your patch series yet?   I would like to get these
website updates moving.

Thanks.

Laura

On Tue, Jun 6, 2017 at 10:43 AM, Jean Hertel 
wrote:

> Hello Emil,
>
> I've updated the website with the new release notes template.
>
> Please take a look at: http://mesa2.jeanhertel.com.br/relnotes.html
>
>
> What about rebasing my current work on top of mesa-master?
> (Remembering that github comments referencing directly the commit will be
> loss)
>
>
> The repository: https://github.com/jlHertel/mesa
> Demo site: http://mesa2.jeanhertel.com.br/
>
> Best regards,
> Jean Hertel
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] GSoC 2015: Request for Registration for Mentorship

2015-04-02 Thread Laura Ekstrand
Ok, I'm registered on Melange as ldeks.

On Thu, Apr 2, 2015 at 10:29 AM, Brian Paul  wrote:

> Sorry, I've been busy too.  What's the URL for the sign-up?
>
> -Brian
>
>
> On Thu, Apr 2, 2015 at 11:00 AM, Laura Ekstrand 
> wrote:
>
>> Hi,
>>
>> I haven't been able to do this yet because I have a lot going on.
>>
>> Sorry.
>>
>> Laura
>>
>> On Mon, Mar 30, 2015 at 1:10 AM, Juliet Fru  wrote:
>>
>>>
>>> Hello +Laura, +Brian,
>>>>
>>>> I will like you to register on melange with X.org so as to mentor me on
>>>> the Porting Glean tests to piglit project for GSoC 2015. The Mentor +Martin
>>>> Peres requested I inform you to register.
>>>>
>>>> Thanks,
>>>> Juliet
>>>>
>>>
>>>
>>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] GSoC 2015: Request for Registration for Mentorship

2015-04-02 Thread Laura Ekstrand
Hi,

I haven't been able to do this yet because I have a lot going on.

Sorry.

Laura

On Mon, Mar 30, 2015 at 1:10 AM, Juliet Fru  wrote:

>
> Hello +Laura, +Brian,
>>
>> I will like you to register on melange with X.org so as to mentor me on
>> the Porting Glean tests to piglit project for GSoC 2015. The Mentor +Martin
>> Peres requested I inform you to register.
>>
>> Thanks,
>> Juliet
>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] main: create_buffers unlocks mutex when throwing OUT_OF_MEMORY.

2015-04-01 Thread Laura Ekstrand
Hmm, I don't trust myself with gotos yet because I still don't have much
experience writing them.  So maybe I'll use them for a different patch
later.

On Wed, Apr 1, 2015 at 11:56 AM, Ilia Mirkin  wrote:

> Reviewed-by: Ilia Mirkin 
>
> An alternative, btw, is to do a goto to the existing unlock. This
> would have the advantage of keeping a single unlock, and a single
> return path in the function. Your call, you get the R-b either way.
>
>   -ilia
>
> On Wed, Apr 1, 2015 at 2:23 PM, Laura Ekstrand 
> wrote:
> > Ilia Mirkin found that I had forgotten to free the mutex in the error
> case.
> > ---
> >  src/mesa/main/bufferobj.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> > index b67e1c4..c7ef90b 100644
> > --- a/src/mesa/main/bufferobj.c
> > +++ b/src/mesa/main/bufferobj.c
> > @@ -1353,6 +1353,7 @@ create_buffers(GLsizei n, GLuint *buffers, bool
> dsa)
> >   buf = ctx->Driver.NewBufferObject(ctx, buffers[i]);
> >   if (!buf) {
> >  _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
> > +mtx_unlock(&ctx->Shared->Mutex);
> >  return;
> >   }
> >}
> > --
> > 2.1.0
> >
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] main: create_buffers unlocks mutex when throwing OUT_OF_MEMORY.

2015-04-01 Thread Laura Ekstrand
Ilia Mirkin found that I had forgotten to free the mutex in the error case.
---
 src/mesa/main/bufferobj.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index b67e1c4..c7ef90b 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1353,6 +1353,7 @@ create_buffers(GLsizei n, GLuint *buffers, bool dsa)
  buf = ctx->Driver.NewBufferObject(ctx, buffers[i]);
  if (!buf) {
 _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
+mtx_unlock(&ctx->Shared->Mutex);
 return;
  }
   }
-- 
2.1.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 05/23] main: Add entry point for CreateBuffers.

2015-04-01 Thread Laura Ekstrand
Yes, you are right.  Thanks for the catch.  I will send a fix patch to the
mailing list.

Laura

On Mon, Mar 30, 2015 at 7:10 PM, Ilia Mirkin  wrote:

> On Wed, Feb 11, 2015 at 9:05 PM, Laura Ekstrand 
> wrote:
> > for (i = 0; i < n; i++) {
> > -  _mesa_HashInsert(ctx->Shared->BufferObjects, first + i,
> > -   &DummyBufferObject);
> > -  buffer[i] = first + i;
> > +  buffers[i] = first + i;
> > +  if (dsa) {
> > + ASSERT(ctx->Driver.NewBufferObject);
> > + buf = ctx->Driver.NewBufferObject(ctx, buffers[i]);
> > + if (!buf) {
> > +_mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
> > +return;
>
> Aren't you holding the shared mutex at this point? I think you need to
> free it...
>
> > + }
> > +  }
> > +  else
> > + buf = &DummyBufferObject;
> > +
> > +  _mesa_HashInsert(ctx->Shared->BufferObjects, buffers[i], buf);
> > }
> >
> > mtx_unlock(&ctx->Shared->Mutex);
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3] mesa: Improve validation of target, format and type of glTexSubImage[2, 3]D

2015-03-25 Thread Laura Ekstrand
With your modifications in this patch, the target is already validated by
the time you get to this function, so it should be fine to move mesa select
tex image up above the format and type checks.
On Mar 24, 2015 11:44 PM, "Eduardo Lima Mitev"  wrote:

> On 03/25/2015 12:02 AM, Laura Ekstrand wrote:
> > > +   if (_mesa_is_gles3(ctx)) {
> > > +  /* Validation of format and type for ES3 has to be done
> here
> > > +   * after the texture image is resolved, because the
> internal
> > > +   * format is needed for the verification
> > > +   */
> > > +  err = _mesa_es3_error_check_format_and_type(ctx,
> format, type,
> > > +
> > > texImage->InternalFormat);
> > > +  if (err != GL_NO_ERROR) {
> > > + _mesa_error(ctx, err,
> > > + "%s(incompatible format = %s, type = %s,
> "
> > > + "internalformat = %s)",
> > > + callerName,
> _mesa_lookup_enum_by_nr(format),
> > > + _mesa_lookup_enum_by_nr(type),
> > > +
> > >  _mesa_lookup_enum_by_nr(texImage->InternalFormat));
> > > + return GL_TRUE;
> > > +  }
> > > +   }
> > > +
> >
> >
> > What does the (es)_error_check_format_and_type have to do with
> > validating the target?  I thought legal_texsubimage_target did all of
> > the target checking?  So if we move up _mesa_select_tex_image above the
> > format and type checks, it shouldn't be a problem because the target is
> > already checked.  (That's my understanding of the problem.)
>
> _mesa_es3_error_check_format_and_type() takes the tex object's internal
> format as argument, because gles3 impose additional restrictions that
> depend on the internal format.
>
> So, to check format and type for gles3 case, we need to have texIamge,
> and to obtain it, we first need to validate the target (otherwise we get
> the _mesa_problem() call we are trying to avoid here).
>
> That's why gles3 validation of format and type indirectly depends on
> having the target validated.
>
> cheers,
> Eduardo
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v4 16/17] main: Added entry points for NamedRenderbufferStorage/Multisample

2015-03-24 Thread Laura Ekstrand
Looks good to me.

Reviewed-by: Laura Ekstrand 

On Tue, Mar 24, 2015 at 7:43 AM, Martin Peres 
wrote:

> v2: Review from Laura Ekstrand
> - get rid of a change that should not have happened in this patch
> - improve the error messages
> - fix alignments
> - fix a capitalization in a function name in an error message
>
> v3: Review from Laura Ekstrand
> - move the test for the validity of the renderbuffer to less generic
>   functions
> - get rid of some changes that accidentally landed in the wrong commit
> - revert some alignment fixes
>
> v3: Review from Laura Ekstrand
> - check that the lookup returns a valid renderbuffer
> - cosmetic changes to some error messages
>
> Signed-off-by: Martin Peres 
> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  15 +++
>  src/mesa/main/fbobject.c   | 157
> ++---
>  src/mesa/main/fbobject.h   |   9 ++
>  src/mesa/main/tests/dispatch_sanity.cpp|   2 +
>  4 files changed, 142 insertions(+), 41 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index d4e1f7c..8a092d6 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -159,6 +159,21 @@
>
> 
>
> +   
> +  
> +  
> +  
> +  
> +   
> +
> +   
> +  
> +  
> +  
> +  
> +  
> +   
> +
> 
>
>
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 377f915..072e1a8 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -1785,40 +1785,17 @@ invalidate_rb(GLuint key, void *data, void
> *userData)
>
>
>  /**
> - * Helper function used by _mesa_RenderbufferStorage() and
> - * _mesa_RenderbufferStorageMultisample().
> - * samples will be NO_SAMPLES if called by _mesa_RenderbufferStorage().
> + * Helper function used by renderbuffer_storage_direct() and
> + * renderbuffer_storage_target().
> + * samples will be NO_SAMPLES if called by a non-multisample function.
>   */
>  static void
> -renderbuffer_storage(GLenum target, GLenum internalFormat,
> - GLsizei width, GLsizei height, GLsizei samples)
> +renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
> + GLenum internalFormat, GLsizei width,
> + GLsizei height, GLsizei samples, const char *func)
>  {
> -   const char *func = samples == NO_SAMPLES ?
> -  "glRenderbufferStorage" : "glRenderbufferStorageMultisample";
> -   struct gl_renderbuffer *rb;
> GLenum baseFormat;
> GLenum sample_count_error;
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (MESA_VERBOSE & VERBOSE_API) {
> -  if (samples == NO_SAMPLES)
> - _mesa_debug(ctx, "%s(%s, %s, %d, %d)\n",
> - func,
> - _mesa_lookup_enum_by_nr(target),
> - _mesa_lookup_enum_by_nr(internalFormat),
> - width, height);
> -  else
> - _mesa_debug(ctx, "%s(%s, %s, %d, %d, %d)\n",
> - func,
> - _mesa_lookup_enum_by_nr(target),
> - _mesa_lookup_enum_by_nr(internalFormat),
> - width, height, samples);
> -   }
> -
> -   if (target != GL_RENDERBUFFER_EXT) {
> -  _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func);
> -  return;
> -   }
>
> baseFormat = _mesa_base_fbo_format(ctx, internalFormat);
> if (baseFormat == 0) {
> @@ -1828,12 +1805,14 @@ renderbuffer_storage(GLenum target, GLenum
> internalFormat,
> }
>
> if (width < 0 || width > (GLsizei) ctx->Const.MaxRenderbufferSize) {
> -  _mesa_error(ctx, GL_INVALID_VALUE, "%s(width)", func);
> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s(invalid width %d)", func,
> +  width);
>return;
> }
>
> if (height < 0 || height > (GLsizei) ctx->Const.MaxRenderbufferSize) {
> -  _mesa_error(ctx, GL_INVALID_VALUE, "%s(height)", func);
> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s(invalid height %d)", func,
> +  height);
>return;
> }
>
> @@ -1845,7 +1824,7 @@ renderbuffer_storage(GLenum target, GLenum
> internalFormat,
>/* check the sample count;
> * note: driver may choose to use more samples than what's requested
> */
> -  sample_count_error = _mesa_check_sample_count(ctx, target,
> +  s

Re: [Mesa-dev] [PATCH v4 15/17] main: Added entry point for glGetNamedRenderbufferParameteriv

2015-03-24 Thread Laura Ekstrand
This looks good.

Reviewed-by: Laura Ekstrand 

On Tue, Mar 24, 2015 at 7:42 AM, Martin Peres 
wrote:

> v2:
> - improve an error message
>
> Reviewed-by: Laura Ekstrand 
>
> v3:
> - move a test to less generic functions
> - fix an alignment
>
> v4:
> - take the caller as a parameter instead of bool dsa
> - check that the lookup returns a valid renderbuffer
>
> Signed-off-by: Martin Peres 
> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  6 +++
>  src/mesa/main/fbobject.c   | 63
> ++
>  src/mesa/main/fbobject.h   |  4 ++
>  src/mesa/main/tests/dispatch_sanity.cpp|  1 +
>  4 files changed, 56 insertions(+), 18 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index 976dcc8..d4e1f7c 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -159,6 +159,12 @@
>
> 
>
> +   
> +  
> +  
> +  
> +   
> +
> 
>
> 
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 8083bc1..377f915 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -1993,25 +1993,11 @@ _es_RenderbufferStorageEXT(GLenum target, GLenum
> internalFormat,
>  }
>
>
> -void GLAPIENTRY
> -_mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint
> *params)
> +static void
> +get_render_buffer_parameteriv(struct gl_context *ctx,
> +  struct gl_renderbuffer *rb, GLenum pname,
> +  GLint *params, const char *func)
>  {
> -   struct gl_renderbuffer *rb;
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (target != GL_RENDERBUFFER_EXT) {
> -  _mesa_error(ctx, GL_INVALID_ENUM,
> -  "glGetRenderbufferParameterivEXT(target)");
> -  return;
> -   }
> -
> -   rb = ctx->CurrentRenderbuffer;
> -   if (!rb) {
> -  _mesa_error(ctx, GL_INVALID_OPERATION,
> -  "glGetRenderbufferParameterivEXT");
> -  return;
> -   }
> -
> /* No need to flush here since we're just quering state which is
>  * not effected by rendering.
>  */
> @@ -2042,10 +2028,51 @@ _mesa_GetRenderbufferParameteriv(GLenum target,
> GLenum pname, GLint *params)
>}
>/* fallthrough */
> default:
> +  _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid pname=%s)", func,
> +  _mesa_lookup_enum_by_nr(pname));
> +  return;
> +   }
> +}
> +
> +
> +void GLAPIENTRY
> +_mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint
> *params)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +
> +   if (target != GL_RENDERBUFFER_EXT) {
>_mesa_error(ctx, GL_INVALID_ENUM,
>"glGetRenderbufferParameterivEXT(target)");
>return;
> }
> +
> +   if (!ctx->CurrentRenderbuffer) {
> +  _mesa_error(ctx, GL_INVALID_OPERATION,
> "glGetRenderbufferParameterivEXT"
> +  "(no renderbuffer bound)");
> +  return;
> +   }
> +
> +   get_render_buffer_parameteriv(ctx, ctx->CurrentRenderbuffer, pname,
> + params, "glGetRenderbufferParameteriv");
> +}
> +
> +
> +void GLAPIENTRY
> +_mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname,
> +  GLint *params)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +
> +   struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx,
> renderbuffer);
> +   if (!rb || rb == &DummyRenderbuffer) {
> +  /* ID was reserved, but no real renderbuffer object made yet */
> +  _mesa_error(ctx, GL_INVALID_OPERATION,
> "glGetNamedRenderbufferParameteriv"
> +  "(invalid renderbuffer %i)", renderbuffer);
> +  return;
> +   }
> +
> +   get_render_buffer_parameteriv(ctx, rb, pname, params,
> + "glGetNamedRenderbufferParameteriv");
>  }
>
>
> diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
> index 9ab6b0b..b92149b 100644
> --- a/src/mesa/main/fbobject.h
> +++ b/src/mesa/main/fbobject.h
> @@ -137,6 +137,10 @@ extern void GLAPIENTRY
>  _mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname,
>  GLint *params);
>
> +void GLAPIENTRY
> +_mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname,
> +  GLint *params);
> +
>  extern 

Re: [Mesa-dev] [PATCH 1/3] mesa: Improve validation of target, format and type of glTexSubImage[2, 3]D

2015-03-24 Thread Laura Ekstrand
On Tue, Mar 24, 2015 at 11:34 AM, Eduardo Lima Mitev 
wrote:

> Thanks for the review! Please see some comments inline:
>
> On 03/23/2015 06:53 PM, Laura Ekstrand wrote:
> > I'm glad you found this target checking problem.  I have come across the
> > same problem in other texture functions, but I have been too busy to
> > find all instances of this.  It's kind of a natural, negative byproduct
> > of adding DSA.
> >
> > [..]
> >
> > I recommend getting rid of the legal_texsubimage_target check in
> > texsubimage_error_check and moving it up into texturesubimage, right
> > after the texObj has been retrieved. Otherwise in the texsubimage case,
> > the target will get checked twice, once in texsubimage and once in
> > texsubimage-error-check.  In general, checking hurts driver performance,
> > so we should aim to get rid of redundancies.
> >
> >
>
> Yes, will do that.
>
> >
> > This is not related to target checking and should be moved to a separate
> > commit (with a name like gles 3 support for texsubimage_error_check).
> >
>
> Ok, makes sense.
>
> >
> > I would also move this block up to about line 2508 so it can sit next to
> > the other format and type checks there.  It would be nice to have all of
> > the format_and_type_checks formatted into one if, else if, else block so
> > it's really obvious what's going on, too.
> >
> > +   if (_mesa_is_gles3(ctx)) {
> > +  /* Validation of format and type for ES3 has to be done here
> > +   * after the texture image is resolved, because the internal
> > +   * format is needed for the verification
> > +   */
> > +  err = _mesa_es3_error_check_format_and_type(ctx, format, type,
> > +
> > texImage->InternalFormat);
> > +  if (err != GL_NO_ERROR) {
> > + _mesa_error(ctx, err,
> > + "%s(incompatible format = %s, type = %s, "
> > + "internalformat = %s)",
> > + callerName, _mesa_lookup_enum_by_nr(format),
> > + _mesa_lookup_enum_by_nr(type),
> > +
> >  _mesa_lookup_enum_by_nr(texImage->InternalFormat));
> > + return GL_TRUE;
> > +  }
> > +   }
> > +
>
> Note that this error check has to be performed after the texture image
> is resolved, because the internal format is not known before.
>
> If we want to merge it with the above format and type error checks, the
> only choice is to move all down after:
>
> texImage = _mesa_select_tex_image(texObj, target, level);
>
> But then we have a chicken-egg situation, since that function requires
> target to be validated before.
>
> WDYT?
>
> cheers,
> Eduardo
>
> What does the (es)_error_check_format_and_type have to do with validating
the target?  I thought legal_texsubimage_target did all of the target
checking?  So if we move up _mesa_select_tex_image above the format and
type checks, it shouldn't be a problem because the target is already
checked.  (That's my understanding of the problem.)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v3 16/17] main: Added entry points for NamedRenderbufferStorage/Multisample

2015-03-23 Thread Laura Ekstrand
On Mon, Mar 23, 2015 at 12:14 PM, Martin Peres  wrote:

> v2: Review from Laura Ekstrand
> - get rid of a change that should not have happened in this patch
> - improve the error messages
> - fix alignments
> - fix a capitalization in a function name in an error message
>
> v3: Review from Laura Ekstrand
> - move the test for the validity of the renderbuffer to less generic
>   functions
> - get rid of some changes that accidentally landed in the wrong commit
> - revert some alignment fixes
>
> Signed-off-by: Martin Peres 
> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  15 +++
>  src/mesa/main/fbobject.c   | 157
> ++---
>  src/mesa/main/fbobject.h   |   9 ++
>  src/mesa/main/tests/dispatch_sanity.cpp|   2 +
>  4 files changed, 142 insertions(+), 41 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index d4e1f7c..8a092d6 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -159,6 +159,21 @@
>
> 
>
> +   
> +  
> +  
> +  
> +  
> +   
> +
> +   
> +  
> +  
> +  
> +  
> +  
> +   
> +
> 
>
>
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index ee4ad1f..d688195 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -1785,40 +1785,17 @@ invalidate_rb(GLuint key, void *data, void
> *userData)
>
>
>  /**
> - * Helper function used by _mesa_RenderbufferStorage() and
> - * _mesa_RenderbufferStorageMultisample().
> - * samples will be NO_SAMPLES if called by _mesa_RenderbufferStorage().
> + * Helper function used by renderbuffer_storage_direct() and
> + * renderbuffer_storage_target().
> + * samples will be NO_SAMPLES if called by a non-multisample function.
>   */
>  static void
> -renderbuffer_storage(GLenum target, GLenum internalFormat,
> - GLsizei width, GLsizei height, GLsizei samples)
> +renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
> + GLenum internalFormat, GLsizei width,
> + GLsizei height, GLsizei samples, const char *func)
>  {
> -   const char *func = samples == NO_SAMPLES ?
> -  "glRenderbufferStorage" : "glRenderbufferStorageMultisample";
> -   struct gl_renderbuffer *rb;
> GLenum baseFormat;
> GLenum sample_count_error;
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (MESA_VERBOSE & VERBOSE_API) {
> -  if (samples == NO_SAMPLES)
> - _mesa_debug(ctx, "%s(%s, %s, %d, %d)\n",
> - func,
> - _mesa_lookup_enum_by_nr(target),
> - _mesa_lookup_enum_by_nr(internalFormat),
> - width, height);
> -  else
> - _mesa_debug(ctx, "%s(%s, %s, %d, %d, %d)\n",
> - func,
> - _mesa_lookup_enum_by_nr(target),
> - _mesa_lookup_enum_by_nr(internalFormat),
> - width, height, samples);
> -   }
> -
> -   if (target != GL_RENDERBUFFER_EXT) {
> -  _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func);
> -  return;
> -   }
>
> baseFormat = _mesa_base_fbo_format(ctx, internalFormat);
> if (baseFormat == 0) {
> @@ -1828,12 +1805,14 @@ renderbuffer_storage(GLenum target, GLenum
> internalFormat,
> }
>
> if (width < 0 || width > (GLsizei) ctx->Const.MaxRenderbufferSize) {
> -  _mesa_error(ctx, GL_INVALID_VALUE, "%s(width)", func);
> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s(invalid width %d)", func,
> +  width);
>return;
> }
>
> if (height < 0 || height > (GLsizei) ctx->Const.MaxRenderbufferSize) {
> -  _mesa_error(ctx, GL_INVALID_VALUE, "%s(height)", func);
> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s(invalid height %d)", func,
> +  height);
>return;
> }
>
> @@ -1845,7 +1824,7 @@ renderbuffer_storage(GLenum target, GLenum
> internalFormat,
>/* check the sample count;
> * note: driver may choose to use more samples than what's requested
> */
> -  sample_count_error = _mesa_check_sample_count(ctx, target,
> +  sample_count_error = _mesa_check_sample_count(ctx, GL_RENDERBUFFER,
>  internalFormat, samples);
>if (sample_count_error != GL_NO_ERROR) {
>   _mesa_error(ctx, sampl

Re: [Mesa-dev] [PATCH v3 15/17] main: Added entry point for glGetNamedRenderbufferParameteriv

2015-03-23 Thread Laura Ekstrand
On Mon, Mar 23, 2015 at 12:04 PM, Martin Peres  wrote:

> v2:
> - improve an error message
>
> Reviewed-by: Laura Ekstrand 
>
> v3:
> - move a test to less generic functions
> - fix an alignment
>
> Signed-off-by: Martin Peres 
> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  6 +++
>  src/mesa/main/fbobject.c   | 63
> +++---
>  src/mesa/main/fbobject.h   |  4 ++
>  src/mesa/main/tests/dispatch_sanity.cpp|  1 +
>  4 files changed, 57 insertions(+), 17 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index 976dcc8..d4e1f7c 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -159,6 +159,12 @@
>
> 
>
> +   
> +  
> +  
> +  
> +   
> +
> 
>
> 
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 8083bc1..ee4ad1f 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -1993,24 +1993,13 @@ _es_RenderbufferStorageEXT(GLenum target, GLenum
> internalFormat,
>  }
>
>
> -void GLAPIENTRY
> -_mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint
> *params)
> +static void
> +get_render_buffer_parameteriv(struct gl_context *ctx,
> +  struct gl_renderbuffer *rb, GLenum pname,
> +  GLint *params, bool dsa)
>  {
> -   struct gl_renderbuffer *rb;
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (target != GL_RENDERBUFFER_EXT) {
> -  _mesa_error(ctx, GL_INVALID_ENUM,
> -  "glGetRenderbufferParameterivEXT(target)");
> -  return;
> -   }
> -
> -   rb = ctx->CurrentRenderbuffer;
> -   if (!rb) {
> -  _mesa_error(ctx, GL_INVALID_OPERATION,
> -  "glGetRenderbufferParameterivEXT");
> -  return;
> -   }
>
I think passing in a const char *caller would be better than a bool dsa,
since the only thing you are using dsa for is determining the name of the
calling function.

> +   const char *func = dsa ? "glGetNamedRenderbufferParameteriv" :
> +"glGetRenderbufferParameteriv";
>
> /* No need to flush here since we're just quering state which is
>  * not effected by rendering.
> @@ -2042,10 +2031,50 @@ _mesa_GetRenderbufferParameteriv(GLenum target,
> GLenum pname, GLint *params)
>}
>/* fallthrough */
> default:
> +  _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid pname=%s)", func,
> +  _mesa_lookup_enum_by_nr(pname));
> +  return;
> +   }
> +}
> +
> +
> +void GLAPIENTRY
> +_mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint
> *params)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +
> +   if (target != GL_RENDERBUFFER_EXT) {
>_mesa_error(ctx, GL_INVALID_ENUM,
>"glGetRenderbufferParameterivEXT(target)");
>return;
> }
> +
> +   if (!ctx->CurrentRenderbuffer) {
> +  _mesa_error(ctx, GL_INVALID_OPERATION,
> "glGetRenderbufferParameterivEXT"
> +  "(no renderbuffer bound)");
> +  return;
> +   }
> +
> +   get_render_buffer_parameteriv(ctx, ctx->CurrentRenderbuffer, pname,
> + params, false);
> +}
> +
> +
> +void GLAPIENTRY
> +_mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname,
> +  GLint *params)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +
> +   struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx,
> renderbuffer);
>
You need to check if !rb here, too, in case you get rb = NULL.

> +   if (rb == &DummyRenderbuffer) {
> +  /* ID was reserved, but no real renderbuffer object made yet */
> +  _mesa_error(ctx, GL_INVALID_OPERATION,
> "glGetNamedRenderbufferParameteriv"
> +  "(invalid renderbuffer %i)", renderbuffer);
> +  return;
> +   }
> +
> +   get_render_buffer_parameteriv(ctx, rb, pname, params, true);
>  }
>
>
> diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
> index 9ab6b0b..b92149b 100644
> --- a/src/mesa/main/fbobject.h
> +++ b/src/mesa/main/fbobject.h
> @@ -137,6 +137,10 @@ extern void GLAPIENTRY
>  _mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname,
>  GLint *params);
>
> +void GLAPIENTRY
> +_mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GL

Re: [Mesa-dev] [PATCH 3/3] mesa: Validate the target argument earlier in glGenerateMipmap()

2015-03-23 Thread Laura Ekstrand
Looks good to me.

Reviewed-by: Laura Ekstrand 

On Mon, Mar 23, 2015 at 4:30 AM, Eduardo Lima Mitev 
wrote:

> glGenerateMipmap() queries the current texture object corresponding to the
> target
> argument before ever validating it. It does so by calling
> _mesa_get_current_tex_object() which explicitly states that target must
> have been
> validated before. However, the target validation occurs later on in
> _mesa_generate_texture_mipmap().
>
> This patch takes the target validation from
> _mesa_generate_texture_mipmap() and
> creates a new function generate_mipmap_is_valid_target(), that is called by
> both glGenerateMipmap() and glGenerateTextureMipmap().
>
> This gives the correct GL user error when an invalid target is given to
> glGenerateMipmap.
> ---
>  src/mesa/main/genmipmap.c | 52
> +--
>  1 file changed, 37 insertions(+), 15 deletions(-)
>
> diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c
> index 9aef090..163901f 100644
> --- a/src/mesa/main/genmipmap.c
> +++ b/src/mesa/main/genmipmap.c
> @@ -39,19 +39,16 @@
>  #include "hash.h"
>
>  /**
> - * Implements glGenerateMipmap and glGenerateTextureMipmap.
> - * Generates all the mipmap levels below the base level.
> + * Validates the target argument in glGenerateMipmap and
> + * glGenerateTextureMipmap.
> + * Returns true if target is valid, otherwise returns false and sets GL
> error
> + * accordingly.
>   */
> -void
> -_mesa_generate_texture_mipmap(struct gl_context *ctx,
> -  struct gl_texture_object *texObj, GLenum
> target,
> -  bool dsa)
> +static bool
> +generate_mipmap_is_valid_target(struct gl_context *ctx, GLenum target,
> +const char *caller)
>  {
> -   struct gl_texture_image *srcImage;
> -   GLboolean error;
> -   const char *suffix = dsa ? "Texture" : "";
> -
> -   FLUSH_VERTICES(ctx, 0);
> +  bool error;
>
> switch (target) {
> case GL_TEXTURE_1D:
> @@ -78,15 +75,32 @@ _mesa_generate_texture_mipmap(struct gl_context *ctx,
>!ctx->Extensions.ARB_texture_cube_map_array;
>break;
> default:
> -  error = GL_TRUE;
> +  error = true;
> }
>
> if (error) {
> -  _mesa_error(ctx, GL_INVALID_ENUM, "glGenerate%sMipmap(target=%s)",
> -  suffix, _mesa_lookup_enum_by_nr(target));
> -  return;
> +  _mesa_error(ctx, GL_INVALID_ENUM, "%s(target=%s)",
> +  caller, _mesa_lookup_enum_by_nr(target));
> +  return false;
> }
>
> +   return true;
> +}
> +
> +/**
> + * Implements glGenerateMipmap and glGenerateTextureMipmap.
> + * Generates all the mipmap levels below the base level.
> + */
> +void
> +_mesa_generate_texture_mipmap(struct gl_context *ctx,
> +  struct gl_texture_object *texObj, GLenum
> target,
> +  bool dsa)
> +{
> +   struct gl_texture_image *srcImage;
> +   const char *suffix = dsa ? "Texture" : "";
> +
> +   FLUSH_VERTICES(ctx, 0);
> +
> if (texObj->BaseLevel >= texObj->MaxLevel) {
>/* nothing to do */
>return;
> @@ -142,6 +156,9 @@ _mesa_GenerateMipmap(GLenum target)
> struct gl_texture_object *texObj;
> GET_CURRENT_CONTEXT(ctx);
>
> +   if (!generate_mipmap_is_valid_target(ctx, target, "glGenerateMipmap"))
> +  return;
> +
> texObj = _mesa_get_current_tex_object(ctx, target);
> if (!texObj)
>return;
> @@ -162,5 +179,10 @@ _mesa_GenerateTextureMipmap(GLuint texture)
> if (!texObj)
>return;
>
> +   if (!generate_mipmap_is_valid_target(ctx, texObj->Target,
> +"glGenerateTextureMipmap")) {
> +  return;
> +   }
> +
> _mesa_generate_texture_mipmap(ctx, texObj, texObj->Target, true);
>  }
> --
> 2.1.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/3] mesa: Fix error in target validation of glCompressedTex(ture)SubImage3D() calls

2015-03-23 Thread Laura Ekstrand
Looks correct to me.

Reviewed-by: Laura Ekstrand 

On Mon, Mar 23, 2015 at 4:30 AM, Eduardo Lima Mitev 
wrote:

> Basically, two different target error checks are chained consecutively,
> and the
> second one is executed regardless the result of the first one. This
> produces an incorrect error if the first check fails but is overrided by
> the
> second.
>
> This patch conditions the execution of the second check to a successful
> pass
> of the first one.
>
> Fixes 1 dEQP test:
> * dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d
> ---
>  src/mesa/main/teximage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 9f7e10c..1af2896 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -4598,7 +4598,7 @@ compressed_subtexture_target_check(struct gl_context
> *ctx, GLenum target,
> *non-zero, or the effective target for the texture is not
> *TEXTURE_2D_ARRAY."
> */
> -  if (target != GL_TEXTURE_2D_ARRAY) {
> +  if (targetOK && target != GL_TEXTURE_2D_ARRAY) {
>   bool invalidformat;
>   switch (format) {
>  /* These came from _mesa_is_compressed_format in glformats.c.
> */
> --
> 2.1.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3] mesa: Improve validation of target, format and type of glTexSubImage[2, 3]D

2015-03-23 Thread Laura Ekstrand
I'm glad you found this target checking problem.  I have come across the
same problem in other texture functions, but I have been too busy to find
all instances of this.  It's kind of a natural, negative byproduct of
adding DSA.

On Mon, Mar 23, 2015 at 4:29 AM, Eduardo Lima Mitev 
wrote:

> Currently, glTexSubImage[2,3]D attempt to resolve the texture object
> (by calling _mesa_get_current_tex_object()) before validating the given
> target. However, that method explicitly states that target must have been
> validated before calling it, so it never returns a user error.
>
> The target validation occurs later when texsubimage_error_check() is
> called.
> This patch moves the target validation out from that function and into
> a point before the texture object is resolved.
>
> It also adds a missing validation of format and type against the texture
> object's internal format, when profile is OpenGL-ES 3.0.
>
> Fixes 2 dEQP tests:
> * dEQP-GLES3.functional.negative_api.texture.texsubimage2d
> * dEQP-GLES3.functional.negative_api.texture.texsubimage3d
> ---
>  src/mesa/main/teximage.c | 25 +
>  1 file changed, 25 insertions(+)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 8d9d7cf..9f7e10c 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -2530,6 +2530,24 @@ texsubimage_error_check(struct gl_context *ctx,
> GLuint dimensions,
>
I recommend getting rid of the legal_texsubimage_target check in
texsubimage_error_check and moving it up into texturesubimage, right after
the texObj has been retrieved. Otherwise in the texsubimage case, the
target will get checked twice, once in texsubimage and once in
texsubimage-error-check.  In general, checking hurts driver performance, so
we should aim to get rid of redundancies.


>return GL_TRUE;
> }
>
> This is not related to target checking and should be moved to a separate
commit (with a name like gles 3 support for texsubimage_error_check).  I
would also move this block up to about line 2508 so it can sit next to the
other format and type checks there.  It would be nice to have all of the
format_and_type_checks formatted into one if, else if, else block so it's
really obvious what's going on, too.

> +   if (_mesa_is_gles3(ctx)) {
> +  /* Validation of format and type for ES3 has to be done here
> +   * after the texture image is resolved, because the internal
> +   * format is needed for the verification
> +   */
> +  err = _mesa_es3_error_check_format_and_type(ctx, format, type,
> +
> texImage->InternalFormat);
> +  if (err != GL_NO_ERROR) {
> + _mesa_error(ctx, err,
> + "%s(incompatible format = %s, type = %s, "
> + "internalformat = %s)",
> + callerName, _mesa_lookup_enum_by_nr(format),
> + _mesa_lookup_enum_by_nr(type),
> + _mesa_lookup_enum_by_nr(texImage->InternalFormat));
> + return GL_TRUE;
> +  }
> +   }
> +
> if (error_check_subtexture_dimensions(ctx, dimensions,
>   texImage, xoffset, yoffset,
> zoffset,
>   width, height, depth,
> callerName)) {
> @@ -3569,6 +3587,13 @@ texsubimage(struct gl_context *ctx, GLuint dims,
> GLenum target, GLint level,
> struct gl_texture_object *texObj;
> struct gl_texture_image *texImage;
>
> +   /* check target (proxies not allowed) */
> +   if (!legal_texsubimage_target(ctx, dims, target, false)) {
> +  _mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(target=%s)",
> +  dims, _mesa_lookup_enum_by_nr(target));
> +  return;
> +   }
> +
> texObj = _mesa_get_current_tex_object(ctx, target);
> if (!texObj)
>return;
> --
> 2.1.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 21/22] mesa: Implement GetVertexArrayIndexed[64]iv

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund  wrote:

> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  14 +++
>  src/mesa/main/tests/dispatch_sanity.cpp|   2 +
>  src/mesa/main/varray.c | 117
> +
>  src/mesa/main/varray.h |  10 +++
>  4 files changed, 143 insertions(+)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index 35857d6..955cf8b 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -461,5 +461,19 @@
>
> 
>
> +   
> +  
> +  
> +  
> +  
> +   
> +
> +   
> +  
> +  
> +  
> +  
> +   
> +
>  
>  
> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp
> b/src/mesa/main/tests/dispatch_sanity.cpp
> index 83f8ecc..1ffd86d 100644
> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> @@ -982,6 +982,8 @@ const struct function gl_core_functions_possible[] = {
> { "glVertexArrayAttribBinding", 45, -1 },
> { "glVertexArrayBindingDivisor", 45, -1 },
> { "glGetVertexArrayiv", 45, -1 },
> +   { "glGetVertexArrayIndexediv", 45, -1 },
> +   { "glGetVertexArrayIndexed64iv", 45, -1 },
>
> /* GL_EXT_polygon_offset_clamp */
> { "glPolygonOffsetClampEXT", 11, -1 },
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index ec768f0..dccfc2f 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -1051,6 +1051,123 @@ _mesa_GetVertexAttribPointerv(GLuint index, GLenum
> pname, GLvoid **pointer)
>  }
>
>
> +/** ARB_direct_state_access */
> +void GLAPIENTRY
> +_mesa_GetVertexArrayIndexediv(GLuint vaobj, GLuint index,
> +  GLenum pname, GLint *params)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_vertex_array_object *vao;
> +
> +   /* The ARB_direct_state_access specification says:
> +*
> +*"An INVALID_OPERATION error is generated if  is not
> +* [compatibility profile: zero or] the name of an existing
> +* vertex array object."
> +*/
> +   vao = _mesa_lookup_vao_err(ctx, vaobj, "glGetVertexArrayIndexediv");
> +   if (!vao)
> +  return;
> +
> +   /* The ARB_direct_state_access specification says:
> +*
> +*"For GetVertexArrayIndexediv,  must be one of
> +* VERTEX_ATTRIB_ARRAY_ENABLED, VERTEX_ATTRIB_ARRAY_SIZE,
> +* VERTEX_ATTRIB_ARRAY_STRIDE, VERTEX_ATTRIB_ARRAY_TYPE,
> +* VERTEX_ATTRIB_ARRAY_NORMALIZED, VERTEX_ATTRIB_ARRAY_INTEGER,
> +* VERTEX_ATTRIB_ARRAY_LONG, VERTEX_ATTRIB_ARRAY_DIVISOR, or
> +* VERTEX_ATTRIB_RELATIVE_OFFSET."
> +*
> +* and:
> +*
> +*"Add GetVertexArrayIndexediv in 'Get Command' for
> +* VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
> +* VERTEX_ATTRIB_BINDING,
> +* VERTEX_ATTRIB_RELATIVE_OFFSET,
> +* VERTEX_BINDING_OFFSET, and
> +* VERTEX_BINDING_STRIDE states"
> +*
> +* The only parameter name common to both lists is
> +* VERTEX_ATTRIB_RELATIVE_OFFSET.  Also note that VERTEX_BINDING_BUFFER
> +* and VERTEX_BINDING_DIVISOR are missing from both lists.  It seems
> +* pretty clear however that the intent is that it should be possible
> +* to query all vertex attrib and binding states that can be set with
> +* a DSA function.
> +*/
> +   switch (pname) {
> +   case GL_VERTEX_BINDING_OFFSET:
> +  params[0] = vao->VertexBinding[VERT_ATTRIB_GENERIC(index)].Offset;
> +  break;
> +   case GL_VERTEX_BINDING_STRIDE:
> +  params[0] = vao->VertexBinding[VERT_ATTRIB_GENERIC(index)].Stride;
> +  break;
> +   case GL_VERTEX_BINDING_DIVISOR:
> +  params[0] =
> vao->VertexBinding[VERT_ATTRIB_GENERIC(index)].InstanceDivisor;
> +  break;
> +   case GL_VERTEX_BINDING_BUFFER:
> +  params[0] =
> vao->VertexBinding[VERT_ATTRIB_GENERIC(index)].BufferObj->Name;
> +  break;
> +   default:
> +  params[0] = get_vertex_array_attrib(ctx, vao, index, pname,
> +  "glGetVertexArrayIndexediv");
> +  break;
> +   }
> +}
> +
> +
> +void GLAPIENTRY
> +_mesa_GetVertexArrayIndexed64iv(GLuint vaobj, GLuint index,
> +GLenum pname, GLint64 *params)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_vertex_array_object *vao;
> +
> +   /* The ARB_direct_state_access specification says:
> +*
> +*"An INVALID_OPERATION error is generated if  is not
> +* [compatibility profile: zero or] the name of an existing
> +* vertex array object."
> +*/

+   vao = _mesa_lookup_vao_err(ctx, vaobj, "glVertexArrayIndexed64iv");
>
You forgot "Get" in this string --^

> +   if (!vao)
> +  return;
> +
> +   /* The ARB_direct_state_access specification says:
> +*
> +*"For GetVertexArrayIndexed64iv,  must be
> +* VERTEX_BINDING_OFFSET."
> +

Re: [Mesa-dev] [PATCH 20/22] mesa: Add support for quering GL_VERTEX_ATTRIB_ARRAY_LONG

2015-03-20 Thread Laura Ekstrand
You misspelled "Querying" in the commit message.

On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund  wrote:

> This parameter was added in OpenGL 4.3 and GL_ARB_direct_state_access.
> ---
>  src/mesa/main/varray.c | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index bbfe947..ec768f0 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -872,6 +872,11 @@ get_vertex_array_attrib(struct gl_context *ctx,
>   return array->Integer;
>}
>goto error;
> +   case GL_VERTEX_ATTRIB_ARRAY_LONG:
> +  if (_mesa_is_desktop_gl(ctx)) {
> + return array->Doubles;
> +  }
> +  goto error;
> case GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB:
>if ((_mesa_is_desktop_gl(ctx) &&
> ctx->Extensions.ARB_instanced_arrays)
>|| _mesa_is_gles3(ctx)) {
> --
> 1.8.5.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 18/22] mesa: Add a vao parameter to get_vertex_array_attrib

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund  wrote:

> This is needed to implement glGetVertexArrayIndexediv and
> glGetVertexArrayIndexed64iv.
> ---
>  src/mesa/main/varray.c | 22 ++
>  1 file changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index 0faf158..13b9c01 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -832,10 +832,11 @@ _mesa_DisableVertexArrayAttrib(GLuint vaobj, GLuint
> index)
>   * not handle the 4-element GL_CURRENT_VERTEX_ATTRIB_ARB query.
>   */
>  static GLuint
> -get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum
> pname,
> -  const char *caller)
> +get_vertex_array_attrib(struct gl_context *ctx,
>
This drops the const specifier on vao below.

> +struct gl_vertex_array_object *vao,
>
+GLuint index, GLenum pname,
> +const char *caller)
>  {
> -   const struct gl_vertex_array_object *vao = ctx->Array.VAO;
> const struct gl_vertex_attrib_array *array;
>
> if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
> @@ -926,7 +927,8 @@ _mesa_GetVertexAttribfv(GLuint index, GLenum pname,
> GLfloat *params)
>}
> }
> else {
> -  params[0] = (GLfloat) get_vertex_array_attrib(ctx, index, pname,
> +  params[0] = (GLfloat) get_vertex_array_attrib(ctx, ctx->Array.VAO,
> +index, pname,
>
>  "glGetVertexAttribfv");
> }
>  }
> @@ -947,7 +949,8 @@ _mesa_GetVertexAttribdv(GLuint index, GLenum pname,
> GLdouble *params)
>}
> }
> else {
> -  params[0] = (GLdouble) get_vertex_array_attrib(ctx, index, pname,
> +  params[0] = (GLdouble) get_vertex_array_attrib(ctx, ctx->Array.VAO,
> + index, pname,
>
> "glGetVertexAttribdv");
> }
>  }
> @@ -969,7 +972,8 @@ _mesa_GetVertexAttribiv(GLuint index, GLenum pname,
> GLint *params)
>}
> }
> else {
> -  params[0] = (GLint) get_vertex_array_attrib(ctx, index, pname,
> +  params[0] = (GLint) get_vertex_array_attrib(ctx, ctx->Array.VAO,
> +  index, pname,
>"glGetVertexAttribiv");
> }
>  }
> @@ -989,7 +993,8 @@ _mesa_GetVertexAttribIiv(GLuint index, GLenum pname,
> GLint *params)
>}
> }
> else {
> -  params[0] = (GLint) get_vertex_array_attrib(ctx, index, pname,
> +  params[0] = (GLint) get_vertex_array_attrib(ctx, ctx->Array.VAO,
> +  index, pname,
>"glGetVertexAttribIiv");
> }
>  }
> @@ -1009,7 +1014,8 @@ _mesa_GetVertexAttribIuiv(GLuint index, GLenum
> pname, GLuint *params)
>}
> }
> else {
> -  params[0] = get_vertex_array_attrib(ctx, index, pname,
> +  params[0] = get_vertex_array_attrib(ctx, ctx->Array.VAO,
> +  index, pname,
>"glGetVertexAttribIuiv");
> }
>  }
> --
> 1.8.5.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 10/22] mesa: Refactor VertexAttrib[I|L]Format

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund  wrote:

> The only difference between these functions is the legal types and
> sizes, so consolidate the code into a single vertex_attrib_format()
> function and call it from all three entry points.
> ---
>  src/mesa/main/varray.c | 143
> +++--
>  1 file changed, 43 insertions(+), 100 deletions(-)
>
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index 5f58016..a6b66a0 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -66,6 +66,21 @@
>  #define UNSIGNED_INT_10F_11F_11F_REV_BIT  (1 << 14)
>  #define ALL_TYPE_BITS((1 << 15) - 1)
>
> +#define ATTRIB_FORMAT_TYPES_MASK (BYTE_BIT | UNSIGNED_BYTE_BIT | \
> +  SHORT_BIT | UNSIGNED_SHORT_BIT | \
> +  INT_BIT | UNSIGNED_INT_BIT | \
> +  HALF_BIT | FLOAT_BIT | DOUBLE_BIT | \
> +  FIXED_GL_BIT | \
> +  UNSIGNED_INT_2_10_10_10_REV_BIT | \
> +  INT_2_10_10_10_REV_BIT | \
> +  UNSIGNED_INT_10F_11F_11F_REV_BIT)
> +
> +#define ATTRIB_IFORMAT_TYPES_MASK (BYTE_BIT | UNSIGNED_BYTE_BIT | \
> +   SHORT_BIT | UNSIGNED_SHORT_BIT | \
> +   INT_BIT | UNSIGNED_INT_BIT)
> +
> +#define ATTRIB_LFORMAT_TYPES_MASK DOUBLE_BIT
> +
>
>  /** Convert GL datatype enum into a _BIT value seen above */
>  static GLbitfield
> @@ -1739,19 +1754,12 @@ _mesa_VertexArrayVertexBuffers(GLuint vaobj,
> GLuint first, GLsizei count,
>  }
>
>
> -void GLAPIENTRY
> -_mesa_VertexAttribFormat(GLuint attribIndex, GLint size, GLenum type,
> - GLboolean normalized, GLuint relativeOffset)
> +static void
> +vertex_attrib_format(GLuint attribIndex, GLint size, GLenum type,
> + GLboolean normalized, GLboolean integer,
> + GLbitfield legalTypes, GLsizei maxSize,
> + GLuint relativeOffset, const char *func)
>  {
> -const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT |
> -   SHORT_BIT | UNSIGNED_SHORT_BIT |
> -   INT_BIT | UNSIGNED_INT_BIT |
> -   HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
> -   FIXED_GL_BIT |
> -   UNSIGNED_INT_2_10_10_10_REV_BIT |
> -   INT_2_10_10_10_REV_BIT |
> -   UNSIGNED_INT_10F_11F_11F_REV_BIT);
> -
> GET_CURRENT_CONTEXT(ctx);
> ASSERT_OUTSIDE_BEGIN_END(ctx);
>
> @@ -1765,7 +1773,7 @@ _mesa_VertexAttribFormat(GLuint attribIndex, GLint
> size, GLenum type,
> if (ctx->API == API_OPENGL_CORE &&
> ctx->Array.VAO == ctx->Array.DefaultVAO) {
>_mesa_error(ctx, GL_INVALID_OPERATION,
> -  "glVertexAttribFormat(No array object bound)");
> +  "%s(No array object bound)", func);
>return;
> }
>
> @@ -1776,65 +1784,38 @@ _mesa_VertexAttribFormat(GLuint attribIndex, GLint
> size, GLenum type,
>  */
> if (attribIndex >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
>_mesa_error(ctx, GL_INVALID_VALUE,
> -  "glVertexAttribFormat(attribindex=%u > "
> +  "%s(attribindex=%u > "
>"GL_MAX_VERTEX_ATTRIBS)",
> -  attribIndex);
> +  func, attribIndex);
>return;
> }
>
> FLUSH_VERTICES(ctx, 0);
>
> -   update_array_format(ctx, "glVertexAttribFormat",
> -   VERT_ATTRIB_GENERIC(attribIndex),
> -   legalTypes, 1, BGRA_OR_4, size, type, normalized,
> -   GL_FALSE, relativeOffset);
> +   update_array_format(ctx, func, VERT_ATTRIB_GENERIC(attribIndex),
> +   legalTypes, 1, maxSize, size, type, normalized,
> +   integer, relativeOffset);
>  }
>
>
>  void GLAPIENTRY
> -_mesa_VertexAttribIFormat(GLuint attribIndex, GLint size, GLenum type,
> -  GLuint relativeOffset)
> +_mesa_VertexAttribFormat(GLuint attribIndex, GLint size, GLenum type,
> + GLboolean normalized, GLuint relativeOffset)
>  {
> -   const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT |
> -  SHORT_BIT | UNSIGNED_SHORT_BIT |
> -  INT_BIT | UNSIGNED_INT_BIT);
> -
> -   GET_CURRENT_CONTEXT(ctx);
> -   ASSERT_OUTSIDE_BEGIN_END(ctx);
> -
> -   /* The ARB_vertex_attrib_binding spec says:
> -*
> -*"An INVALID_OPERATION error is generated under any of the
> following
> -* conditions:
> -* - if no vertex array object is currently bound (see section
> 2.10);
> -* - ..."
> -*/
> -   if (ctx->

Re: [Mesa-dev] [PATCH 06/22] mesa: Implement VertexArrayElementBuffer

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund  wrote:

> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  5 
>  src/mesa/main/arrayobj.c   | 34
> ++
>  src/mesa/main/arrayobj.h   |  2 ++
>  src/mesa/main/tests/dispatch_sanity.cpp|  1 +
>  4 files changed, 42 insertions(+)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index f92734d..a6ff206 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -396,5 +396,10 @@
>
> 
>
> +   
> +  
> +  
> +   
> +
>  
>  
> diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
> index 862bbb7..decdc51 100644
> --- a/src/mesa/main/arrayobj.c
> +++ b/src/mesa/main/arrayobj.c
> @@ -637,3 +637,37 @@ _mesa_IsVertexArray( GLuint id )
>
> return obj->EverBound;
>  }
> +
>
Since this looks like an entirely new function, it would be nice to have a
comment here saying something to the effect of "This is the
ARB_direct_state_access equivalent of
BindBuffer(GL_ELEMENT_ARRAY_BUFFER...)."  It took me a while to figure that
out.

> +void GLAPIENTRY
> +_mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   struct gl_vertex_array_object *vao;
> +   struct gl_buffer_object *bufObj;
> +
> +   ASSERT_OUTSIDE_BEGIN_END(ctx);
> +
> +   /* The GL_ARB_direct_state_access specification says:
> +*
> +*"An INVALID_OPERATION error is generated by
> VertexArrayElementBuffer
> +* if  is not [compatibility profile: zero or] the name of
> an
> +* existing vertex array object."
> +*/
> +   vao =_mesa_lookup_vao_err(ctx, vaobj, "glVertexArrayElementBuffer");
> +   if (!vao)
> +  return;
> +
> +   /* The GL_ARB_direct_state_access specification says:
> +*
> +*"An INVALID_OPERATION error is generated if  is not zero
> or
> +* the name of an existing buffer object."
> +*/
> +   if (buffer != 0)
> +  bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
> +  "glVertexArrayElementBuffer");
> +   else
> +  bufObj = ctx->Shared->NullBufferObj;
> +
> +   if (bufObj)
> +  _mesa_reference_buffer_object(ctx, &vao->IndexBufferObj, bufObj);
> +}
> diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
> index 1e7436b..748eaf5 100644
> --- a/src/mesa/main/arrayobj.h
> +++ b/src/mesa/main/arrayobj.h
> @@ -100,4 +100,6 @@ void GLAPIENTRY _mesa_CreateVertexArrays(GLsizei n,
> GLuint *arrays);
>
>  GLboolean GLAPIENTRY _mesa_IsVertexArray( GLuint id );
>
> +void GLAPIENTRY _mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint
> buffer);
> +
>  #endif /* ARRAYOBJ_H */
> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp
> b/src/mesa/main/tests/dispatch_sanity.cpp
> index 2b7d4cb..5926061 100644
> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> @@ -973,6 +973,7 @@ const struct function gl_core_functions_possible[] = {
> { "glCreateVertexArrays", 45, -1 },
> { "glDisableVertexArrayAttrib", 45, -1 },
> { "glEnableVertexArrayAttrib", 45, -1 },
> +   { "glVertexArrayElementBuffer", 45, -1 },
>
> /* GL_EXT_polygon_offset_clamp */
> { "glPolygonOffsetClampEXT", 11, -1 },
> --
> 1.8.5.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 02/22] mesa: Add _mesa_lookup_vao_err

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund  wrote:

> ---
>  src/mesa/main/arrayobj.c | 50
> 
>  src/mesa/main/arrayobj.h |  3 +++
>  2 files changed, 53 insertions(+)
>
> diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
> index 0c15630..ac081b0 100644
> --- a/src/mesa/main/arrayobj.c
> +++ b/src/mesa/main/arrayobj.c
> @@ -75,6 +75,56 @@ _mesa_lookup_vao(struct gl_context *ctx, GLuint id)
>
>
>  /**
> + * Looks up the array object for the given ID.
> + *
> + * Unlike _mesa_lookup_vao, this function generates a GL_INVALID_OPERATION
> + * error if the buffer object does not exist. It also returns the default
> + * array object when id is zero, and ctx is a compatibility profile
> context.
> + */
> +struct gl_vertex_array_object *
> +_mesa_lookup_vao_err(struct gl_context *ctx, GLuint id, const char
> *caller)
> +{
> +   /* The ARB_direct_state_access specification says:
> +*
> +*" is [compatibility profile:
> +* zero, indicating the default vertex array object, or]
> +* the name of the vertex array object."
> +*/
> +   if (id == 0) {
> +  if (ctx->API == API_OPENGL_CORE) {
> + _mesa_error(ctx, GL_INVALID_OPERATION,
> + "%s(zero is not valid vaobj name in a core profile "
> + "context)", caller);
>
Maybe a more concise error message such as "%s(id = 0 is invalid for core
profile)" ?

> + return NULL;
> +  }
> +
> +  return ctx->Array.DefaultVAO;
> +   } else {
> +  struct gl_vertex_array_object *vao =
> + (struct gl_vertex_array_object *)
> + _mesa_HashLookup(ctx->Array.Objects, id);
> +
> +  /* The ARB_direct_state_access specification says:
> +   *
> +   *"An INVALID_OPERATION error is generated if  is not
> +   * [compatibility profile: zero or] the name of an existing
> +   * vertex array object."
> +   */
> +  if (!vao || !vao->EverBound) {
> + const char *format = ctx->API == API_OPENGL_CORE ?
> +"%s(vaobj=%d is not the name of an existing vertex array
> object)" :
> +"%s(vaobj=%d is not zero or the name of an existing vertex "
> +"array object)";
>
Maybe more concise error messages like "%s(non-existent vaobj=%d)" and
"%s(non-existent, non-zero vaobj=%d)" ?

> + _mesa_error(ctx, GL_INVALID_OPERATION, format, caller, id);
> + return NULL;
> +  }
> +
> +  return vao;
> +   }
> +}
> +
> +
> +/**
>   * For all the vertex binding points in the array object, unbind any
> pointers
>   * to any buffer objects (VBOs).
>   * This is done just prior to array object destruction.
> diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
> index ae671e3..1e7436b 100644
> --- a/src/mesa/main/arrayobj.h
> +++ b/src/mesa/main/arrayobj.h
> @@ -49,6 +49,9 @@ extern struct gl_vertex_array_object *
>  _mesa_lookup_vao(struct gl_context *ctx, GLuint id);
>
>  extern struct gl_vertex_array_object *
> +_mesa_lookup_vao_err(struct gl_context *ctx, GLuint id, const char
> *caller);
> +
> +extern struct gl_vertex_array_object *
>  _mesa_new_vao(struct gl_context *ctx, GLuint name);
>
>  extern void
> --
> 1.8.5.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 01/22] mesa: Implement CreateVertexArrays

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund  wrote:

> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  7 +++
>  src/mesa/main/arrayobj.c   | 20 +++-
>  src/mesa/main/arrayobj.h   |  2 ++
>  src/mesa/main/tests/dispatch_sanity.cpp|  1 +
>  4 files changed, 25 insertions(+), 5 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index 641e68f..f5097e7 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -379,5 +379,12 @@
>
> 
>
> +   
> +
> +   
> +  
> +  
> +   
> +
>  
>  
> diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
> index 3c8ffb5..0c15630 100644
> --- a/src/mesa/main/arrayobj.c
> +++ b/src/mesa/main/arrayobj.c
> @@ -486,13 +486,14 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint
> *ids)
>   * \param vboOnly Will arrays have to reside in VBOs?
>   */
>
I'd maybe put a comment here about how, for simplicity in handling VAOs in
Mesa, we create the state vectors both for Gen and Create.  The only
difference is the state of ever bound.  The spec has the usual
interpretation of Gen as providing a reserved name rather than a created
object.

>  static void
> -gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays)
> +gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays,
> +  bool dsa, const char *func)
>  {
> GLuint first;
> GLint i;
>
> if (n < 0) {
> -  _mesa_error(ctx, GL_INVALID_VALUE, "glGenVertexArrays");
> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s(n < 0)", func);
>return;
> }
>
> @@ -509,9 +510,10 @@ gen_vertex_arrays(struct gl_context *ctx, GLsizei n,
> GLuint *arrays)
>
>obj = (*ctx->Driver.NewArrayObject)( ctx, name );
>if (!obj) {
> - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenVertexArrays");
> + _mesa_error(ctx, GL_OUT_OF_MEMORY, func);
>   return;
>}
> +  obj->EverBound = dsa;
>save_array_object(ctx, obj);
>arrays[i] = first + i;
> }
> @@ -526,7 +528,7 @@ void GLAPIENTRY
>  _mesa_GenVertexArrays(GLsizei n, GLuint *arrays)
>  {
> GET_CURRENT_CONTEXT(ctx);
> -   gen_vertex_arrays(ctx, n, arrays);
> +   gen_vertex_arrays(ctx, n, arrays, false, "glGenVertexArrays");
>  }
>
>
> @@ -538,7 +540,15 @@ void GLAPIENTRY
>  _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *arrays)
>  {
> GET_CURRENT_CONTEXT(ctx);
> -   gen_vertex_arrays(ctx, n, arrays);
> +   gen_vertex_arrays(ctx, n, arrays, false, "glGenVertexArraysAPPLE");
> +}
> +
> +
> +void GLAPIENTRY
> +_mesa_CreateVertexArrays(GLsizei n, GLuint *arrays)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +   gen_vertex_arrays(ctx, n, arrays, true, "glCreateVertexArrays");
>  }
>
>
> diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
> index 3c1f918..ae671e3 100644
> --- a/src/mesa/main/arrayobj.h
> +++ b/src/mesa/main/arrayobj.h
> @@ -93,6 +93,8 @@ void GLAPIENTRY _mesa_GenVertexArrays(GLsizei n, GLuint
> *arrays);
>
>  void GLAPIENTRY _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *buffer);
>
> +void GLAPIENTRY _mesa_CreateVertexArrays(GLsizei n, GLuint *arrays);
> +
>  GLboolean GLAPIENTRY _mesa_IsVertexArray( GLuint id );
>
>  #endif /* ARRAYOBJ_H */
> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp
> b/src/mesa/main/tests/dispatch_sanity.cpp
> index 59ebb21..cc6b505 100644
> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> @@ -970,6 +970,7 @@ const struct function gl_core_functions_possible[] = {
> { "glTextureStorage3DMultisample", 45, -1 },
> { "glTextureBuffer", 45, -1 },
> { "glTextureBufferRange", 45, -1 },
> +   { "glCreateVertexArrays", 45, -1 },
>
> /* GL_EXT_polygon_offset_clamp */
> { "glPolygonOffsetClampEXT", 11, -1 },
> --
> 1.8.5.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/22] Add DSA support for vertex array objects

2015-03-20 Thread Laura Ekstrand
Except for a few minor nits on patches 1 2, 6, 10, 18, 20, and 21, this
looks good.

With those fixed,

Reviewed-by: Laura Ekstrand 

On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund  wrote:

> This series implements the VAO portion of GL_ARB_direct_state_access.
>
> I started working on this before the decision was made to only expose
> the extension in the core profile, so this series implements both the
> core and compatibility behavior.  The compatibility support actually
> only amounts to a couple of lines of code in _mesa_lookup_vao_err().
> Everything else was already implemented in the now refactored selector-
> based entry points.
>
> There are a couple of things worth noting. The first is that
> VertexArrayElementBuffer requires that the buffer object exists, while
> VertexArrayVertexBuffer only requires that the ID has been returned by
> GenBuffers or CreateBuffers.  I'm not sure if this is a mistake or not,
> because the specfication really is quite explicit about it.  The second
> is that the specification can't agree with itself about which parameters
> GetVertexArrayIndexediv accepts.  See the comments in patch 21 for the
> details.  I made the interpretation that the intent is that it should
> be possible to query all states that can be set with a DSA function.
> The new piglit tests also depend on this.
>
> This series is also available at:
>
> git://people.freedesktop.org/~fredrik/mesa arb-direct-state-access
>
> I plan on posting the piglit tests shortly.
>
> Fredrik Höglund (22):
>   mesa: Implement CreateVertexArrays
>   mesa: Add _mesa_lookup_vao_err
>   mesa: Keep track of the last looked-up VAO
>   mesa: Implement DisableVertexArrayAttrib
>   mesa: Implement EnableVertexArrayAttrib
>   mesa: Implement VertexArrayElementBuffer
>   mesa: Add a vao parameter to bind_vertex_buffer
>   mesa: Implement VertexArrayVertexBuffer
>   mesa: Implement VertexArrayVertexBuffers
>   mesa: Refactor VertexAttrib[I|L]Format
>   mesa: Add a vao parameter to update_array_format
>   mesa: Implement VertexArrayAttrib[I|L]Format
>   mesa: Add a vao parameter to vertex_attrib_binding
>   mesa: Implement VertexArrayAttribBinding
>   mesa: Add a vao parameter to vertex_binding_divisor
>   mesa: Implement VertexArrayBindingDivisor
>   mesa: Implement GetVertexArrayiv
>   mesa: Add a vao parameter to get_vertex_array_attrib
>   mesa: Add a Doubles field in gl_vertex_attrib_array
>   mesa: Add support for quering GL_VERTEX_ATTRIB_ARRAY_LONG
>   mesa: Implement GetVertexArrayIndexed[64]iv
>   docs: Update the ARB_direct_state_access status
>
>  docs/GL3.txt   |   2 +-
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  96 +++
>  src/mesa/main/arrayobj.c   | 151 +++-
>  src/mesa/main/arrayobj.h   |   9 +
>  src/mesa/main/mtypes.h |   5 +
>  src/mesa/main/tests/dispatch_sanity.cpp|  14 +
>  src/mesa/main/varray.c | 757 ++--
>  src/mesa/main/varray.h |  49 ++
>  8 files changed, 876 insertions(+), 207 deletions(-)
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 16/17] main: Added entry points for NamedRenderbufferStorage/Multisample

2015-03-20 Thread Laura Ekstrand
On Thu, Mar 19, 2015 at 11:13 AM, Martin Peres  wrote:

> v2: Review from Laura Ekstrand
> - get rid of a change that should not have happened in this patch
> - improve the error messages
> - fix alignments
> - fix a capitalization in a function name in an error message
>
> Signed-off-by: Martin Peres 
> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  15 +++
>  src/mesa/main/fbobject.c   | 161
> ++---
>  src/mesa/main/fbobject.h   |  13 +-
>  src/mesa/main/tests/dispatch_sanity.cpp|   2 +
>  4 files changed, 148 insertions(+), 43 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index d4e1f7c..8a092d6 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -159,6 +159,21 @@
>
> 
>
> +   
> +  
> +  
> +  
> +  
> +   
> +
> +   
> +  
> +  
> +  
> +  
> +  
> +   
> +
> 
>
>
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index ae0dd76..fc76c4a 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -1785,40 +1785,17 @@ invalidate_rb(GLuint key, void *data, void
> *userData)
>
>
>  /**
> - * Helper function used by _mesa_RenderbufferStorage() and
> - * _mesa_RenderbufferStorageMultisample().
> - * samples will be NO_SAMPLES if called by _mesa_RenderbufferStorage().
> + * Helper function used by renderbuffer_storage_direct() and
> + * renderbuffer_storage_target().
> + * samples will be NO_SAMPLES if called by a non-multisample function.
>   */
>  static void
> -renderbuffer_storage(GLenum target, GLenum internalFormat,
> - GLsizei width, GLsizei height, GLsizei samples)
> +renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
> + GLenum internalFormat, GLsizei width,
> + GLsizei height, GLsizei samples, const char *func)
>  {
> -   const char *func = samples == NO_SAMPLES ?
> -  "glRenderbufferStorage" : "glRenderbufferStorageMultisample";
> -   struct gl_renderbuffer *rb;
> GLenum baseFormat;
> GLenum sample_count_error;
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (MESA_VERBOSE & VERBOSE_API) {
> -  if (samples == NO_SAMPLES)
> - _mesa_debug(ctx, "%s(%s, %s, %d, %d)\n",
> - func,
> - _mesa_lookup_enum_by_nr(target),
> - _mesa_lookup_enum_by_nr(internalFormat),
> - width, height);
> -  else
> - _mesa_debug(ctx, "%s(%s, %s, %d, %d, %d)\n",
> - func,
> - _mesa_lookup_enum_by_nr(target),
> - _mesa_lookup_enum_by_nr(internalFormat),
> - width, height, samples);
> -   }
> -
> -   if (target != GL_RENDERBUFFER_EXT) {
> -  _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func);
> -  return;
> -   }
>
> baseFormat = _mesa_base_fbo_format(ctx, internalFormat);
> if (baseFormat == 0) {
> @@ -1828,12 +1805,14 @@ renderbuffer_storage(GLenum target, GLenum
> internalFormat,
> }
>
> if (width < 0 || width > (GLsizei) ctx->Const.MaxRenderbufferSize) {
> -  _mesa_error(ctx, GL_INVALID_VALUE, "%s(width)", func);
> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s(invalid width %d)", func,
> +  width);
>return;
> }
>
> if (height < 0 || height > (GLsizei) ctx->Const.MaxRenderbufferSize) {
> -  _mesa_error(ctx, GL_INVALID_VALUE, "%s(height)", func);
> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s(invalid height %d)", func,
> +  height);
>return;
> }
>
> @@ -1845,7 +1824,7 @@ renderbuffer_storage(GLenum target, GLenum
> internalFormat,
>/* check the sample count;
> * note: driver may choose to use more samples than what's requested
> */
> -  sample_count_error = _mesa_check_sample_count(ctx, target,
> +  sample_count_error = _mesa_check_sample_count(ctx, GL_RENDERBUFFER,
>  internalFormat, samples);
>if (sample_count_error != GL_NO_ERROR) {
>   _mesa_error(ctx, sample_count_error, "%s(samples)", func);
> @@ -1853,7 +1832,6 @@ renderbuffer_storage(GLenum target, GLenum
> internalFormat,
>}
> }
>
> -   rb = ctx->CurrentRenderbuffer;
>
I would move this 

Re: [Mesa-dev] [PATCH v2] mesa: Make sure the buffer exists in _mesa_lookup_bufferobj_err

2015-03-19 Thread Laura Ekstrand
Reviewed-by: Laura Ekstrand 

On Thu, Mar 19, 2015 at 5:06 PM, Fredrik Höglund  wrote:

> Generate GL_INVALID_OPERATION and return NULL when the buffer object
> hasn't been created.  All callers expect this.
>
> v2: Use a more concise error message.
>
> Cc: Laura Ekstrand 
> ---
>  src/mesa/main/bufferobj.c | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 78d3d78..9658770 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -1003,8 +1003,8 @@ _mesa_lookup_bufferobj_locked(struct gl_context
> *ctx, GLuint buffer)
>
>  /**
>   * A convenience function for direct state access functions that throws
> - * GL_INVALID_OPERATION if buffer is not the name of a buffer object in
> the
> - * hash table.
> + * GL_INVALID_OPERATION if buffer is not the name of an existing
> + * buffer object.
>   */
>  struct gl_buffer_object *
>  _mesa_lookup_bufferobj_err(struct gl_context *ctx, GLuint buffer,
> @@ -1013,9 +1013,11 @@ _mesa_lookup_bufferobj_err(struct gl_context *ctx,
> GLuint buffer,
> struct gl_buffer_object *bufObj;
>
> bufObj = _mesa_lookup_bufferobj(ctx, buffer);
> -   if (!bufObj)
> +   if (!bufObj || bufObj == &DummyBufferObject) {
>_mesa_error(ctx, GL_INVALID_OPERATION,
> -  "%s(non-generated buffer name %u)", caller, buffer);
> +  "%s(non-existent buffer object %u)", caller, buffer);
> +  return NULL;
> +   }
>
> return bufObj;
>  }
> --
> 2.1.4
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/2] mesa: use more descriptive error messages for glUniform errors

2015-03-19 Thread Laura Ekstrand
On Thu, Mar 19, 2015 at 7:53 AM, Brian Paul  wrote:

> Different errors for type mismatches, size mismatches and matrix/
> non-matrix mismatches.  Use a common format of "uniformName"@location
> in the messags.
> ---
>  src/mesa/main/uniform_query.cpp | 69
> ++---
>  1 file changed, 65 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/uniform_query.cpp
> b/src/mesa/main/uniform_query.cpp
> index 9f82de9..2ab5528 100644
> --- a/src/mesa/main/uniform_query.cpp
> +++ b/src/mesa/main/uniform_query.cpp
> @@ -260,8 +260,8 @@ validate_uniform_parameters(struct gl_context *ctx,
> if (uni->array_elements == 0) {
>if (count > 1) {
>   _mesa_error(ctx, GL_INVALID_OPERATION,
> - "%s(count > 1 for non-array, location=%d)",
> - caller, location);
> + "%s(count = %u for non-array \"%s\"@%d)",
>
How about "%s(count=%u > 1 ..." for a little more clarity?  It's up to you.

> + caller, count, uni->name, location);
>   return NULL;
>}
>
> @@ -601,6 +601,46 @@ _mesa_propagate_uniforms_to_driver_storage(struct
> gl_uniform_storage *uni,
> }
>  }
>
> +
> +/**
> + * Return printable string for a given GLSL_TYPE_x
> + */
> +static const char *
> +glsl_type_name(enum glsl_base_type type)
> +{
> +   switch (type) {
> +   case GLSL_TYPE_UINT:
> +  return "uint";
> +   case GLSL_TYPE_INT:
> +  return "int";
> +   case GLSL_TYPE_FLOAT:
> +  return "float";
> +   case GLSL_TYPE_DOUBLE:
> +  return "double";
> +   case GLSL_TYPE_BOOL:
> +  return "bool";
> +   case GLSL_TYPE_SAMPLER:
> +  return "sampler";
> +   case GLSL_TYPE_IMAGE:
> +  return "image";
> +   case GLSL_TYPE_ATOMIC_UINT:
> +  return "atomic_uint";
> +   case GLSL_TYPE_STRUCT:
> +  return "struct";
> +   case GLSL_TYPE_INTERFACE:
> +  return "interface";
> +   case GLSL_TYPE_ARRAY:
> +  return "array";
> +   case GLSL_TYPE_VOID:
> +  return "void";
> +   case GLSL_TYPE_ERROR:
> +  return "error";
> +   default:
> +  return "other";
> +   }
> +}
> +
> +
>  /**
>   * Called via glUniform*() functions.
>   */
> @@ -620,11 +660,28 @@ _mesa_uniform(struct gl_context *ctx, struct
> gl_shader_program *shProg,
> if (uni == NULL)
>return;
>
> +   if (uni->type->is_matrix()) {
> +  /* Can't set matrix uniforms (like mat4) with glUniform */
> +  _mesa_error(ctx, GL_INVALID_OPERATION,
> +  "glUniform%u(uniform \"%s\"@%d is matrix)",
> +  src_components, uni->name, location);
> +  return;
> +   }
> +
> /* Verify that the types are compatible.
>  */
> const unsigned components = uni->type->is_sampler()
>? 1 : uni->type->vector_elements;
>
> +   if (components != src_components) {
> +  /* glUniformN() must match float/vecN type */
> +  _mesa_error(ctx, GL_INVALID_OPERATION,
> +  "glUniform%u(\"%s\"@%u has %u components, not %u)",
> +  src_components, uni->name, location,
> +  components, src_components);
> +  return;
> +   }
> +
> bool match;
> switch (uni->type->base_type) {
> case GLSL_TYPE_BOOL:
> @@ -639,8 +696,12 @@ _mesa_uniform(struct gl_context *ctx, struct
> gl_shader_program *shProg,
>break;
> }
>
> -   if (uni->type->is_matrix() || components != src_components || !match) {
> -  _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(type mismatch)");
> +   if (!match) {
> +  _mesa_error(ctx, GL_INVALID_OPERATION,
> +  "glUniform%u(\"%s\"@%d is %s, not %s)",
> +  src_components, uni->name, location,
> +  glsl_type_name(uni->type->base_type),
> +  glsl_type_name(basicType));
>return;
> }
>
> --
> 1.9.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: Make sure the buffer exists in _mesa_lookup_bufferobj_err

2015-03-19 Thread Laura Ekstrand
You are right; I missed that subtle OpenGL definition of "exist" in the
lookup functions.

On Thu, Mar 19, 2015 at 3:48 PM, Fredrik Höglund  wrote:

> Generate GL_INVALID_OPERATION and return NULL when the buffer object
> hasn't been created.  All callers expect this.
>
> Cc: Laura Ekstrand 
> ---
>  src/mesa/main/bufferobj.c | 11 +++
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 78d3d78..41455f3 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -1003,8 +1003,8 @@ _mesa_lookup_bufferobj_locked(struct gl_context
> *ctx, GLuint buffer)
>
>  /**
>   * A convenience function for direct state access functions that throws
> - * GL_INVALID_OPERATION if buffer is not the name of a buffer object in
> the
> - * hash table.
> + * GL_INVALID_OPERATION if buffer is not the name of an existing
> + * buffer object.
>   */
>  struct gl_buffer_object *
>  _mesa_lookup_bufferobj_err(struct gl_context *ctx, GLuint buffer,
> @@ -1013,9 +1013,12 @@ _mesa_lookup_bufferobj_err(struct gl_context *ctx,
> GLuint buffer,
> struct gl_buffer_object *bufObj;
>
> bufObj = _mesa_lookup_bufferobj(ctx, buffer);
> -   if (!bufObj)
> +   if (!bufObj || bufObj == &DummyBufferObject) {
>_mesa_error(ctx, GL_INVALID_OPERATION,
> -  "%s(non-generated buffer name %u)", caller, buffer);
>
This should be more concise.  How about "%s(non-existent buffer object %u)"
?

> +  "%s(%u is not the name of an existing buffer object)",
> +  caller, buffer);
> +  return NULL;
> +   }
>
> return bufObj;
>  }
> --
> 2.1.4
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 08/16] main: Added entry point for glGetTransformFeedbacki_v

2015-03-19 Thread Laura Ekstrand
Oops, apparently I sent it to just you.


Reviewed-by: Laura Ekstrand 

On Thu, Mar 19, 2015 at 11:15 AM, Martin Peres  wrote:

> Laura, can I get your R-b on this one?
>
>
> On 16/02/15 16:13, Martin Peres wrote:
>
>> v2: Review from Laura Ekstrand
>> - use the transform feedback object lookup wrapper
>>
>> v3:
>> - use the new name of _mesa_lookup_transform_feedback_object_err
>>
>> Signed-off-by: Martin Peres 
>> ---
>>   src/mapi/glapi/gen/ARB_direct_state_access.xml |  7 +++
>>   src/mesa/main/tests/dispatch_sanity.cpp|  1 +
>>   src/mesa/main/transformfeedback.c  | 29
>> ++
>>   src/mesa/main/transformfeedback.h  |  4 
>>   4 files changed, 41 insertions(+)
>>
>> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> index 1ac4386..935e088 100644
>> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> @@ -34,6 +34,13 @@
>> 
>>  
>>   +   
>> +  
>> +  
>> +  
>> +  
>> +   
>> +
>>  
>>
>> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp
>> b/src/mesa/main/tests/dispatch_sanity.cpp
>> index ba36d28..d5535e9 100644
>> --- a/src/mesa/main/tests/dispatch_sanity.cpp
>> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
>> @@ -959,6 +959,7 @@ const struct function gl_core_functions_possible[] = {
>>  { "glTransformFeedbackBufferBase", 45, -1 },
>>  { "glTransformFeedbackBufferRange", 45, -1 },
>>  { "glGetTransformFeedbackiv", 45, -1 },
>> +   { "glGetTransformFeedbacki_v", 45, -1 },
>>  { "glCreateTextures", 45, -1 },
>>  { "glTextureStorage1D", 45, -1 },
>>  { "glTextureStorage2D", 45, -1 },
>> diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/
>> transformfeedback.c
>> index 9c9cba2..ce9a6d4 100644
>> --- a/src/mesa/main/transformfeedback.c
>> +++ b/src/mesa/main/transformfeedback.c
>> @@ -1228,3 +1228,32 @@ _mesa_GetTransformFeedbackiv(GLuint xfb, GLenum
>> pname, GLint *param)
>>  "glGetTransformFeedbackiv(pname=%i)", pname);
>>   }
>>   }
>> +
>> +extern void GLAPIENTRY
>> +_mesa_GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index,
>> +  GLint *param)
>> +{
>> +   struct gl_transform_feedback_object *obj;
>> +   GET_CURRENT_CONTEXT(ctx);
>> +
>> +   obj = lookup_transform_feedback_object_err(ctx, xfb,
>> +
>> "glGetTransformFeedbacki_v");
>> +   if(!obj) {
>> +  return;
>> +   }
>> +
>> +   if (index >= ctx->Const.MaxTransformFeedbackBuffers) {
>> +  _mesa_error(ctx, GL_INVALID_VALUE,
>> +  "glGetTransformFeedbacki_v(index=%i)", index);
>> +  return;
>> +   }
>> +
>> +   switch(pname) {
>> +   case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
>> +  *param = obj->BufferNames[index];
>> +  break;
>> +   default:
>> +  _mesa_error(ctx, GL_INVALID_ENUM,
>> +  "glGetTransformFeedbacki_v(pname=%i)", pname);
>> +   }
>> +}
>> diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/
>> transformfeedback.h
>> index ba00636..9936c68 100644
>> --- a/src/mesa/main/transformfeedback.h
>> +++ b/src/mesa/main/transformfeedback.h
>> @@ -158,4 +158,8 @@ _mesa_TransformFeedbackBufferRange(GLuint xfb,
>> GLuint index, GLuint buffer,
>>   extern void GLAPIENTRY
>>   _mesa_GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param);
>>   +extern void GLAPIENTRY
>> +_mesa_GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index,
>> +  GLint *param);
>> +
>>   #endif /* TRANSFORM_FEEDBACK_H */
>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 17/17] docs: Update progress on ARB_direct_state_access.

2015-03-19 Thread Laura Ekstrand
Program pipelines should just say "DONE."  Query objects should say "DONE
(will require changes when ...)."

On Thu, Mar 19, 2015 at 11:13 AM, Martin Peres  wrote:

> Signed-off-by: Martin Peres 
> ---
>  docs/GL3.txt | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/docs/GL3.txt b/docs/GL3.txt
> index 93fa60d..a0aa251 100644
> --- a/docs/GL3.txt
> +++ b/docs/GL3.txt
> @@ -193,14 +193,14 @@ GL 4.5, GLSL 4.50:
>GL_ARB_cull_distance not started
>GL_ARB_derivative_controlDONE (i965, nv50,
> nvc0, r600)
>GL_ARB_direct_state_access   started
> -  - Transform Feedback object  started (Martin
> Peres)
> +  - Transform Feedback object  DONE
>- Buffer object  DONE
>- Framebuffer object started (Laura
> Ekstrand)
> -  - Renderbuffer objectstarted (Martin
> Peres)
> +  - Renderbuffer objectDONE
>- Texture object DONE
>- Vertex array objectstarted (Fredrik
> Höglund)
> -  - Sampler object started (Martin
> Peres)
> -  - Program Pipeline objectstarted (Martin
> Peres)
> +  - Sampler object DONE
> +  - Program Pipeline objectDONE (will require
> changes when GL_ARB_query_buffer_object lands)
>- Query object   started (Martin
> Peres)
>GL_ARB_get_texture_sub_image started (Brian
> Paul)
>GL_ARB_shader_texture_image_samples  not started
> --
> 2.3.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] main: Add TEXTURE_CUBE_MAP support in CopyTextureSubImage3D.

2015-03-19 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 3:15 PM, Anuj Phogat  wrote:

> On Wed, Mar 18, 2015 at 1:06 PM, Laura Ekstrand 
> wrote:
> > So it turns out that this doesn't actually fix any bugs or add any
> features,
> > stictly speaking. However, it does avoid a lot of kludginess.
> Previously, if
> > you called
> >
> > glCopyTextureSubImage3D(texcube, 0, 0, 0, zoffset = 3, ...
> >
> > it would grab the texture image object for face = 0 in teximage.c
> instead of
> > the desired face = 3.  But Line 274 of brw_blorp_blit.cpp would correct
> for
> > this by updating the slice to 3.
> >
> > This commit does the correct thing before calling any drivers,
> > which should make the functionality much more robust and uniform across
> all
> > drivers.
> Idea behind this patch looks good to me.
> > ---
> >  src/mesa/main/teximage.c | 15 ---
> >  1 file changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> > index 64e4816..8b56d5b 100644
> > --- a/src/mesa/main/teximage.c
> > +++ b/src/mesa/main/teximage.c
> > @@ -4254,9 +4254,18 @@ _mesa_CopyTextureSubImage3D(GLuint texture, GLint
> level,
> >return;
> > }
> >
> > -   _mesa_copy_texture_sub_image(ctx, 3, texObj, texObj->Target, level,
> > -xoffset, yoffset, zoffset,
> > -x, y, width, height, true);
> > +   if (texObj->Target == GL_TEXTURE_CUBE_MAP) {
> > +  /* Act like CopyTexSubImage2D */
> > +  _mesa_copy_texture_sub_image(ctx, 2, texObj,
> > +   GL_TEXTURE_CUBE_MAP_POSITIVE_X +
> zoffset,
> > +   level,
> > +   xoffset, yoffset, 0,
> > +   x, y, width, height, false);
> Parameters in above three lines can easily fit in 2 lines.
>
This has been fixed.

> Passing dsa=false and dims = 2 will print incorrect _mesa_debug  /
> _mesa_error
> message in _mesa_copy_texture_sub_image() and
> copytexsubimage_error_check().
>
I just sent out a separate patch that fixes this.

>
> > +   }
> > +   else
> > +  _mesa_copy_texture_sub_image(ctx, 3, texObj, texObj->Target,
> level,
> > +   xoffset, yoffset, zoffset,
> > +   x, y, width, height, true);
> >  }
> >
> >  static bool
> > --
> > 2.1.0
> >
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] main: Simplify debug messages for CopyTex*SubImage*D.

2015-03-19 Thread Laura Ekstrand
---
 src/mesa/main/teximage.c | 86 +---
 src/mesa/main/teximage.h |  3 +-
 2 files changed, 39 insertions(+), 50 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 8b56d5b..7f0f7b7 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2826,10 +2826,9 @@ copytexsubimage_error_check(struct gl_context *ctx, 
GLuint dimensions,
 const struct gl_texture_object *texObj,
 GLenum target, GLint level,
 GLint xoffset, GLint yoffset, GLint zoffset,
-GLint width, GLint height, bool dsa)
+GLint width, GLint height, const char *caller)
 {
struct gl_texture_image *texImage;
-   const char *suffix = dsa ? "ture" : "";
 
/* Check that the source buffer is complete */
if (_mesa_is_user_fbo(ctx->ReadBuffer)) {
@@ -2838,31 +2837,26 @@ copytexsubimage_error_check(struct gl_context *ctx, 
GLuint dimensions,
   }
   if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
  _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
- "glCopyTex%sSubImage%dD(invalid readbuffer)",
- suffix, dimensions);
+ "%s(invalid readbuffer)", caller);
  return GL_TRUE;
   }
 
   if (ctx->ReadBuffer->Visual.samples > 0) {
  _mesa_error(ctx, GL_INVALID_OPERATION,
-"glCopyTex%sSubImage%dD(multisample FBO)", suffix,
-dimensions);
+"%s(multisample FBO)", caller);
  return GL_TRUE;
   }
}
 
/* Check level */
if (level < 0 || level >= _mesa_max_texture_levels(ctx, target)) {
-  _mesa_error(ctx, GL_INVALID_VALUE,
-  "glCopyTex%sSubImage%dD(level=%d)", suffix,
-  dimensions, level);
+  _mesa_error(ctx, GL_INVALID_VALUE, "%s(level=%d)", caller, level);
   return GL_TRUE;
}
 
/* Get dest image pointers */
if (!texObj) {
-  _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTex%sSubImage%dD()",
-  suffix, dimensions);
+  _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s()", caller);
   return GL_TRUE;
}
 
@@ -2870,37 +2864,33 @@ copytexsubimage_error_check(struct gl_context *ctx, 
GLuint dimensions,
if (!texImage) {
   /* destination image does not exist */
   _mesa_error(ctx, GL_INVALID_OPERATION,
-  "glCopyTex%sSubImage%dD(invalid texture image)",
-  suffix, dimensions);
+  "%s(invalid texture image)", caller);
   return GL_TRUE;
}
 
if (error_check_subtexture_dimensions(ctx, dimensions, texImage,
  xoffset, yoffset, zoffset,
- width, height, 1, dsa ?
- "glCompressedTextureSubImage" :
- "glCompressedTexSubImage")) {
+ width, height, 1, caller)) {
   return GL_TRUE;
}
 
if (_mesa_is_format_compressed(texImage->TexFormat)) {
   if (compressedteximage_only_format(ctx, texImage->InternalFormat)) {
  _mesa_error(ctx, GL_INVALID_OPERATION,
-   "glCopyTex%sSubImage%dD(no compression for format)",
-   suffix, dimensions);
+   "%s(no compression for format)", caller);
  return GL_TRUE;
   }
}
 
if (texImage->InternalFormat == GL_YCBCR_MESA) {
-  _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTex%sSubImage2D", suffix);
+  _mesa_error(ctx, GL_INVALID_OPERATION, "%s()", caller);
   return GL_TRUE;
}
 
if (!_mesa_source_buffer_exists(ctx, texImage->_BaseFormat)) {
   _mesa_error(ctx, GL_INVALID_OPERATION,
-  "glCopyTex%sSubImage%dD(missing readbuffer, format=0x%x)",
-  suffix, dimensions, texImage->_BaseFormat);
+  "%s(missing readbuffer, format=0x%x)", caller,
+  texImage->_BaseFormat);
   return GL_TRUE;
}
 
@@ -2918,8 +2908,7 @@ copytexsubimage_error_check(struct gl_context *ctx, 
GLuint dimensions,
   if (_mesa_is_format_integer_color(rb->Format) !=
   _mesa_is_format_integer_color(texImage->TexFormat)) {
  _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTex%sSubImage%dD(integer vs non-integer)",
- suffix, dimensions);
+ "%s(integer vs non-integer)", caller);
  return GL_TRUE;
   }
}
@@ -4043,15 +4032,14 @@ _mesa_copy_texture_sub_image(struct gl_context *ctx, 
GLuint dims,
  GLint xoffset, GLint yoffset, GLint zoffset,
  GLint x, GLint y,
  GLsizei width, GLsizei height,
- bool dsa)
+ const char *caller)
 {
  

Re: [Mesa-dev] [PATCH 10/16] main: Added entry point for glCreateQueries

2015-03-19 Thread Laura Ekstrand
Too much debugging in gdb.

On Thu, Mar 19, 2015 at 9:35 AM, Martin Peres 
wrote:

> On 27/02/15 01:20, Laura Ekstrand wrote:
>
>>
>>
>> On Mon, Feb 16, 2015 at 6:14 AM, Martin Peres <
>> martin.pe...@linux.intel.com <mailto:martin.pe...@linux.intel.com>>
>> wrote:
>>
>> Signed-off-by: Martin Peres > <mailto:martin.pe...@linux.intel.com>>
>>
>> ---
>>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  8 +++
>>  src/mesa/main/queryobj.c   | 76
>> +++---
>>  src/mesa/main/queryobj.h   |  2 +
>>  src/mesa/main/tests/dispatch_sanity.cpp|  1 +
>>  4 files changed, 80 insertions(+), 7 deletions(-)
>>
>> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> index 340dbba..652e8bc 100644
>> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> @@ -308,5 +308,13 @@
>>
>> 
>>
>> +   
>> +
>> +   
>> +  
>> +  
>> +  
>> +   
>> +
>>  
>>  
>> diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
>> index 17eaaac..1bb74c9 100644
>> --- a/src/mesa/main/queryobj.c
>> +++ b/src/mesa/main/queryobj.c
>> @@ -188,18 +188,22 @@ get_query_binding_point(struct gl_context
>> *ctx, GLenum target, GLuint index)
>> }
>>  }
>>
>> -
>> -void GLAPIENTRY
>> -_mesa_GenQueries(GLsizei n, GLuint *ids)
>> +/**
>> + * Create $n query objects and store them in *ids. Make them of
>> type $target
>> + * if dsa is set. Called from _mesa_GenQueries() and
>> _mesa_CreateQueries().
>> + */
>> +static void
>> +create_queries(struct gl_context *ctx, GLenum target, GLsizei n,
>> GLuint *ids,
>> +   bool dsa)
>>  {
>> +   const char *func = dsa ? "glGenQueries" : "glCreateQueries";
>> GLuint first;
>> -   GET_CURRENT_CONTEXT(ctx);
>>
>> if (MESA_VERBOSE & VERBOSE_API)
>> -  _mesa_debug(ctx, "glGenQueries(%d)\n", n);
>> +  _mesa_debug(ctx, "%s(%d)\n", func, n);
>>
>> if (n < 0) {
>> -  _mesa_error(ctx, GL_INVALID_VALUE, "glGenQueriesARB(n < 0)");
>> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s(n < 0)", func);
>>return;
>> }
>>
>> @@ -210,8 +214,12 @@ _mesa_GenQueries(GLsizei n, GLuint *ids)
>>   struct gl_query_object *q
>>  = ctx->Driver.NewQueryObject(ctx, first + i);
>>   if (!q) {
>> -_mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenQueriesARB");
>> +_mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
>>  return;
>> + } else if (dsa) {
>> +/* Do the equivalent of binding the buffer with a
>> target */
>> +q->Target = target;
>> +q->EverBound = GL_TRUE;
>>   }
>>   ids[i] = first + i;
>>   _mesa_HashInsert(ctx->Query.QueryObjects, first + i, q);
>> @@ -219,6 +227,36 @@ _mesa_GenQueries(GLsizei n, GLuint *ids)
>> }
>>  }
>>
>> +void GLAPIENTRY
>> +_mesa_GenQueries(GLsizei n, GLuint *ids)
>> +{
>> +   GET_CURRENT_CONTEXT(ctx);
>> +   create_queries(ctx, 0, n, ids, false);
>> +}
>> +
>> +void GLAPIENTRY
>> +_mesa_CreateQueries(GLenum target, GLsizei n, GLuint *ids)
>> +{
>> +   GET_CURRENT_CONTEXT(ctx);
>> +
>> +   switch (target) {
>> +   case GL_SAMPLES_PASSED:
>> +   case GL_ANY_SAMPLES_PASSED:
>> +   case GL_ANY_SAMPLES_PASSED_CONSERVATIVE:
>> +   case GL_TIME_ELAPSED:
>> +   case GL_TIMESTAMP:
>> +   case GL_PRIMITIVES_GENERATED:
>> +   case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
>> +  break;
>> +   default:
>> +  _mesa_error(ctx, GL_INVALID_ENUM, "glCreateQueries(invalid
>> target = %i)",
>> +  target);
>>
>> I think it would be nicer to have "invalid target = %

[Mesa-dev] [PATCH] docs: Update progress on ARB_direct_state_access.

2015-03-18 Thread Laura Ekstrand
---
 docs/GL3.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index 5d59341..fcbb213 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -194,10 +194,10 @@ GL 4.5, GLSL 4.50:
   GL_ARB_derivative_controlDONE (i965, nv50, nvc0, 
r600)
   GL_ARB_direct_state_access   started
   - Transform Feedback object  started (Martin Peres)
-  - Buffer object  started (Laura Ekstrand)
+  - Buffer object  DONE
   - Framebuffer object started (Laura Ekstrand)
   - Renderbuffer objectstarted (Martin Peres)
-  - Texture object started (Laura Ekstrand)
+  - Texture object DONE
   - Vertex array objectstarted (Fredrik 
Höglund)
   - Sampler object started (Martin Peres)
   - Program Pipeline objectstarted (Martin Peres)
-- 
2.1.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] main: Add TEXTURE_CUBE_MAP support in CopyTextureSubImage3D.

2015-03-18 Thread Laura Ekstrand
So it turns out that this doesn't actually fix any bugs or add any features,
stictly speaking. However, it does avoid a lot of kludginess.  Previously, if
you called

glCopyTextureSubImage3D(texcube, 0, 0, 0, zoffset = 3, ...

it would grab the texture image object for face = 0 in teximage.c instead of
the desired face = 3.  But Line 274 of brw_blorp_blit.cpp would correct for
this by updating the slice to 3.

This commit does the correct thing before calling any drivers,
which should make the functionality much more robust and uniform across all
drivers.
---
 src/mesa/main/teximage.c | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 64e4816..8b56d5b 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -4254,9 +4254,18 @@ _mesa_CopyTextureSubImage3D(GLuint texture, GLint level,
   return;
}
 
-   _mesa_copy_texture_sub_image(ctx, 3, texObj, texObj->Target, level,
-xoffset, yoffset, zoffset,
-x, y, width, height, true);
+   if (texObj->Target == GL_TEXTURE_CUBE_MAP) {
+  /* Act like CopyTexSubImage2D */
+  _mesa_copy_texture_sub_image(ctx, 2, texObj,
+   GL_TEXTURE_CUBE_MAP_POSITIVE_X + zoffset,
+   level,
+   xoffset, yoffset, 0,
+   x, y, width, height, false);
+   }
+   else
+  _mesa_copy_texture_sub_image(ctx, 3, texObj, texObj->Target, level,
+   xoffset, yoffset, zoffset,
+   x, y, width, height, true);
 }
 
 static bool
-- 
2.1.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] Fwd: [PATCH 12/16] main: Added entry point for glCreateProgramPipelines

2015-03-17 Thread Laura Ekstrand
-- Forwarded message --
From: Laura Ekstrand 
Date: Thu, Feb 26, 2015 at 3:43 PM
Subject: Re: [Mesa-dev] [PATCH 12/16] main: Added entry point for
glCreateProgramPipelines
To: Martin Peres 




On Mon, Feb 16, 2015 at 6:14 AM, Martin Peres 
wrote:

> Signed-off-by: Martin Peres 
> ---
>  src/mapi/glapi/gen/ARB_direct_state_access.xml |  7 ++
>  src/mesa/main/pipelineobj.c| 35
> +-
>  src/mesa/main/pipelineobj.h|  3 +++
>  src/mesa/main/tests/dispatch_sanity.cpp|  1 +
>  4 files changed, 40 insertions(+), 6 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index 99d2422..2102e82 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -308,6 +308,13 @@
>
> 
>
> +   
> +
> +   
> +  
> +  
> +   
> +
> 
>
> 
> diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
> index b713d95..96bf086 100644
> --- a/src/mesa/main/pipelineobj.c
> +++ b/src/mesa/main/pipelineobj.c
> @@ -498,16 +498,18 @@ _mesa_DeleteProgramPipelines(GLsizei n, const GLuint
> *pipelines)
>   * \param n   Number of IDs to generate.
>   * \param pipelines  pipeline of \c n locations to store the IDs.
>   */
> -void GLAPIENTRY
> -_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines)
> +static void
> +create_program_pipelines(struct gl_context *ctx, GLsizei n, GLuint
> *pipelines,
> + bool dsa)
>  {
> -   GET_CURRENT_CONTEXT(ctx);
> -
> +   const char *func;
> GLuint first;
> GLint i;
>
> +   func = dsa ? "glCreateProgramPipelines" : "glGenProgramPipelines";
> +
> if (n < 0) {
> -  _mesa_error(ctx, GL_INVALID_VALUE, "glGenProgramPipelines(n<0)");
> +  _mesa_error(ctx, GL_INVALID_VALUE, "%s (n<0)", func);
>
Minor nit: There's an extra space here ^

>return;
> }
>
> @@ -523,16 +525,37 @@ _mesa_GenProgramPipelines(GLsizei n, GLuint
> *pipelines)
>
>obj = _mesa_new_pipeline_object(ctx, name);
>if (!obj) {
> - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenProgramPipelines");
> + _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
>   return;
>}
>
> +  if (dsa) {
> + /* make dsa-allocated objects behave like program objects */
> + obj->EverBound = GL_TRUE;
> +  }
> +
>save_pipeline_object(ctx, obj);
>pipelines[i] = first + i;
> }
>
>  }
>
> +void GLAPIENTRY
> +_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +
> +   create_program_pipelines(ctx, n, pipelines, false);
> +}
> +
> +void GLAPIENTRY
> +_mesa_CreateProgramPipelines(GLsizei n, GLuint *pipelines)
> +{
> +   GET_CURRENT_CONTEXT(ctx);
> +
> +   create_program_pipelines(ctx, n, pipelines, true);
> +}
> +
>  /**
>   * Determine if ID is the name of an pipeline object.
>   *
> diff --git a/src/mesa/main/pipelineobj.h b/src/mesa/main/pipelineobj.h
> index 7285a78..b57bcb9 100644
> --- a/src/mesa/main/pipelineobj.h
> +++ b/src/mesa/main/pipelineobj.h
> @@ -82,6 +82,9 @@ _mesa_DeleteProgramPipelines(GLsizei n, const GLuint
> *pipelines);
>  extern void GLAPIENTRY
>  _mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines);
>
> +void GLAPIENTRY
> +_mesa_CreateProgramPipelines(GLsizei n, GLuint *pipelines);
> +
>  extern GLboolean GLAPIENTRY
>  _mesa_IsProgramPipeline(GLuint pipeline);
>
> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp
> b/src/mesa/main/tests/dispatch_sanity.cpp
> index b65080e..cc2b267 100644
> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> @@ -993,6 +993,7 @@ const struct function gl_core_functions_possible[] = {
> { "glTextureStorage2DMultisample", 45, -1 },
> { "glTextureStorage3DMultisample", 45, -1 },
> { "glTextureBuffer", 45, -1 },
> +   { "glCreateProgramPipelines", 45, -1 },
> { "glCreateQueries", 45, -1 },
> { "glGetQueryBufferObjectiv", 45, -1 },
> { "glGetQueryBufferObjectuiv", 45, -1 },
> --
> 2.3.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>

With that fixed,

Reviewed-by: Laura Ekstrand 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] main: Cosmetic updates to GetBufferPointerv.

2015-03-16 Thread Laura Ekstrand
v3: Review from Fredrik Hoglund
   -Split cosmetic refactor of GetBufferPointerv out into a separate commit
---
 src/mesa/main/bufferobj.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 2811604..49d6d32 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2051,14 +2051,15 @@ void GLAPIENTRY
 _mesa_GetBufferPointerv(GLenum target, GLenum pname, GLvoid **params)
 {
GET_CURRENT_CONTEXT(ctx);
-   struct gl_buffer_object * bufObj;
+   struct gl_buffer_object *bufObj;
 
-   if (pname != GL_BUFFER_MAP_POINTER_ARB) {
-  _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferPointervARB(pname)");
+   if (pname != GL_BUFFER_MAP_POINTER) {
+  _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferPointerv(pname != "
+  "GL_BUFFER_MAP_POINTER)");
   return;
}
 
-   bufObj = get_buffer(ctx, "glGetBufferPointervARB", target,
+   bufObj = get_buffer(ctx, "glGetBufferPointerv", target,
GL_INVALID_OPERATION);
if (!bufObj)
   return;
-- 
2.1.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/2] main: Add entry point for GetNamedBufferPointerv.

2015-03-16 Thread Laura Ekstrand
v3: Review from Fredrik Hoglund
   -Split cosmetic refactor of GetBufferPointerv out into a separate commit
---
 src/mapi/glapi/gen/ARB_direct_state_access.xml |  6 ++
 src/mesa/main/bufferobj.c  | 20 
 src/mesa/main/bufferobj.h  |  4 
 src/mesa/main/tests/dispatch_sanity.cpp|  1 +
 4 files changed, 31 insertions(+)

diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml 
b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index cb9f285..8bcbb08 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -98,6 +98,12 @@
   

 
+   
+  
+  
+  
+   
+

 

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 4c2cdf4..2811604 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2066,6 +2066,26 @@ _mesa_GetBufferPointerv(GLenum target, GLenum pname, 
GLvoid **params)
*params = bufObj->Mappings[MAP_USER].Pointer;
 }
 
+void GLAPIENTRY
+_mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   struct gl_buffer_object *bufObj;
+
+   if (pname != GL_BUFFER_MAP_POINTER) {
+  _mesa_error(ctx, GL_INVALID_ENUM, "glGetNamedBufferPointerv(pname != "
+  "GL_BUFFER_MAP_POINTER)");
+  return;
+   }
+
+   bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
+   "glGetNamedBufferPointerv");
+   if (!bufObj)
+  return;
+
+   *params = bufObj->Mappings[MAP_USER].Pointer;
+}
+
 
 void
 _mesa_copy_buffer_sub_data(struct gl_context *ctx,
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 6b29ce7..eee04fe 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -278,6 +278,10 @@ void GLAPIENTRY
 _mesa_GetBufferPointerv(GLenum target, GLenum pname, GLvoid **params);
 
 void GLAPIENTRY
+_mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params);
+
+
+void GLAPIENTRY
 _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
 GLintptr readOffset, GLintptr writeOffset,
 GLsizeiptr size);
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp 
b/src/mesa/main/tests/dispatch_sanity.cpp
index 336c41c..01b73a6 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -966,6 +966,7 @@ const struct function gl_core_functions_possible[] = {
{ "glFlushMappedNamedBufferRange", 45, -1 },
{ "glGetNamedBufferParameteriv", 45, -1 },
{ "glGetNamedBufferParameteri64v", 45, -1 },
+   { "glGetNamedBufferPointerv", 45, -1 },
{ "glCreateTextures", 45, -1 },
{ "glTextureStorage1D", 45, -1 },
{ "glTextureStorage2D", 45, -1 },
-- 
2.1.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Summer of Code ideas (maybe just an idea wishlist?)

2015-03-16 Thread Laura Ekstrand
That was basically my background (mechanical engineering + lots of OpenGL)
when I started six months ago, but I have found the lack of mentoring to be
a large roadblock.  At that time, I wrote tests, but there were few people
willing to review them and give timely feedback.  I was advised to go ahead
and push the tests after a month, but then others came back weeks later
with lots of late reviews after the fact.  They were highly critical and
made me feel unwelcome in the community.  I've had more success working
directly on the Mesa driver.

So I'm not sure we can attract and retain these types of students.

On Mon, Mar 16, 2015 at 6:23 AM, Marek Olšák  wrote:

> On Fri, Mar 13, 2015 at 6:24 PM, Laura Ekstrand 
> wrote:
> > We should try to steer people away from just writing Piglit tests for
> GSoC,
> > unless they have a specific mentor in mind and have already talked to
> him or
> > her.  In my experience, Piglit tests are difficult to do well because
> each
> > one is drastically different from the others and involves cultivating a
> > fairly deep understanding of the the OpenGL function in question.
> >
> > A project pairing a specific extension with relevant tests (like Martin
> and
> > I have done with ARB_dsa) would be better as long as it's a fairly
> specific
> > domain of the OpenGL spec.  That way, the student can study the spec for
> one
> > specific set of objects or entry points and cultivate the necessary
> > understanding they need to write the related tests.
> >
> > A lot of the emails we've gotten from students saying "I want to write
> 4.x
> > Piglit tests" have been too broad/generic and would be difficult for a
> > student to master in a summer without lots of mentoring/direction from
> the
> > community.
>
> We should also take into account that there are people having a degree
> in or studying computer science with specialization in computer
> graphics or having strong knowledge of OpenGL already. Such people are
> difficult to find, but they would be very effective with very little
> (if any) mentoring. Gamedev-related forums (gamedev.net, opengl.org,
> etc.) should have a lot of talented people suited for this job, but
> none of them are probably aware of the Mesa/Piglit GSoC.
>
> Marek
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4 v3] mesa: Separate PBO validation checks from buffer mapping, to allow reuse

2015-03-13 Thread Laura Ekstrand
You're welcome.

On Fri, Mar 13, 2015 at 9:00 AM, Eduardo Lima Mitev 
wrote:

> Hi,
>
> I just merged the 4 patches after fixing your last comments.
>
> Thanks a lot for your reviews and patience.
>
> cheers,
> Eduardo
>
> On 03/12/2015 06:22 PM, Laura Ekstrand wrote:
> >
> > On Thu, Mar 12, 2015 at 12:14 AM, Eduardo Lima Mitev  > <mailto:el...@igalia.com>> wrote:
> >
> >format, type, clientMemSize,
> ptr)) {
> >if (_mesa_is_bufferobj(unpack->BufferObj)) {
> >   _mesa_error(ctx, GL_INVALID_OPERATION,
> >
>
> > Add the "PBO" back to this comment.
>
> >
> > - "%s(out of bounds PBO access)", where);
> > + "%s(out of bounds access)",
> > + where);
> >} else {
> >   _mesa_error(ctx, GL_INVALID_OPERATION,
> >   "%s(out of bounds access: bufSize (%d) is too
> >
>
> > With that fixed,
> >
> > Reviewed-by: Laura Ekstrand  > <mailto:la...@jlekstrand.net>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Summer of Code ideas (maybe just an idea wishlist?)

2015-03-13 Thread Laura Ekstrand
We should try to steer people away from just writing Piglit tests for GSoC,
unless they have a specific mentor in mind and have already talked to him
or her.  In my experience, Piglit tests are difficult to do well because
each one is drastically different from the others and involves cultivating
a fairly deep understanding of the the OpenGL function in question.

A project pairing a specific extension with relevant tests (like Martin and
I have done with ARB_dsa) would be better as long as it's a fairly specific
domain of the OpenGL spec.  That way, the student can study the spec for
one specific set of objects or entry points and cultivate the necessary
understanding they need to write the related tests.

A lot of the emails we've gotten from students saying "I want to write 4.x
Piglit tests" have been too broad/generic and would be difficult for a
student to master in a summer without lots of mentoring/direction from the
community.

On Fri, Mar 13, 2015 at 2:43 AM, Timothy Arceri 
wrote:

> On Fri, 2015-03-13 at 01:06 -0400, Ilia Mirkin wrote:
> > On Fri, Mar 13, 2015 at 12:46 AM, Matt Turner 
> wrote:
> > > Here are some ideas I think might be reasonable GSoC ideas.
> > >
> > >  - GLSL linking in NIR
> > >  - Would allow us to stop doing optimizations and other expensive
> > > things on GLSL IR
> > >
> > >  - SSA in the i965/fs backend, and an SSA-based register allocator
> > >
> > >  - Improve instruction scheduling in i965 (Nouveau has this on the
> > > Wiki as well. Maybe potential for code reuse)
> >
> > FWIW the nouveau thing would probably not involve a lot of reuse...
> > the instructions are fairly different, and a lot of the nouveau
> > project would have to be actually figuring out what _is_ a better
> > schedule rather than just implementing one. [Also nouveau presently
> > has *no* scheduling in place... so almost _anything_ would likely be
> > an improvement.]
> >
> > >
> > >  - Maybe some OpenGL features (???), although lots of things are
> > > already in progress, like tessellation and compute shaders and others
> > > are probably on the critical path
> > >
> > > Are these good GSoC projects? Good -- being a combination of
> > > characteristics like usefulness, feasibility, well defined, and
> > > properly sized.
> > >
> > > Feel free to comment on them and to reply with your own. We can pick
> > > some we like and put them on the wiki.
> >
> > Another project that I think I mentioned on IRC is to go through the
> > ES extension list and add in all the "easy" ones (i.e. ones that are
> > already all or mostly implemented by desktop features), of which there
> > are a _ton_ (probably like 20). I'm just talking about the OES/EXT/KHR
> > ones, not the vendor ones. The majority would be modifying the various
> > paths to allow the logic to be executed in ES contexts and to
> > modify/add piglit tests verifying that the functionality can be used
> > in ES. Here are a bunch of differences between what the nvidia blob
> > exposes and mesa for the same hw:
> >
> >
> http://people.freedesktop.org/~imirkin/glxinfo/glxinfo.html#p=es&b=version&g=NVIDIA%20GF1xx%20%28GeForce%20400%2C%20500%29&diff
> >
> > Admittedly some of those are ES3.1-only, but far from all.
>
> Just thought I'd point out there was an ES version of KHR_debug sent to
> the list [1] but didn't get reviewed or committed. The piglit tests were
> updated for ES and committed.
>
> http://lists.freedesktop.org/archives/mesa-dev/2014-September/067890.html
>
> >
> >   -ilia
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] New stable-branch 10.5 candidate pushed

2015-03-12 Thread Laura Ekstrand
That's okay, just wanted to make sure that 10.5 was correct.

On Thu, Mar 12, 2015 at 1:49 PM, Emil Velikov 
wrote:

> On 12/03/15 16:55, Laura Ekstrand wrote:
> > Emil,
> >
> > I spoke with Neil Roberts, and the two patches of mine you have listed
> > as rejected here are required basis for his four queued commits (all of
> > these pertain to meta_pbo_texSubImage).  The only patch that was
> > reverted was my "1D ARRAY" patch.
> >
> Hi Laura,
>
> It seems that the summary incorrectly lists your two patches are
> rejected. Namely they are worthy 10.5 material and have landed prior to
> the 10.5.0 release. I'm not entirely sure how I've managed to list them
> here.
>
> Apologies for the confusion.
>
> Emil
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "main: _mesa_cube_level_complete checks NumLayers."

2015-03-12 Thread Laura Ekstrand
It appears that our Piglit tests that hit glGenerateMipmap always create
the cube map texture with Texture Storage, so Num Layers always gets set to
6.  I will make a simple test this afternoon for non texture storage cube
maps.
On Mar 12, 2015 12:33 PM, "Laura Ekstrand"  wrote:

> This reverts commit 1ee000a0b6737d6c140d4f07b6044908b8ebfdc7.
> Failures with the GLES3 conformance suite and Synmark2 OGLHdrBloom revealed
> that this commit might be in error.  A look at the offended test in GLES3
> conformance suite, NPOT gen mipmap, suggests that NumLayers may not
> actually
> always be 6 for a cube complete texture with target = GL_TEXTURE_CUBE_MAP.
>
> Extensive testing with Piglit prior to patch review and upstreaming did not
> reveal this problem because, in the few Piglit tests that test for cube
> completeness, NumLayers = 6.  So it appears that perhaps existing test
> coverage in Piglit is inadequate.
> ---
>  src/mesa/main/texobj.c | 4 
>  1 file changed, 4 deletions(-)
>
> diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
> index a99b108..e018ab9 100644
> --- a/src/mesa/main/texobj.c
> +++ b/src/mesa/main/texobj.c
> @@ -879,10 +879,6 @@ _mesa_cube_level_complete(const struct
> gl_texture_object *texObj,
> if (texObj->Target != GL_TEXTURE_CUBE_MAP)
>return GL_FALSE;
>
> -   /* Make sure we have enough image planes for a cube map. */
> -   if (texObj->NumLayers < 6)
> -  return GL_FALSE;
> -
> if ((level < 0) || (level >= MAX_TEXTURE_LEVELS))
>return GL_FALSE;
>
> --
> 2.1.0
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] Revert "main: _mesa_cube_level_complete checks NumLayers."

2015-03-12 Thread Laura Ekstrand
This reverts commit 1ee000a0b6737d6c140d4f07b6044908b8ebfdc7.
Failures with the GLES3 conformance suite and Synmark2 OGLHdrBloom revealed
that this commit might be in error.  A look at the offended test in GLES3
conformance suite, NPOT gen mipmap, suggests that NumLayers may not actually
always be 6 for a cube complete texture with target = GL_TEXTURE_CUBE_MAP.

Extensive testing with Piglit prior to patch review and upstreaming did not
reveal this problem because, in the few Piglit tests that test for cube
completeness, NumLayers = 6.  So it appears that perhaps existing test
coverage in Piglit is inadequate.
---
 src/mesa/main/texobj.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index a99b108..e018ab9 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -879,10 +879,6 @@ _mesa_cube_level_complete(const struct gl_texture_object 
*texObj,
if (texObj->Target != GL_TEXTURE_CUBE_MAP)
   return GL_FALSE;
 
-   /* Make sure we have enough image planes for a cube map. */
-   if (texObj->NumLayers < 6)
-  return GL_FALSE;
-
if ((level < 0) || (level >= MAX_TEXTURE_LEVELS))
   return GL_FALSE;
 
-- 
2.1.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/4 v3] mesa: Separate PBO validation checks from buffer mapping, to allow reuse

2015-03-12 Thread Laura Ekstrand
OPERATION, "%s(PBO is mapped)",
> +  where);
> +  return false;
> +   }
> +
> +   return true;
> +}
> +
> +/**
> + * Perform PBO-read mapping.
> + * If any GL errors are detected, they'll be recorded and NULL returned.
> + * \sa _mesa_validate_pbo_source
> + * \sa _mesa_map_pbo_source
> + * A call to this function should have a matching call to
> + * _mesa_unmap_pbo_source().
> + */
> +const GLvoid *
> +_mesa_map_validate_pbo_source(struct gl_context *ctx,
> +  GLuint dimensions,
> +  const struct gl_pixelstore_attrib *unpack,
> +  GLsizei width, GLsizei height, GLsizei
> depth,
> +  GLenum format, GLenum type,
> +  GLsizei clientMemSize,
> +  const GLvoid *ptr, const char *where)
> +{
> +   if (!_mesa_validate_pbo_source(ctx, dimensions, unpack,
> +  width, height, depth, format, type,
> +  clientMemSize, ptr, where)) {
> + return NULL;
> }
>
> ptr = _mesa_map_pbo_source(ctx, unpack, ptr);
> @@ -381,28 +437,27 @@ _mesa_validate_pbo_compressed_teximage(struct
> gl_context *ctx,
>  {
> GLubyte *buf;
>
> +   if (!_mesa_validate_pbo_source_compressed(ctx, dimensions, packing,
> + imageSize, pixels,
> funcName)) {
> + /* error is already set during validation */
> +  return NULL;
> +   }
> +
> if (!_mesa_is_bufferobj(packing->BufferObj)) {
>/* not using a PBO - return pointer unchanged */
>return pixels;
> }
> -   if ((const GLubyte *) pixels + imageSize >
> -   ((const GLubyte *) 0) + packing->BufferObj->Size) {
> -  /* out of bounds read! */
> -  _mesa_error(ctx, GL_INVALID_OPERATION, "%s%uD(invalid PBO access)",
> -  funcName, dimensions);
> -  return NULL;
> -   }
>
> buf = (GLubyte*) ctx->Driver.MapBufferRange(ctx, 0,
>packing->BufferObj->Size,
>GL_MAP_READ_BIT,
>packing->BufferObj,
> MAP_INTERNAL);
> -   if (!buf) {
> -  _mesa_error(ctx, GL_INVALID_OPERATION, "%s%uD(PBO is mapped)",
> funcName,
> -  dimensions);
> -  return NULL;
> -   }
> +
> +   /* Validation above already checked that PBO is not mapped, so buffer
> +* should not be null.
> +*/
> +   assert(buf);
>
> return ADD_POINTERS(buf, pixels);
>  }
> diff --git a/src/mesa/main/pbo.h b/src/mesa/main/pbo.h
> index 9851ef1..b3f24e6 100644
> --- a/src/mesa/main/pbo.h
> +++ b/src/mesa/main/pbo.h
> @@ -92,4 +92,18 @@ _mesa_unmap_teximage_pbo(struct gl_context *ctx,
>   const struct gl_pixelstore_attrib *unpack);
>
>
> +extern bool
> +_mesa_validate_pbo_source(struct gl_context *ctx, GLuint dimensions,
> +  const struct gl_pixelstore_attrib *unpack,
> +  GLsizei width, GLsizei height, GLsizei depth,
> +  GLenum format, GLenum type,
> +  GLsizei clientMemSize,
> +  const GLvoid *ptr, const char *where);
> +
> +extern bool
> +_mesa_validate_pbo_source_compressed(struct gl_context *ctx, GLuint
> dimensions,
> + const struct gl_pixelstore_attrib
> *unpack,
> + GLsizei imageSize, const GLvoid *ptr,
> + const char *where);
> +
>  #endif
> --
> 2.1.3
>
> With that fixed,

Reviewed-by: Laura Ekstrand 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] New stable-branch 10.5 candidate pushed

2015-03-12 Thread Laura Ekstrand
Emil,

I spoke with Neil Roberts, and the two patches of mine you have listed as
rejected here are required basis for his four queued commits (all of these
pertain to meta_pbo_texSubImage).  The only patch that was reverted was my
"1D ARRAY" patch.

Laura

On Thu, Mar 12, 2015 at 6:50 AM, Emil Velikov 
wrote:

> Hello list,
>
> The candidate for the Mesa 10.5.1 is now available. The current patch queue
> is as follows:
>  - 57 queued
>  - 3 nominated (outstanding)
>  - and 2 rejected (obsolete) patches
>
> This provides us with over a dozen i965 fixes for all over the driver, some
> r300g ones (correct handling of RGTC1 and LATC1 formats, fixed sRGB blits)
> and improvements in the freedreno compiler along side with fixed rendering
> in Xonotic and others.
>
> Take a look at section "Mesa stable queue" for more information.
>
> Testing
> ---
> The following results are against piglit 305ecc3ac89.
>
>
> Changes - classic i965(snb)
> ---
> None.
>
>
> Changes - swrast classic
> 
> None.
>
>
> Changes - gallium softpipe, llvmpipe (LLVM 3.5.1)
> 
> None.
>
>
> Testing reports/general approval
> 
> Any testing reports (or general approval of the state of the branch)
> will be greatly appreciated.
>
>
> Trivial merge conflicts
> ---
> Here are the commits where I manually merged conflicts, so these might
> merit additional review:
>
> commit 31fcb21ef523434a254c0bbff515345c2c6d8152
> Author: Matt Turner 
>
> i965: Avoid applying negate to wrong MAD source.
>
> (cherry picked from commit d528907fd2950c7bb968fff66dd79863cd128890)
>
> commit c3fc8b2870668fe0313fd35b2789306dbf3b9594
> Author: Kenneth Graunke 
>
> i965/fs: Set force_writemask_all on shader_time instructions.
>
> (cherry picked from commit ef9cc7d0c176669c03130abf576f2b700be39514)
>
> commit 82ef4994ddc041b101bcda8e729e729d93b0
> Author: Kenneth Graunke 
>
> i965/fs: Set smear on shader_time diff register.
>
> (cherry picked from commit f1adc45dbe649cdd4538fb96f6d2a27328bbfba1)
>
>
> commit c232d765affc06cc6e81ddee07656919e7f17aa5
> Author: Kenneth Graunke 
>
> i965/fs: Make emit_shader_time_end() insert before EOT.
>
> (cherry picked from commit 4ebeb71573ad44f7657810dc5dd2c9030e3e63db)
>
>
> commit fbd06fe65c0fe57f0dea96c87d9f0eb5abc72bb7
> Author: Kenneth Graunke 
>
> i965/fs: Don't issue FB writes for bound but unwritten color targets.
>
> (cherry picked from commit e95969cd9548033250ba12f2adf11740319b41e7)
>
>
> The plan is to have 10.5.1 this Friday(13th March).
>
> If you have any questions or comments that you would like to share
> before the release, please go ahead.
>
>
> Cheers,
> Emil
>
>
> Mesa stable queue
> -
>
> Nominated (3)
> =
>
> Anuj Phogat (1):
>   glsl: Generate link error for non-matching gl_FragCoord
> redeclarations
>
> Brian Paul (1):
>   configure: don't try to build gallium DRI drivers if --disable-dri
> is set
>
> Mario Kleiner (1):
>   glx: Handle out-of-sequence swap completion events correctly.
>
>
> Rejected (2)
> 
>
> Laura Ekstrand (2):
>   common: Correct texture init for meta pbo uploads and downloads.
>   common: Correct PBO 2D_ARRAY handling.
>
>
> Queued (57)
> ===
>
> Andrey Sudnik (1):
>   i965/vec4: Don't lose the saturate modifier in copy propagation.
>
> Chris Forbes (1):
>   i965/gs: Check newly-generated GS-out VUE map against correct stage
>
> Daniel Stone (1):
>   egl: Take alpha bits into account when selecting GBM formats
>
> Emil Velikov (4):
>   docs: Add sha256 sums for the 10.5.0 release
>   egl/main: no longer export internal function
>   cherry-ignore: ignore a few more commits picked without -x
>   mapi: fix commit 90411b56f6bc817e229d8801ac0adad6d4e3fb7a
>
> Frank Henigman (1):
>   intel: fix EGLImage renderbuffer _BaseFormat
>
> Iago Toral Quiroga (1):
>   i965: Fix out-of-bounds accesses into pull_constant_loc array
>
> Ian Romanick (1):
>   i965/fs/nir: Use emit_math for nir_op_fpow
>
> Ilia Mirkin (3):
>   freedreno: move fb state copy after checking for size change
>   freedreno/ir3: fix array count returned by TXQ
>   freedreno/ir3: get the # of miplevels from getinfo
>
> Jason Ekstrand (2):
>   meta/TexSubImage: Stash everything other than PIXEL_TRANSFER/store
> in meta_begin
> 

Re: [Mesa-dev] [PATCH 4/4 v2] mesa: Check for valid PBO access in gl(Compressed)Tex(Sub)Image calls

2015-03-11 Thread Laura Ekstrand
On Tue, Mar 10, 2015 at 11:36 AM, Eduardo Lima Mitev 
wrote:

> This patch adds two types of checks to the gl(Compressed)Tex(Sub)Imgage
> family
> of functions when a pixel buffer object is bound to GL_PIXEL_UNPACK_BUFFER:
>
> - That the buffer is not mapped.
> - The total data size is within the boundaries of the buffer size.
>
> It does so by calling auxiliary validations functions from PBO API:
> _mesa_validate_pbo_source() for non-compressed texture calls, and
> _mesa_validate_pbo_source_compressed() for compressed texture calls.
>
> The first check is defined in Section 6.3.2 'Effects of Mapping Buffers
> on Other GL Commands' of the GLES 3.1 spec, page 57:
>
> "Any GL command which attempts to read from, write to, or change the
>  state of a buffer object may generate an INVALID_OPERATION error if
> all
>  or part of the buffer object is mapped. However, only commands which
>  explicitly describe this error are required to do so. If an error is
> not
>  generated, using such commands to perform invalid reads, writes, or
>  state changes will have undefined results and may result in GL
>  interruption or termination."
>
> Similar wording exists in GL 4.5 spec, page 76.
>
> In the case of gl(Compressed)Tex(Sub)Image(2,3)D, the specification
> doesn't force
> implemtations to throw an error. However since Mesa don't currently
> implement
> checks to determine when it is safe to read/write from/to a mapped PBO, we
> should always return the error if all or parts of it are mapped.
>
> The 2nd check is defined in Section 8.5 'Texture Image Specification' of
> the
> OpenGL 4.5 spec, page 203:
>
> "An INVALID_OPERATION error is generated if a pixel unpack buffer
> object
>  is bound and storing texture data would access memory beyond the end
> of
>  the pixel unpack buffer."
>
> Fixes 4 dEQP tests:
> *
> dEQP-GLES3.functional.negative_api.texture.compressedteximage2d_invalid_buffer_target
> *
> dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage2d_invalid_buffer_target
> *
> dEQP-GLES3.functional.negative_api.texture.compressedteximage3d_invalid_buffer_target
> *
> dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d_invalid_buffer_target
> ---
>  src/mesa/main/teximage.c | 97
> +---
>  1 file changed, 67 insertions(+), 30 deletions(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 7b1a0e6..aae7c00 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -53,6 +53,7 @@
>  #include "mtypes.h"
>  #include "glformats.h"
>  #include "texstore.h"
> +#include "pbo.h"
>
>
>  /**
> @@ -2113,7 +2114,8 @@ texture_error_check( struct gl_context *ctx,
>   GLint level, GLint internalFormat,
>   GLenum format, GLenum type,
>   GLint width, GLint height,
> - GLint depth, GLint border )
> + GLint depth, GLint border,
> + const GLvoid *pixels )
>  {
> GLenum err;
>
> @@ -2198,6 +2200,13 @@ texture_error_check( struct gl_context *ctx,
>return GL_TRUE;
> }
> +   /* validate the bound PBO, if any */
> +   if (!_mesa_validate_pbo_source(ctx, dimensions, &ctx->Unpack,
> +  width, height, depth, format, type,
> +  INT_MAX, pixels, "glTexImage")) {
> +  return GL_TRUE;
> +   }
> +
> /* make sure internal format and format basically agree */
> if (!texture_formats_agree(internalFormat, format)) {
>_mesa_error(ctx, GL_INVALID_OPERATION,
> @@ -2294,7 +2303,7 @@ compressed_texture_error_check(struct gl_context
> *ctx, GLint dimensions,
> GLenum target, GLint level,
> GLenum internalFormat, GLsizei width,
> GLsizei height, GLsizei depth, GLint
> border,
> -   GLsizei imageSize)
> +   GLsizei imageSize, const GLvoid *data)
>  {
> const GLint maxLevels = _mesa_max_texture_levels(ctx, target);
> GLint expectedSize;
> @@ -2322,6 +2331,13 @@ compressed_texture_error_check(struct gl_context
> *ctx, GLint dimensions,
>return GL_TRUE;
> }
>
> +   /* validate the bound PBO, if any */
> +   if (!_mesa_validate_pbo_source_compressed(ctx, dimensions,
> &ctx->Unpack,
> + imageSize, data,
> + "glCompressedTexImage")) {
> +  return GL_TRUE;
> +   }
> +
> switch (internalFormat) {
> case GL_PALETTE4_RGB8_OES:
> case GL_PALETTE4_RGBA8_OES:
> @@ -2454,7 +2470,8 @@ texsubimage_error_check(struct gl_context *ctx,
> GLuint dimensions,
>  GLenum target, GLint level,
>  GLint xoffset, GLint yoffset, GLint zoffset,
>  GLint width, GLint height,

Re: [Mesa-dev] [PATCH 3/4 v2] mesa: Separate PBO validation checks from buffer mapping, to allow reuse

2015-03-11 Thread Laura Ekstrand
On Tue, Mar 10, 2015 at 11:34 AM, Eduardo Lima Mitev 
wrote:

> Internal PBO functions such as _mesa_map_validate_pbo_source() and
> _mesa_validate_pbo_compressed_teximage() perform validation and buffer
> mapping
> within the same call.
>
> This patch takes out the validation into separate functions to allow reuse
> of functionality by other code (i.e, gl(Compressed)Tex(Sub)Image).
> ---
>  src/mesa/main/pbo.c | 119
> ++--
>  src/mesa/main/pbo.h |  14 +++
>  2 files changed, 101 insertions(+), 32 deletions(-)
>
> diff --git a/src/mesa/main/pbo.c b/src/mesa/main/pbo.c
> index 259f763..46121a2 100644
> --- a/src/mesa/main/pbo.c
> +++ b/src/mesa/main/pbo.c
> @@ -164,23 +164,18 @@ _mesa_map_pbo_source(struct gl_context *ctx,
> return buf;
>  }
>
> -
>  /**
> - * Combine PBO-read validation and mapping.
> + * Perform PBO validation for read operations with uncompressed textures.
>   * If any GL errors are detected, they'll be recorded and NULL returned.
>
Maybe say something like "If there are errors, return false, else return
true"?  This is important because in other parts of the driver (like
main/teximage.c), error checking functions return GL_TRUE if an error is
found and GL_FALSE if one isn't found.  (Confusing, I know :< )

>   * \sa _mesa_validate_pbo_access
> - * \sa _mesa_map_pbo_source
> - * A call to this function should have a matching call to
> - * _mesa_unmap_pbo_source().
>   */
> -const GLvoid *
> -_mesa_map_validate_pbo_source(struct gl_context *ctx,
> -  GLuint dimensions,
> -  const struct gl_pixelstore_attrib *unpack,
> -  GLsizei width, GLsizei height, GLsizei
> depth,
> -  GLenum format, GLenum type,
> -  GLsizei clientMemSize,
> -  const GLvoid *ptr, const char *where)
> +bool
> +_mesa_validate_pbo_source(struct gl_context *ctx, GLuint dimensions,
> +  const struct gl_pixelstore_attrib *unpack,
> +  GLsizei width, GLsizei height, GLsizei depth,
> +  GLenum format, GLenum type,
> +  GLsizei clientMemSize,
> +  const GLvoid *ptr, const char *where)
>  {
> assert(dimensions == 1 || dimensions == 2 || dimensions == 3);
>
> @@ -188,24 +183,85 @@ _mesa_map_validate_pbo_source(struct gl_context *ctx,
>format, type, clientMemSize, ptr)) {
>if (_mesa_is_bufferobj(unpack->BufferObj)) {
>   _mesa_error(ctx, GL_INVALID_OPERATION,
> - "%s(out of bounds PBO access)", where);
> -  } else {
> - _mesa_error(ctx, GL_INVALID_OPERATION,
>
You changed the order of the conditions from the original version.  In the
original, if (_mesa_is_bufferobj), then say "out of bounds PBO access."  If
(!_mesa_is_bufferobj), say "out of bounds access: bufSize is too small."
You have them switched around here.

>   "%s(out of bounds access: bufSize (%d) is too
> small)",
>   where, clientMemSize);
> +  } else {
> + _mesa_error(ctx, GL_INVALID_OPERATION,
> + "%s(out of bounds access)",
> + where);
>}
> -  return NULL;
> +  return false;
> }
>
> if (!_mesa_is_bufferobj(unpack->BufferObj)) {
>/* non-PBO access: no further validation to be done */
> -  return ptr;
> +  return true;
> }
>
> if (_mesa_check_disallowed_mapping(unpack->BufferObj)) {
>/* buffer is already mapped - that's an error */
> -  _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
> -  return NULL;
> +  _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)",
> +  where);
> +  return false;
> +   }
> +
> +   return true;
> +}
> +
> +/**
> + * Perform PBO validation for read operations with compressed textures.
> + * If any GL errors are detected, they'll be recorded and NULL returned.
>
Same here as above.  Say something about the return value (true or false).

> + */
> +bool
> +_mesa_validate_pbo_source_compressed(struct gl_context *ctx, GLuint
> dimensions,
> + const struct gl_pixelstore_attrib
> *unpack,
> + GLsizei imageSize, const GLvoid
> *pixels,
> + const char *where)
> +{
> +   if (!_mesa_is_bufferobj(unpack->BufferObj)) {
> +  /* not using a PBO */
> +  return true;
> +   }
> +
> +   if ((const GLubyte *) pixels + imageSize >
> +   ((const GLubyte *) 0) + unpack->BufferObj->Size) {
> +  /* out of bounds read! */
> +  _mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid PBO access)",
> +  where);
> +  return false;
> +   }
> +
> +   if (_mesa_check_disallowed_mapping(unpack->BufferObj)) 

Re: [Mesa-dev] [PATCH 1/4 v2] meta: Remove error checks for texture <-> pixel-buffer transfers that don't belong in driver code

2015-03-10 Thread Laura Ekstrand
LGTM.

Reviewed-by: Laura Ekstrand 

On Tue, Mar 10, 2015 at 11:33 AM, Eduardo Lima Mitev 
wrote:

> The implementation of texture <-> pixel-buffer transfers in drivers common
> layer
> includes certain error checks and argument validation that don't belong
> there,
> considering how the Mesa codebase is laid out. These are higher level
> validations that, if necessary, should be performed earlier (i.e, in GL API
> entry points).
>
> This patch simply removes these error checks from driver code.
>
> For more information, see discussion at
> http://lists.freedesktop.org/archives/mesa-dev/2015-February/077417.html.
> ---
>  src/mesa/drivers/common/meta_tex_subimage.c | 32
> -
>  1 file changed, 32 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta_tex_subimage.c
> b/src/mesa/drivers/common/meta_tex_subimage.c
> index e29addb..ad6e787 100644
> --- a/src/mesa/drivers/common/meta_tex_subimage.c
> +++ b/src/mesa/drivers/common/meta_tex_subimage.c
> @@ -150,9 +150,6 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx,
> GLuint dims,
> bool success = false;
> int z;
>
> -   /* XXX: This should probably be passed in from somewhere */
> -   const char *where = "_mesa_meta_pbo_TexSubImage";
> -
> if (!_mesa_is_bufferobj(packing->BufferObj) && !create_pbo)
>return false;
>
> @@ -165,19 +162,6 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx,
> GLuint dims,
> if (ctx->_ImageTransferState)
>return false;
>
> -   if (!_mesa_validate_pbo_access(dims, packing, width, height, depth,
> -  format, type, INT_MAX, pixels)) {
> -  _mesa_error(ctx, GL_INVALID_OPERATION,
> -  "%s(out of bounds PBO access)", where);
> -  return true;
> -   }
> -
> -   if (_mesa_check_disallowed_mapping(packing->BufferObj)) {
> -  /* buffer is mapped - that's an error */
> -  _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
> -  return true;
> -   }
> -
> /* For arrays, use a tall (height * depth) 2D texture but taking into
>  * account the inter-image padding specified with the image height
> packing
>  * property.
> @@ -277,9 +261,6 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx,
> GLuint dims,
> bool success = false;
> int z;
>
> -   /* XXX: This should probably be passed in from somewhere */
> -   const char *where = "_mesa_meta_pbo_GetTexSubImage";
> -
> if (!_mesa_is_bufferobj(packing->BufferObj))
>return false;
>
> @@ -292,19 +273,6 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx,
> GLuint dims,
> if (ctx->_ImageTransferState)
>return false;
>
> -   if (!_mesa_validate_pbo_access(dims, packing, width, height, depth,
> -  format, type, INT_MAX, pixels)) {
> -  _mesa_error(ctx, GL_INVALID_OPERATION,
> -  "%s(out of bounds PBO access)", where);
> -  return true;
> -   }
> -
> -   if (_mesa_check_disallowed_mapping(packing->BufferObj)) {
> -  /* buffer is mapped - that's an error */
> -  _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
> -  return true;
> -   }
> -
> /* For arrays, use a tall (height * depth) 2D texture but taking into
>  * account the inter-image padding specified with the image height
> packing
>  * property.
> --
> 2.1.3
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


  1   2   3   4   >