Re: [Mesa-dev] GitLab migration of Piglit

2018-06-04 Thread Dylan Baker
As we discussed offline, I think it should be part of the mesa project. As I
understand your explanation: if piglit becomes a mesa group project then anyone
in the mesa group would automatically get piglit write access, but we can still
give specific people write access to the piglit repo (without mesa, libdrm, etc
access). That seems like the right solution to me.

Dylan

Quoting Jason Ekstrand (2018-06-04 08:48:53)
> All,
> 
> Sorry for the mess of GitLab e-mails but there are a lot of questions to ask 
> as
> this process moves forward.  Today, we're discussing piglit.  I've included
> both the mesa and piglit list in the hopes that people will actually see this
> e-mail.
> 
> Honestly, I expect the migration of piglit to have much less impact on most
> people's daily lives than moving the mesa repo.
> 
> The biggest question I have is whether we actually want to continue to have a
> separate "piglit" group.  With GitLab, we can already give someone developer
> access to piglit without giving them developer access to mesa.  Mostly, this 
> is
> a question of whether we consider piglit to be it's own project on freedesktop
> or a sub-project of mesa.  I don't know the answer to that question.
> 
> Thoughts?
> 
> --Jason Ekstrand


signature.asc
Description: signature
___
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-05-31 Thread Dylan Baker
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? Because this doesn't reflect the
reality of the copyrights of mesa.

> +
> +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, 

Re: [Mesa-dev] [PATCH mesa 3/5] bin: rewrite get_reviewers as opt-in only

2018-06-01 Thread Dylan Baker
Quoting Eric Engestrom (2018-06-01 09:50:34)
> On Thursday, 2018-05-31 10:04:25 -0700, Dylan Baker wrote:
> > Quoting Eric Engestrom (2018-05-31 07:04:33)
> > > Some people have mentioned they don't like the current get_reviewers.pl
> > > script (the one from the kernel) because it is way too greedy in its
> > > search for reviewers.
> > > 
> > > I tried to modify it to remove the git blame functionality, but I had
> > > a way too hard time figuring out what all this perl black magic does,
> > > and I figured I wouldn't be the only one, so I rewrote it in python
> > > instead, so that more people would be able to maintain it.
> > > 
> > > I kept only the basic functionality of parsing the REVIEWERS file, and
> > > only supporting the R: and F: tags for now (those were the only ones
> > > used in Mesa anyway). Patches can be passed in as arguments or via
> > > stdin, and `-f` can be used to simply find reviewers for the files
> > > given.
> > > 
> > > This should be a drop-in replacement for the old script, meant to be
> > > used with git; you can use it automatically by setting:
> > > $ git config sendemail.cccmd bin/get_reviewer.py
> > > 
> > > To reiterate, this script is now opt-in only, as it only returns
> > > reviewers added in REVIEWERS.
> > > 
> > > Signed-off-by: Eric Engestrom 
> > > ---
> > > As a quirk that I decided to leave in, "F: /dev/null" can now be used to
> > > subscribe to files being added or deleted, which I'm thinking of adding
> > > to the build systems groups, so that build system reviewers can make
> > > sure their build system was updated accordingly. Thoughts?
> > > ---
> > >  bin/get_reviewer.py | 177 
> > >  1 file changed, 177 insertions(+)
> > >  create mode 100755 bin/get_reviewer.py
> > > 
> > > diff --git a/bin/get_reviewer.py b/bin/get_reviewer.py
> > > new file mode 100755
> > > index ..543086ba21505b81ea0c
> > > --- /dev/null
> > > +++ b/bin/get_reviewer.py
> > > @@ -0,0 +1,177 @@
> > > +#!/usr/bin/env python3
> > > +"""
> > > +Parser for REVIEWERS, designed for use with git.
> > > +
> > > +Use it automatically by configuring git like this:
> > > +  $ git config sendemail.cccmd bin/get_reviewer.py
> > > +
> > > +"""
> > > +
> > > +def parse_options(args):
> > > +"""
> > > +Takes care of parsing the options and returning a simple dict with
> > > +one member per option.
> > > +"""
> > > +import argparse
> > 
> > Please don't put the imports in the function bodies, this looks like you're
> > doing dirty tricks to avoid circular imports.
> > 
> [snip]
> > > +if __name__ == '__main__':
> > > +import sys
> > > +main(sys.argv[1:], sys.stdin)
> > 
> > There shouldn't be any need to strip the first element of sys.argv for 
> > argparse,
> > it knows how to handle that 'get_reveiwers.py' is the first argument. There
> > shouldn't be a reason to pass it to argparse at all, since we passing all 
> > of the
> > arguments and argparse will just use sys.argv if it's passed no arguments.
> > 
> > There isn't really a reason to pass sys.stdin here either, since it's th 
> > eonly
> > option anyway.
> 
> My reasoning was the same for both of these: locality. I was trying to
> leave things as non-specific as possible. Importing things only when
> needed, passing arguments explicitly and stripping off irrelevant bits
> were all done so that the function that receives them doesn't have to
> care about where or how these things were handled, it just gets a list
> of strings and a file to read.
> 
> I'm happy to re-organise this to import everything globally and drop
> parameters like these if that's the best practice :)

I'd at least like have the imports at global scope. Usually when someone uses an
import inside a function in python it's to avoid a circular dependency, since
the import will be evaluated at runtime rather than at module initialization
time. I'm less concerned about the sys stuff, although it does seem a little
strange to add extra code to handle something that's already handled in the
code we're calling, but it's also not the end of the world :)

Dylan

> 
> I'll make a v2 next week with that and everything everyone will have
> mentioned then.


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


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] radv: Set active_stages the same whether or not shaders were cached

2018-06-01 Thread Dylan Baker
Quoting Samuel Pitoiset (2018-06-01 08:58:42)
> 
> 
> On 06/01/2018 05:48 PM, Dylan Baker wrote:
> > Quoting Alex Smith (2018-06-01 07:56:38)
> >> On 1 June 2018 at 15:48, Dylan Baker  wrote:
> >>
> >>  Quoting Alex Smith (2018-05-31 08:44:18)
> >>  > With GFX9 merged shaders, active_stages would be set to the original
> >>  > stages specified if shaders were not cached, but to the stages still
> >>  > present after merging if they were.
> >>  >
> >>  > Be consistent and use the original stages.
> >>  >
> >>  > Signed-off-by: Alex Smith 
> >>  > Cc: "18.1" 
> >>  > ---
> >>  >  src/amd/vulkan/radv_pipeline.c | 7 ++-
> >>  >  1 file changed, 2 insertions(+), 5 deletions(-)
> >>  >
> >>  > diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_
> >>  pipeline.c
> >>  > index 52734a308a..18dcc43ebe 100644
> >>  > --- a/src/amd/vulkan/radv_pipeline.c
> >>  > +++ b/src/amd/vulkan/radv_pipeline.c
> >>  > @@ -1964,6 +1964,8 @@ void radv_create_shaders(struct radv_pipeline
> >>  *pipeline,
> >>  >                                 _mesa_sha1_compute(modules[i]->nir->
> >>  info.name,
> >>  >                                                    
> >> strlen(modules[i]->
> >>  nir->info.name),
> >>  >                                                    
> >> modules[i]->sha1);
> >>  > +
> >>  > +                       pipeline->active_stages |=
> >>  mesa_to_vk_shader_stage(i);
> >>  >                 }
> >>  >         }
> >>  >
> >>  > @@ -1979,10 +1981,6 @@ void radv_create_shaders(struct radv_pipeline
> >>  *pipeline,
> >>  >
> >>  >         if (radv_create_shader_variants_from_pipeline_cache(device,
> >>  cache, hash, pipeline->shaders) &&
> >>  >             (!modules[MESA_SHADER_GEOMETRY] || 
> >> pipeline->gs_copy_shader))
> >>  {
> >>  > -               for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
> >>  > -                       if (pipeline->shaders[i])
> >>  > -                               pipeline->active_stages |=
> >>  mesa_to_vk_shader_stage(i);
> >>  > -               }
> >>  >                 return;
> >>  >         }
> >>  >
> >>  > @@ -2015,7 +2013,6 @@ void radv_create_shaders(struct radv_pipeline
> >>  *pipeline,
> >>  >                                                     stage ? 
> >> stage->pName
> >>  : "main", i,
> >>  >                                                     stage ? stage->
> >>  pSpecializationInfo : NULL,
> >>  >                                                     flags);
> >>  > -               pipeline->active_stages |= 
> >> mesa_to_vk_shader_stage(i);
> >>  >
> >>  >                 /* We don't want to alter meta shaders IR directly 
> >> so
> >>  clone it
> >>  >                  * first.
> >>  > --
> >>  > 2.14.3
> >>  >
> >>  > ___
> >>  > mesa-stable mailing list
> >>  > mesa-sta...@lists.freedesktop.org
> >>  > https://lists.freedesktop.org/mailman/listinfo/mesa-stable
> >>
> >>  Hi Alex,
> >>
> >>  This doesn't apply cleanly to the 18.1 tree with the following 
> >> collision:
> >>
> >>  ++<<<<<<< HEAD
> >> 
> >>   +                                                  stage ? stage->
> >>  pSpecializationInfo : NULL);
> >>   +              pipeline->active_stages |= mesa_to_vk_shader_stage(i);
> >> 
> >>  ++===
> >> 
> >>  +                                                   stage ? stage->
> >>  pSpecializationInfo : NULL,
> >>  +                                                   flags);
> >> 
> >>  ++>>>>>>> 0fa51bfdbe5... radv: Set active_stages the same whether or 
> >> not
> >>  shaders were cached
> >>
> >>  I can remove the flags field (which doesn't exist in 18.1) before 
> >> merging
> >>  if you
> >>  think that's the right thing to do. Does that seem reasonable?
> >>
> >>
> >> Yes, that's correct. Should just be removing the pipeline->active_stages 
> >> line
> >> at that point.
> >>
> >> Thanks,
> >> Alex
> > 
> > Thanks! This is in the tree for 18.1.2.
> 
> Apparently, this series regresses some CTS on my side, Bas will 
> investigate, would be nice to not release 18.1.2 without this fixed. :)
> 

Let me know what you all want to do, 18.1.1 happened today, and 18.1.2 is
planned for release on the 15th, so you have some time to figure it out.

Dylan


signature.asc
Description: signature
___
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-01 Thread Dylan Baker
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


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


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] radv: Set active_stages the same whether or not shaders were cached

2018-06-01 Thread Dylan Baker
Quoting Alex Smith (2018-05-31 08:44:18)
> With GFX9 merged shaders, active_stages would be set to the original
> stages specified if shaders were not cached, but to the stages still
> present after merging if they were.
> 
> Be consistent and use the original stages.
> 
> Signed-off-by: Alex Smith 
> Cc: "18.1" 
> ---
>  src/amd/vulkan/radv_pipeline.c | 7 ++-
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
> index 52734a308a..18dcc43ebe 100644
> --- a/src/amd/vulkan/radv_pipeline.c
> +++ b/src/amd/vulkan/radv_pipeline.c
> @@ -1964,6 +1964,8 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
> _mesa_sha1_compute(modules[i]->nir->info.name,
>
> strlen(modules[i]->nir->info.name),
>modules[i]->sha1);
> +
> +   pipeline->active_stages |= mesa_to_vk_shader_stage(i);
> }
> }
>  
> @@ -1979,10 +1981,6 @@ void radv_create_shaders(struct radv_pipeline 
> *pipeline,
>  
> if (radv_create_shader_variants_from_pipeline_cache(device, cache, 
> hash, pipeline->shaders) &&
> (!modules[MESA_SHADER_GEOMETRY] || pipeline->gs_copy_shader)) {
> -   for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
> -   if (pipeline->shaders[i])
> -   pipeline->active_stages |= 
> mesa_to_vk_shader_stage(i);
> -   }
> return;
> }
>  
> @@ -2015,7 +2013,6 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
> stage ? stage->pName : 
> "main", i,
> stage ? 
> stage->pSpecializationInfo : NULL,
> flags);
> -   pipeline->active_stages |= mesa_to_vk_shader_stage(i);
>  
> /* We don't want to alter meta shaders IR directly so clone it
>  * first.
> -- 
> 2.14.3
> 
> ___
> mesa-stable mailing list
> mesa-sta...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable

Hi Alex,

This doesn't apply cleanly to the 18.1 tree with the following collision:

++<<< HEAD  
   
 +  stage ? 
stage->pSpecializationInfo : NULL);
 +  pipeline->active_stages |= mesa_to_vk_shader_stage(i);  
   
++===   
   
+   stage ? 
stage->pSpecializationInfo : NULL, 
+   flags); 
   
++>>> 0fa51bfdbe5... radv: Set active_stages the same whether or not 
shaders were cached   

I can remove the flags field (which doesn't exist in 18.1) before merging if you
think that's the right thing to do. Does that seem reasonable?

Dylan


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


Re: [Mesa-dev] [PATCH] meson: only build vl_winsys_dri.c when x11 platform is used

2018-06-01 Thread Dylan Baker
Quoting Lukas Rusak (2018-06-01 00:20:10)
> This seems to have been missed in the move from autotools
> 
> This fixes the following build issue:
> 
> ../src/gallium/auxiliary/vl/vl_winsys_dri.c:34:10: fatal error: 
> X11/Xlib-xcb.h: No such file or directory
>  #include 
>   ^~~~
> ---
>  src/gallium/auxiliary/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/auxiliary/meson.build 
> b/src/gallium/auxiliary/meson.build
> index 584cbe4509..857001e12c 100644
> --- a/src/gallium/auxiliary/meson.build
> +++ b/src/gallium/auxiliary/meson.build
> @@ -453,7 +453,7 @@ files_libgalliumvl = files(
>  )
>  
>  files_libgalliumvlwinsys = files('vl/vl_winsys.h')
> -if with_dri2
> +if with_dri2 and with_platform_x11
>files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
>if with_dri3
>  files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')
> -- 
> 2.17.0
> 

Fixes: b1b65397d0c4978e36a84c0a1c98a4bd6cb9588e
   ("meson: Build gallium auxiliary")
Reviewed-by: Dylan Baker 

Do you need me to push this for you?

Dylan


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


Re: [Mesa-dev] [PATCH mesa] travis: use correct form for array options

2018-06-05 Thread Dylan Baker
This seems fine to me,

Reviewed-by: Dylan Baker 

Quoting Eric Engestrom (2018-06-05 03:59:40)
> I'd like to eventually drop support for the confusing "an array of
> a single empty string is meant to be interpreted as an empty array", so
> let's start by not using it anymore.
> 
> Signed-off-by: Eric Engestrom 
> ---
>  .travis.yml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index d05c40bf9d74545fa777..1f83f5b8d74d8d8c1e8c 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -33,7 +33,7 @@ matrix:
>  - env:
>  - LABEL="meson Vulkan"
>  - BUILD=meson
> -- MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
> +- MESON_OPTIONS="-Ddri-drivers=[] -Dgallium-drivers=[]"
>  - LLVM_VERSION=5.0
>  - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
>addons:
> @@ -53,7 +53,7 @@ matrix:
>  - env:
>  - LABEL="meson loaders/classic DRI"
>  - BUILD=meson
> -- MESON_OPTIONS="-Dvulkan-drivers= -Dgallium-drivers="
> +- MESON_OPTIONS="-Dvulkan-drivers=[] -Dgallium-drivers=[]"
>addons:
>  apt:
>packages:
> -- 
> Cheers,
>   Eric
> 


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


Re: [Mesa-dev] [PATCH mesa] travis: use correct form for array options

2018-06-05 Thread Dylan Baker
You might also be interested in this:
https://github.com/mesonbuild/meson/pull/3696

Quoting Eric Engestrom (2018-06-05 03:59:40)
> I'd like to eventually drop support for the confusing "an array of
> a single empty string is meant to be interpreted as an empty array", so
> let's start by not using it anymore.
> 
> Signed-off-by: Eric Engestrom 
> ---
>  .travis.yml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index d05c40bf9d74545fa777..1f83f5b8d74d8d8c1e8c 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -33,7 +33,7 @@ matrix:
>  - env:
>  - LABEL="meson Vulkan"
>  - BUILD=meson
> -- MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
> +- MESON_OPTIONS="-Ddri-drivers=[] -Dgallium-drivers=[]"
>  - LLVM_VERSION=5.0
>  - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
>addons:
> @@ -53,7 +53,7 @@ matrix:
>  - env:
>  - LABEL="meson loaders/classic DRI"
>  - BUILD=meson
> -- MESON_OPTIONS="-Dvulkan-drivers= -Dgallium-drivers="
> +- MESON_OPTIONS="-Dvulkan-drivers=[] -Dgallium-drivers=[]"
>addons:
>  apt:
>packages:
> -- 
> Cheers,
>   Eric
> 


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


Re: [Mesa-dev] [PATCH mesa] vma/tests: cast away implementation detail of using strtoul()

2018-06-06 Thread Dylan Baker
Yeah, Scott and I thought that went to the list before I did an offer the 
shoulder review, then realized it didn't after pushing.

On June 6, 2018 10:31:38 AM PDT, Eric Anholt  wrote:
>Eric Engestrom  writes:
>
>> On MacOS, the build fails because of a compiler complaint about
>> a downcast:
>>
>>   vma_random_test.cpp:239:18: error: non-constant-expression cannot
>be narrowed from type 'unsigned long' to 'uint_fast32_t' (aka 'unsigned
>int') in initializer list [-Wc++11-narrowing]
>>  random_test r{seed};
>>^~~~
>>   vma_random_test.cpp:239:18: note: insert an explicit cast to
>silence this issue
>>  random_test r{seed};
>>^~~~
>>static_cast( )
>>
>> Let's take the compiler's suggestion, as we only needed a long here
>to
>> use strtoul().
>>
>> Cc: Scott D Phillips 
>> Signed-off-by: Eric Engestrom 
>
>This commit seems to have resolved the issue:
>
>commit 08535dd8860951ce4572cd2590e417a1f3d96b3d
>Author: Scott D Phillips 
>Date:   Tue Jun 5 09:29:43 2018 -0700
>
>util/tests/vma: Fix warning c++11-narrowing
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] pkgconfig: Fix gl.pc when glvnd is enabled

2018-05-29 Thread Dylan Baker
Quoting Adam Jackson (2018-05-29 06:50:46)
> GL_LIB expands to GLX_mesa, but applications should not link against
> that. -lGL is never wrong, just hardcode it.

Actually There is this really stupid option in the autotools build called
--gl-lib-name. We should remove that.

Emil and I had also discussed that glvnd should provide the gl.pc file when used
instead of mesa. It appears he never got around to that, but it seems like a
useful thing to do.

Dylan

> 
> Signed-off-by: Adam Jackson 
> ---
>  src/mesa/gl.pc.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/gl.pc.in b/src/mesa/gl.pc.in
> index 181724b97b..8c7b7da8d7 100644
> --- a/src/mesa/gl.pc.in
> +++ b/src/mesa/gl.pc.in
> @@ -7,7 +7,7 @@ Name: gl
>  Description: Mesa OpenGL library
>  Requires.private: @GL_PC_REQ_PRIV@
>  Version: @PACKAGE_VERSION@
> -Libs: -L${libdir} -l@GL_LIB@
> +Libs: -L${libdir} -lGL
>  Libs.private: @GL_PC_LIB_PRIV@
>  Cflags: -I${includedir} @GL_PC_CFLAGS@
>  glx_tls: @GLX_TLS@
> -- 
> 2.17.0
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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


Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] radv: Set active_stages the same whether or not shaders were cached

2018-06-01 Thread Dylan Baker
Quoting Alex Smith (2018-06-01 07:56:38)
> On 1 June 2018 at 15:48, Dylan Baker  wrote:
> 
> Quoting Alex Smith (2018-05-31 08:44:18)
> > With GFX9 merged shaders, active_stages would be set to the original
> > stages specified if shaders were not cached, but to the stages still
> > present after merging if they were.
> >
> > Be consistent and use the original stages.
> >
> > Signed-off-by: Alex Smith 
> > Cc: "18.1" 
> > ---
> >  src/amd/vulkan/radv_pipeline.c | 7 ++-
> >  1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_
> pipeline.c
> > index 52734a308a..18dcc43ebe 100644
> > --- a/src/amd/vulkan/radv_pipeline.c
> > +++ b/src/amd/vulkan/radv_pipeline.c
> > @@ -1964,6 +1964,8 @@ void radv_create_shaders(struct radv_pipeline
> *pipeline,
> >                                 _mesa_sha1_compute(modules[i]->nir->
> info.name,
> >                                                    strlen(modules[i]->
> nir->info.name),
> >                                                    modules[i]->sha1);
> > +
> > +                       pipeline->active_stages |=
> mesa_to_vk_shader_stage(i);
> >                 }
> >         }
> > 
> > @@ -1979,10 +1981,6 @@ void radv_create_shaders(struct radv_pipeline
> *pipeline,
> > 
> >         if (radv_create_shader_variants_from_pipeline_cache(device,
> cache, hash, pipeline->shaders) &&
> >             (!modules[MESA_SHADER_GEOMETRY] || 
> pipeline->gs_copy_shader))
> {
> > -               for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
> > -                       if (pipeline->shaders[i])
> > -                               pipeline->active_stages |=
> mesa_to_vk_shader_stage(i);
> > -               }
> >                 return;
> >         }
> > 
> > @@ -2015,7 +2013,6 @@ void radv_create_shaders(struct radv_pipeline
> *pipeline,
> >                                                     stage ? stage->pName
> : "main", i,
> >                                                     stage ? stage->
> pSpecializationInfo : NULL,
> >                                                     flags);
> > -               pipeline->active_stages |= mesa_to_vk_shader_stage(i);
> > 
> >                 /* We don't want to alter meta shaders IR directly so
> clone it
> >                  * first.
> > --
> > 2.14.3
> >
> > ___
> > mesa-stable mailing list
> > mesa-sta...@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-stable
> 
> Hi Alex,
> 
> This doesn't apply cleanly to the 18.1 tree with the following collision:
> 
> ++<<<<<<< HEAD                                                            
>  
>                            
>  +                                                  stage ? stage->
> pSpecializationInfo : NULL);       
>  +              pipeline->active_stages |= mesa_to_vk_shader_stage(i);    
>  
>                            
> ++===                                                                 
>                            
> +                                                   stage ? stage->
> pSpecializationInfo : NULL,         
> +                                                   flags);               
>                            
> ++>>>>>>> 0fa51bfdbe5... radv: Set active_stages the same whether or not
> shaders were cached           
> 
> I can remove the flags field (which doesn't exist in 18.1) before merging
> if you
> think that's the right thing to do. Does that seem reasonable?
> 
> 
> Yes, that's correct. Should just be removing the pipeline->active_stages line
> at that point.
> 
> Thanks,
> Alex

Thanks! This is in the tree for 18.1.2.

Dylan


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


[Mesa-dev] [ANNOUNCE] mesa 18.1.1

2018-06-01 Thread Dylan Baker
Hi List,

18.1.1 is now available.

In this release we have:

Numerous fixes for radv, a few fixes for i965, tegra, amd/addrlib, dri3, virgl,
tgsi, nv30, opencl, core mesa, core vulkan, st/mesa, etnaviv and spirv all got 
fixes.

A few specifically:

Radv fixed one extension and several features on a per-generation basis.

Vulkan got fixes for a potential free of uninitialized memory

Tegra got modifier fixes.

nv30 fixed displayable formats.

i965 now works correctly for GLK 2x6 systems.

git tag: mesa-18.1.1

https://mesa.freedesktop.org/archive/mesa-18.1.1.tar.gz
MD5:  edd2d3046b2ab4f4a9f8b4ac92b43733  mesa-18.1.1.tar.gz
SHA1: 9333892b5df6a9f3f679334a0641ec8b35512a43  mesa-18.1.1.tar.gz
SHA256: 366a35f7530a016f2a8284fb0ee5759eeb216b4d6fa47f0e96b89ad2e43faf96  
mesa-18.1.1.tar.gz
SHA512: 
51c096ccdff3729d325ac95836f119aa5f7d3d7d21e82ca7d9838d655c5c55f023b011c73f3472d603723b49d06bf8c3ed0c9d96eea3374163ebf9d57f4d9d7c
  mesa-18.1.1.tar.gz
PGP:  https://mesa.freedesktop.org/archive/mesa-18.1.1.tar.gz.sig

https://mesa.freedesktop.org/archive/mesa-18.1.1.tar.xz
MD5:  063468c930ff61d211ece0191874fa95  mesa-18.1.1.tar.xz
SHA1: 60d6b58f8f119b3731de587bdad30c1ecbb52678  mesa-18.1.1.tar.xz
SHA256: d3312a2ede5aac14a47476b208b8e3a401367838330197c4588ab8ad420d7781  
mesa-18.1.1.tar.xz
SHA512: 
7783adc1ec7a1c3d092acfcca6b4ba19450c15a7f0d7f41fbf25e482236615d79ce24afe60959066ea7aa851df4f74fa3c569fa6d847ea79e6bfe046b8c65e90
  mesa-18.1.1.tar.xz
PGP:  https://mesa.freedesktop.org/archive/mesa-18.1.1.tar.xz.sig



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


Re: [Mesa-dev] [PATCH mesa] meson: fix platforms check for `-D egl=true`

2018-06-04 Thread Dylan Baker
Reviewed-by: Dylan Baker 

Quoting Eric Engestrom (2018-06-04 03:46:32)
> Fixes: 0ed6a87a106b6e2266e0 "meson: fix platforms=[]"
> Reported-by: Christoph Haag 
> Signed-off-by: Eric Engestrom 
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 7b7c118d77b11cc38f7b..1d1b2a979b1de80ddd06 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -292,7 +292,7 @@ elif _egl == 'true'
>  error('EGL requires dri')
>elif not with_shared_glapi
>  error('EGL requires shared-glapi')
> -  elif with_platforms
> +  elif not with_platforms
>  error('No platforms specified, consider -Dplatforms=drm,x11 at least')
>elif not ['disabled', 'dri'].contains(with_glx)
>  error('EGL requires dri, but a GLX is being built without dri')
> -- 
> Cheers,
>   Eric
> 


signature.asc
Description: signature
___
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-04 Thread Dylan Baker
Quoting Daniel Stone (2018-06-03 13:19:51)
> Hi Laura,
> 
> On 25 May 2018 at 01:27, Laura Ekstrand  wrote:
> > 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.
> 
> One thing I've just remembered is that https://www.mesa3d.org/archive/
> serves all the tarballs for Mesa releases. Given how Pages is
> structured, we don't have a good way to redirect these to the old
> server, so the Pages repository needs to hold all the tarballs. This
> probably suggests to me that the site should live in a different repo,
> where we can just commit all the tarballs.
> 
> I reflexively didn't love the idea of committing tarballs to a git
> repository, but the more I think about it, the more I like the idea.
> It makes it more clear where they're coming from, makes the provenance
> easier to verify, gives us audit logs of who put them in, and so on.
> 
> Cheers,
> Daniel

Have you considered git-lfs? I don't know if we've got it set up, but gitlab
supports it and it's pretty nice for dealing with repos with large binary files.

Dylan


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


Re: [Mesa-dev] [PATCH 08/11] radeonsi: fix memory exhaustion issue with DCC statistics gathering with DRI2

2018-06-29 Thread Dylan Baker
Quoting Marek Olšák (2018-06-29 09:48:08)
> On Fri, Jun 29, 2018 at 11:40 AM, Dylan Baker  wrote:
> > Quoting Marek Olšák (2018-06-18 16:33:09)
> >> From: Marek Olšák 
> >>
> >> Cc: 18.1 
> >> ---
> >>  src/gallium/drivers/radeonsi/si_blit.c | 30 +++---
> >>  1 file changed, 27 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/src/gallium/drivers/radeonsi/si_blit.c 
> >> b/src/gallium/drivers/radeonsi/si_blit.c
> >> index fe059b36577..93cf7fe9001 100644
> >> --- a/src/gallium/drivers/radeonsi/si_blit.c
> >> +++ b/src/gallium/drivers/radeonsi/si_blit.c
> >> @@ -1320,23 +1320,47 @@ static void si_flush_resource(struct pipe_context 
> >> *ctx,
> >> if (rtex->dcc_separate_buffer && !rtex->separate_dcc_dirty)
> >> return;
> >>
> >> if (!rtex->is_depth && (rtex->cmask.size || rtex->dcc_offset)) {
> >> si_blit_decompress_color(sctx, rtex, 0, res->last_level,
> >>  0, util_max_layer(res, 0),
> >>  rtex->dcc_separate_buffer != 
> >> NULL);
> >> }
> >>
> >> /* Always do the analysis even if DCC is disabled at the moment. */
> >> -   if (rtex->dcc_gather_statistics && rtex->separate_dcc_dirty) {
> >> -   rtex->separate_dcc_dirty = false;
> >> -   vi_separate_dcc_process_and_reset_stats(ctx, rtex);
> >> +   if (rtex->dcc_gather_statistics) {
> >> +   bool separate_dcc_dirty = rtex->separate_dcc_dirty;
> >> +
> >> +   /* If the color buffer hasn't been unbound and fast clear 
> >> hasn't
> >> +* been used, separate_dcc_dirty is false, but there may 
> >> have been
> >> +* new rendering. Check if the color buffer is bound and 
> >> assume
> >> +* it's dirty.
> >> +*
> >> +* Note that DRI2 never unbinds window colorbuffers, which 
> >> means
> >> +* the DCC pipeline statistics query would never be re-set 
> >> and would
> >> +* keep adding new results until all free memory is 
> >> exhausted if we
> >> +* didn't do this.
> >> +*/
> >> +   if (!separate_dcc_dirty) {
> >> +   for (unsigned i = 0; i < 
> >> sctx->framebuffer.state.nr_cbufs; i++) {
> >> +   if (sctx->framebuffer.state.cbufs[i] &&
> >> +   
> >> sctx->framebuffer.state.cbufs[i]->texture == res) {
> >> +   separate_dcc_dirty = true;
> >> +   break;
> >> +   }
> >> +   }
> >> +   }
> >> +
> >> +   if (separate_dcc_dirty) {
> >> +   rtex->separate_dcc_dirty = false;
> >> +   vi_separate_dcc_process_and_reset_stats(ctx, rtex);
> >> +   }
> >> }
> >>  }
> >>
> >>  void si_decompress_dcc(struct si_context *sctx, struct r600_texture *rtex)
> >>  {
> >> if (!rtex->dcc_offset)
> >> return;
> >>
> >> si_blit_decompress_color(sctx, rtex, 0, 
> >> rtex->buffer.b.b.last_level,
> >>  0, util_max_layer(>buffer.b.b, 0),
> >> --
> >> 2.17.1
> >>
> >> ___
> >> mesa-dev mailing list
> >> mesa-dev@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
> > Hi Marek,
> >
> > This didn't apply cleanly to 18.1 because of
> > 1ba87f4438069964af6548f4fa05386be999f4de (radeonsi: rename r600_texture ->
> > si_texture, rxxx -> xxx or sxxx), I've attempted to rebase the commit by
> > changing "tex" to "rtex", please take a look at the commit in staging/18.1 
> > in
> > the main tree or 18.1-proposed in my tree and let me know if it looks good 
> > to
> > you.
> 
> Yes, it looks good. Thanks.
> 
> Marek

Thank you.


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


[Mesa-dev] [ANNOUNCE] mesa 18.1.3

2018-06-29 Thread Dylan Baker
Hi List,

Mesa 18.1.3 is now available. This is a bug fix point release in the 18.1
series.

In this release we have:
 - numerous fixes for radv
 - some fixes for common radeon code
 - several meson fixes
 - fixes for autotools with non-gnu grep
 - fixes for both the nir and glsl compilers
 - An i965 fix for some gpu hangs on SNB

git tag: mesa-18.1.3

https://mesa.freedesktop.org/archive/mesa-18.1.3.tar.gz
MD5:  7c283b1c847829d443c65b30c787b5cd  mesa-18.1.3.tar.gz
SHA1: 611d4e7912779eb0ce11f4df59f8e633ecb451bf  mesa-18.1.3.tar.gz
SHA256: 2a1e36280d01ad18ba6d5b3fbd653ceaa109eaa031b78eb5dfaa4df452742b66  
mesa-18.1.3.tar.gz
SHA512: 
59f9eee8c9045d1cf4b0a97cd542a3f100571e193f87d795e9d435bae14a3bee9e43bdff08f5a9db83b92274710d95bef2d33db3bbcb7650812035cb7338
  mesa-18.1.3.tar.gz
PGP:  https://mesa.freedesktop.org/archive/mesa-18.1.3.tar.gz.sig

https://mesa.freedesktop.org/archive/mesa-18.1.3.tar.xz
MD5:  b34273403a605f6f98ead00f0bdf8e0b  mesa-18.1.3.tar.xz
SHA1: 0a5fb3096108a95f913411267b8a374f9ff547b2  mesa-18.1.3.tar.xz
SHA256: 54f08deeda0cd2f818e8d40140040ed013de7852573002453b7f50da9ea738ce  
mesa-18.1.3.tar.xz
SHA512: 
f6e5b81a80a309a36a04759d18364d3c71c48d1cb88f87b2f5432ef003092a22046e88ce2082031d5d52b60ba36f585d8df52e06ecc7a5158079936236f36887
  mesa-18.1.3.tar.xz
PGP:  https://mesa.freedesktop.org/archive/mesa-18.1.3.tar.xz.sig



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


Re: [Mesa-dev] [ANNOUNCE] Mesa 18.1.2 release candidate

2018-06-26 Thread Dylan Baker
Quoting Juan A. Suarez Romero (2018-06-19 00:08:27)
> On Fri, 2018-06-15 at 09:36 -0700, Dylan Baker wrote:
> > Quoting Juan A. Suarez Romero (2018-06-15 07:26:18)
> > > On Thu, 2018-06-14 at 10:16 -0700, Dylan Baker wrote:
> > > > Quoting Bas Nieuwenhuizen (2018-06-14 09:21:49)
> > > > > On Thu, Jun 14, 2018 at 6:13 PM,   wrote:
> > > > > > Hello list,
> > > > > > 
> > > > > > The candidate for the Mesa 18.1.2 is now available. Currently we 
> > > > > > have:
> > > > > >  - 42 queued
> > > > > >  - 6 nominated (outstanding)
> > > > > >  - and 0 rejected patches
> > > > > > 
> > > > > > Notable changes in this release:
> > > > > > - numerous fixes for radv
> > > > > > - libatomic checks for meson, as well as fixing coverage for less 
> > > > > > common (not
> > > > > >   arm or x86) platforms
> > > > > > - lots of common Intel fixes
> > > > > > - GLX fixes
> > > > > > - tarball fixes for android
> > > > > > - meson assembly fixes for x86 when doing an x86 -> x86 cross 
> > > > > > compile
> > > > > > 
> > > > > > Take a look at section "Mesa stable queue" for more information.
> > > > > > 
> > > > > > 
> > > > > > Testing reports/general approval
> > > > > > 
> > > > > > Any testing reports (or general approval of the state of the 
> > > > > > branch) will be
> > > > > > greatly appreciated.
> > > > > > 
> > > > > > The plan is to have 18.1.2 this Friday (June 13th), around or 
> > > > > > shortly after 10
> > > > > > AM PDT.
> > > > > 
> > > > > June 15th?
> > > > 
> > > > Yes, June 15th.
> > > > 
> > > > Apparently being woken up at 5AM does more brain damage than I thought.
> > > 
> > > Also, we usually wait 48h (two days) between the pre-announcement and the 
> > > final
> > > release, to give more time for testing.
> > > 
> > > 
> > > J.A.
> > > 
> > 
> > I don't even understand why we make these announcements TBH. I have a public
> > 18.1-proposed branch that I push to *every weekday*. 
> 
> 
> Out of curiosity, any reason to keep the proposed branch in your personal
> repository, instead of in main Mesa repo?
> 
> 
> I thought the proposal was to have those proposed/wip branches in the main
> repository, so everybody is aware were they are, no matter who is in charge of
> the release.
> 
> 
> J.A.
> 
> > Anyone can pull that branch
> > *anytime* to get the latest version. The only thing the announce email 
> > really
> > serves AFAICT, is to say "the staging/proposed branch has been merged to the
> > release branch". I don't think that's all that interesting TBH.
> > 
> > Dylan

I just remembered that you can set two push remotes for a single branch, so I
think I'll add a staging/18.1 branch to master as a second remote and push to
that as well. Do you like that name, or would you prefer something different?

Dylan


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


Re: [Mesa-dev] [PATCH 3/4] glsl/glcpp/tests: reinstate srcdir/abs_builddir blurb

2018-06-26 Thread Dylan Baker
Quoting Emil Velikov (2018-06-26 06:19:08)
> On 21 June 2018 at 16:15, Dylan Baker  wrote:
> > Quoting Emil Velikov (2018-04-24 10:49:21)
> >> From: Emil Velikov 
> >>
> >> Bring back the "detection" of the said variables, to allow
> >> standalone execution.
> >>
> >> Fixes: db8cd8e36771 ("glcpp/tests: Convert shell scripts to a python
> >> script")
> >> Cc: Dylan Baker 
> >> Signed-off-by: Emil Velikov 
> >> ---
> >>  src/compiler/glsl/glcpp/tests/glcpp-test.sh | 13 +
> >>  1 file changed, 13 insertions(+)
> >>
> >> diff --git a/src/compiler/glsl/glcpp/tests/glcpp-test.sh 
> >> b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
> >> index 7ca8aa26a8..b8397ec890 100755
> >> --- a/src/compiler/glsl/glcpp/tests/glcpp-test.sh
> >> +++ b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
> >> @@ -1,3 +1,16 @@
> >>  #!/bin/sh
> >>
> >> +if [ -z "$srcdir" -o -z "$abs_builddir" ]; then
> >> +echo ""
> >> +echo "Warning: you're invoking the script manually and things may 
> >> fail."
> >> +echo "Attempting to determine/set srcdir and abs_builddir variables."
> >> +echo ""
> >> +
> >> +# Should point to `dirname Makefile.glsl.am`
> >> +srcdir=./../../../
> >> +cd `dirname "$0"`
> >> +# Should point to `dirname Makefile` equivalent to the above.
> >> +abs_builddir=`pwd`/../../../
> >> +fi
> >> +
> >>  $PYTHON2 $srcdir/glsl/glcpp/tests/glcpp_test.py 
> >> $abs_builddir/glsl/glcpp/glcpp $srcdir/glsl/glcpp/tests --unix --windows 
> >> --oldmac --bizarro
> >> --
> >> 2.16.0
> >>
> >
> > Hi Emil,
> >
> > This doesn't apply cleanly to 18.1 because it needs the previous patch. 
> > Would
> > you like me to pull that as well, or drop this?
> >
> As long as the final patch in the series (mentioned below) is in, I
> don't have strong opinion on the rest.
> 
> commit d589eddc8be5240632d42ae1931b0b6a82ff524c
> Author: Emil Velikov 
> Date:   Tue Apr 24 18:49:22 2018 +0100
> 
>glsl/tests/glcpp: reinstate "error out if no tests found"
> 
> 
> Thanks
> Emil

That commit is already staged. I don't have strong opinions about these two
either, but since this and the previous patch are mainly aimed at developers and
most developers don't work in the stable branches, I'm inclined to not pull
them.  Does that sound reasonable?

Dylan


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


Re: [Mesa-dev] [PATCH 07/11] radeonsi: reorder and initialize more fields in si_reallocate_texture_inplace

2018-06-26 Thread Dylan Baker
Quoting Marek Olšák (2018-06-18 16:33:08)
> From: Marek Olšák 
> 
> Some fields shouldn't be initialized, like framebuffers_bound and other stats.
> It's hopefully complete now.
> 
> Cc: 18.1 
> ---
>  src/gallium/drivers/radeonsi/si_texture.c | 31 ++-
>  1 file changed, 25 insertions(+), 6 deletions(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_texture.c 
> b/src/gallium/drivers/radeonsi/si_texture.c
> index 2103134156d..e1afe71a3c7 100644
> --- a/src/gallium/drivers/radeonsi/si_texture.c
> +++ b/src/gallium/drivers/radeonsi/si_texture.c
> @@ -552,36 +552,55 @@ static void si_reallocate_texture_inplace(struct 
> si_context *sctx,
> /* Replace the structure fields of rtex. */
> rtex->buffer.b.b.bind = templ.bind;
> pb_reference(>buffer.buf, new_tex->buffer.buf);
> rtex->buffer.gpu_address = new_tex->buffer.gpu_address;
> rtex->buffer.vram_usage = new_tex->buffer.vram_usage;
> rtex->buffer.gart_usage = new_tex->buffer.gart_usage;
> rtex->buffer.bo_size = new_tex->buffer.bo_size;
> rtex->buffer.bo_alignment = new_tex->buffer.bo_alignment;
> rtex->buffer.domains = new_tex->buffer.domains;
> rtex->buffer.flags = new_tex->buffer.flags;
> -   rtex->size = new_tex->size;
> -   rtex->db_render_format = new_tex->db_render_format;
> -   rtex->db_compatible = new_tex->db_compatible;
> -   rtex->can_sample_z = new_tex->can_sample_z;
> -   rtex->can_sample_s = new_tex->can_sample_s;
> +
> rtex->surface = new_tex->surface;
> +   rtex->size = new_tex->size;
> +   r600_texture_reference(>flushed_depth_texture,
> +  new_tex->flushed_depth_texture);
> +
> rtex->fmask_offset = new_tex->fmask_offset;
> rtex->cmask = new_tex->cmask;
> +   r600_resource_reference(>cmask_buffer, new_tex->cmask_buffer);
> +   rtex->dcc_offset = new_tex->dcc_offset;
> rtex->cb_color_info = new_tex->cb_color_info;
> +   memcpy(rtex->color_clear_value, new_tex->color_clear_value,
> +  sizeof(rtex->color_clear_value));
> rtex->last_msaa_resolve_target_micro_mode = 
> new_tex->last_msaa_resolve_target_micro_mode;
> +
> rtex->htile_offset = new_tex->htile_offset;
> +   rtex->depth_clear_value = new_tex->depth_clear_value;
> +   rtex->dirty_level_mask = new_tex->dirty_level_mask;
> +   rtex->stencil_dirty_level_mask = new_tex->stencil_dirty_level_mask;
> +   rtex->db_render_format = new_tex->db_render_format;
> +   rtex->stencil_clear_value = new_tex->stencil_clear_value;
> rtex->tc_compatible_htile = new_tex->tc_compatible_htile;
> rtex->depth_cleared = new_tex->depth_cleared;
> rtex->stencil_cleared = new_tex->stencil_cleared;
> +   rtex->upgraded_depth = new_tex->upgraded_depth;
> +   rtex->db_compatible = new_tex->db_compatible;
> +   rtex->can_sample_z = new_tex->can_sample_z;
> +   rtex->can_sample_s = new_tex->can_sample_s;
> +
> +   rtex->separate_dcc_dirty = new_tex->separate_dcc_dirty;
> rtex->dcc_gather_statistics = new_tex->dcc_gather_statistics;
> -   rtex->framebuffers_bound = new_tex->framebuffers_bound;
> +   r600_resource_reference(>dcc_separate_buffer,
> +   new_tex->dcc_separate_buffer);
> +   r600_resource_reference(>last_dcc_separate_buffer,
> +   new_tex->last_dcc_separate_buffer);
>  
> if (new_bind_flag == PIPE_BIND_LINEAR) {
> assert(!rtex->htile_offset);
> assert(!rtex->cmask.size);
> assert(!rtex->surface.fmask_size);
> assert(!rtex->dcc_offset);
> assert(!rtex->is_depth);
> }
>  
> r600_texture_reference(_tex, NULL);
> -- 
> 2.17.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Hi Marek,

This doesn't apply cleanly to 18.1. It relies on at least
1ba87f4438069964af6548f4fa05386be999f4de, which is massive and also doesn't
apply cleanly. What would you like to do?

Dylan


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


Re: [Mesa-dev] [PATCH 07/11] radeonsi: reorder and initialize more fields in si_reallocate_texture_inplace

2018-06-26 Thread Dylan Baker
Quoting Marek Olšák (2018-06-26 09:31:40)
> 
> 
> On Tue, Jun 26, 2018, 11:57 AM Dylan Baker  wrote:
> 
> Quoting Marek Olšák (2018-06-18 16:33:08)
> > From: Marek Olšák 
> >
> > Some fields shouldn't be initialized, like framebuffers_bound and other
> stats.
> > It's hopefully complete now.
> >
> > Cc: 18.1 
> > ---
> >  src/gallium/drivers/radeonsi/si_texture.c | 31 ++-
> >  1 file changed, 25 insertions(+), 6 deletions(-)
> >
> > diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/
> drivers/radeonsi/si_texture.c
> > index 2103134156d..e1afe71a3c7 100644
> > --- a/src/gallium/drivers/radeonsi/si_texture.c
> > +++ b/src/gallium/drivers/radeonsi/si_texture.c
> > @@ -552,36 +552,55 @@ static void si_reallocate_texture_inplace(struct
> si_context *sctx,
> >         /* Replace the structure fields of rtex. */
> >         rtex->buffer.b.b.bind = templ.bind;
> >         pb_reference(>buffer.buf, new_tex->buffer.buf);
> >         rtex->buffer.gpu_address = new_tex->buffer.gpu_address;
> >         rtex->buffer.vram_usage = new_tex->buffer.vram_usage;
> >         rtex->buffer.gart_usage = new_tex->buffer.gart_usage;
> >         rtex->buffer.bo_size = new_tex->buffer.bo_size;
> >         rtex->buffer.bo_alignment = new_tex->buffer.bo_alignment;
> >         rtex->buffer.domains = new_tex->buffer.domains;
> >         rtex->buffer.flags = new_tex->buffer.flags;
> > -       rtex->size = new_tex->size;
> > -       rtex->db_render_format = new_tex->db_render_format;
> > -       rtex->db_compatible = new_tex->db_compatible;
> > -       rtex->can_sample_z = new_tex->can_sample_z;
> > -       rtex->can_sample_s = new_tex->can_sample_s;
> > +
> >         rtex->surface = new_tex->surface;
> > +       rtex->size = new_tex->size;
> > +       r600_texture_reference(>flushed_depth_texture,
> > +                              new_tex->flushed_depth_texture);
> > +
> >         rtex->fmask_offset = new_tex->fmask_offset;
> >         rtex->cmask = new_tex->cmask;
> > +       r600_resource_reference(>cmask_buffer, new_tex->
> cmask_buffer);
> > +       rtex->dcc_offset = new_tex->dcc_offset;
> >         rtex->cb_color_info = new_tex->cb_color_info;
> > +       memcpy(rtex->color_clear_value, new_tex->color_clear_value,
> > +              sizeof(rtex->color_clear_value));
> >         rtex->last_msaa_resolve_target_micro_mode = new_tex->
> last_msaa_resolve_target_micro_mode;
> > +
> >         rtex->htile_offset = new_tex->htile_offset;
> > +       rtex->depth_clear_value = new_tex->depth_clear_value;
> > +       rtex->dirty_level_mask = new_tex->dirty_level_mask;
> > +       rtex->stencil_dirty_level_mask = new_tex->
> stencil_dirty_level_mask;
> > +       rtex->db_render_format = new_tex->db_render_format;
> > +       rtex->stencil_clear_value = new_tex->stencil_clear_value;
> >         rtex->tc_compatible_htile = new_tex->tc_compatible_htile;
> >         rtex->depth_cleared = new_tex->depth_cleared;
> >         rtex->stencil_cleared = new_tex->stencil_cleared;
> > +       rtex->upgraded_depth = new_tex->upgraded_depth;
> > +       rtex->db_compatible = new_tex->db_compatible;
> > +       rtex->can_sample_z = new_tex->can_sample_z;
> > +       rtex->can_sample_s = new_tex->can_sample_s;
> > +
> > +       rtex->separate_dcc_dirty = new_tex->separate_dcc_dirty;
> >         rtex->dcc_gather_statistics = new_tex->dcc_gather_statistics;
> > -       rtex->framebuffers_bound = new_tex->framebuffers_bound;
> > +       r600_resource_reference(>dcc_separate_buffer,
> > +                               new_tex->dcc_separate_buffer);
> > +       r600_resource_reference(>last_dcc_separate_buffer,
> > +                               new_tex->last_dcc_separate_buffer);
> > 
> >         if (new_bind_flag == PIPE_BIND_LINEAR) {
> >                 assert(!rtex->htile_offset);
> >                 assert(!rtex->cmask.size);
> >                 assert(!rtex->surface.fmask_size);
> >       

Re: [Mesa-dev] [ANNOUNCE] Mesa 18.1.2 release candidate

2018-06-27 Thread Dylan Baker
Quoting Emil Velikov (2018-06-27 01:39:05)
> On 26 June 2018 at 16:34, Dylan Baker  wrote:
> 
> > I just remembered that you can set two push remotes for a single branch, so 
> > I
> > think I'll add a staging/18.1 branch to master as a second remote and push 
> > to
> > that as well. Do you like that name, or would you prefer something 
> > different?
> >
> My initial idea was to use wip/ although staging/ seems clearer and
> more obvious.
> 
> Thanks
> Emil

I'd like to avoid wip/ if possible, since at least Jason and myself use wip/ for
our own branches. That's why I thought of using staging.

Dylan


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


[Mesa-dev] [ANNOUNCE] mesa 18.1.3

2018-06-27 Thread Dylan Baker
Hi list,

Mesa 18.1.3 is planned for Friday June 29th, at 10AM PDT.

Statistics for this release:
 - 37 queued
 - 0 nominated
 - 2 rejected

All rejected patches have already had author follow-ups.

In the mesa repo, the branch "staging/18.1" in the mesa gitlab will (unless bugs
are found) be rebased into the 18.1 branch for the release on Friday. This has
been run though the Intel CI already and passes there, anyone who wants to test
on other hardware/drivers please do so and report any bugs.

Dylan


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


Re: [Mesa-dev] [PATCH 3/4] glsl/glcpp/tests: reinstate srcdir/abs_builddir blurb

2018-06-25 Thread Dylan Baker
Quoting Dylan Baker (2018-06-21 08:15:20)
> Quoting Emil Velikov (2018-04-24 10:49:21)
> > From: Emil Velikov 
> > 
> > Bring back the "detection" of the said variables, to allow
> > standalone execution.
> > 
> > Fixes: db8cd8e36771 ("glcpp/tests: Convert shell scripts to a python
> > script")
> > Cc: Dylan Baker 
> > Signed-off-by: Emil Velikov 
> > ---
> >  src/compiler/glsl/glcpp/tests/glcpp-test.sh | 13 +
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/src/compiler/glsl/glcpp/tests/glcpp-test.sh 
> > b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
> > index 7ca8aa26a8..b8397ec890 100755
> > --- a/src/compiler/glsl/glcpp/tests/glcpp-test.sh
> > +++ b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
> > @@ -1,3 +1,16 @@
> >  #!/bin/sh
> >  
> > +if [ -z "$srcdir" -o -z "$abs_builddir" ]; then
> > +echo ""
> > +echo "Warning: you're invoking the script manually and things may 
> > fail."
> > +echo "Attempting to determine/set srcdir and abs_builddir variables."
> > +echo ""
> > +
> > +# Should point to `dirname Makefile.glsl.am`
> > +srcdir=./../../../
> > +cd `dirname "$0"`
> > +# Should point to `dirname Makefile` equivalent to the above.
> > +abs_builddir=`pwd`/../../../
> > +fi
> > +
> >  $PYTHON2 $srcdir/glsl/glcpp/tests/glcpp_test.py 
> > $abs_builddir/glsl/glcpp/glcpp $srcdir/glsl/glcpp/tests --unix --windows 
> > --oldmac --bizarro
> > -- 
> > 2.16.0
> > 
> 
> Hi Emil,
> 
> This doesn't apply cleanly to 18.1 because it needs the previous patch. Would
> you like me to pull that as well, or drop this?
> 
> Dylan
> 

Ping.


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


Re: [Mesa-dev] [PATCH 1/4] radeonsi: disable DCC MSAA for 128bpp formats on Stoney

2018-06-22 Thread Dylan Baker
Quoting Marek Olšák (2018-06-22 14:16:36)
> On Fri, Jun 22, 2018 at 12:48 PM, Dylan Baker  wrote:
> > Quoting Marek Olšák (2018-06-20 18:01:55)
> >> From: Marek Olšák 
> >>
> >> Cc: 18.1 
> >> ---
> >>  src/gallium/drivers/radeonsi/si_texture.c | 5 +
> >>  1 file changed, 5 insertions(+)
> >>
> >> diff --git a/src/gallium/drivers/radeonsi/si_texture.c 
> >> b/src/gallium/drivers/radeonsi/si_texture.c
> >> index b46208be252..05d5d1b8a6d 100644
> >> --- a/src/gallium/drivers/radeonsi/si_texture.c
> >> +++ b/src/gallium/drivers/radeonsi/si_texture.c
> >> @@ -266,20 +266,25 @@ static int si_init_surface(struct si_screen *sscreen,
> >> if (is_stencil)
> >> flags |= RADEON_SURF_SBUFFER;
> >> }
> >>
> >> if (sscreen->info.chip_class >= VI &&
> >> (ptex->flags & SI_RESOURCE_FLAG_DISABLE_DCC ||
> >>  ptex->format == PIPE_FORMAT_R9G9B9E5_FLOAT ||
> >>  (ptex->nr_samples >= 2 && !sscreen->dcc_msaa_allowed)))
> >> flags |= RADEON_SURF_DISABLE_DCC;
> >>
> >> +   /* Stoney: 128bpp MSAA textures randomly fail piglit tests with 
> >> DCC. */
> >> +   if (sscreen->info.family == CHIP_STONEY &&
> >> +   bpe == 16 && ptex->nr_samples >= 2)
> >> +   flags |= RADEON_SURF_DISABLE_DCC;
> >> +
> >> /* VI: DCC clear for 4x and 8x MSAA array textures unimplemented. 
> >> */
> >> if (sscreen->info.chip_class == VI &&
> >> num_color_samples >= 4 &&
> >> ptex->array_size > 1)
> >> flags |= RADEON_SURF_DISABLE_DCC;
> >>
> >> /* GFX9: DCC clear for 4x and 8x MSAA textures unimplemented. */
> >> if (sscreen->info.chip_class >= GFX9 &&
> >> num_color_samples >= 4)
> >> flags |= RADEON_SURF_DISABLE_DCC;
> >> --
> >> 2.17.1
> >>
> >> ___
> >> mesa-dev mailing list
> >> mesa-dev@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
> > Hi Marek,
> >
> > For this to apply to 18.1 I needed to pull
> > 1cc2e0cc6b47bd5efbf2af266405060785085e6b
> > "radeonsi: fully enable 2x DCC MSAA for array and non-array textures",
> > is that reasonable, or would you like me to do something else?
> 
> OK, then this fix is not necessary.
> 
> Thanks,
> Marek

Okay, I'll add it to the ignore-list.

Thanks.


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


Re: [Mesa-dev] [PATCH 0/2] Two stable fixes for call instructions

2018-06-25 Thread Dylan Baker
Quoting Jason Ekstrand (2018-06-25 09:13:03)
> These two patches are fixes for call instructions that get the basemark
> shaders to pass NIR validation.  Since the deref instruction stuff has
> landed, these will have to go straight to stable without ever hitting
> master.
> 
> Dylan, please merge to whatever place you merge stable things once they've
> had review.

FYI, the best ways to ensure something get to stable are to (in order):

Add a Fixes: abcdef123456789 ("nir: do things")

Or, if your fixes don't fix a specific commit:

CC: "18.1" 

There are scripts that look over the master branch, and generate a list of
commits to pull into the stable branch based on that.

Dylan

> 
> Cc: Dylan Baker 
> 
> Jason Ekstrand (2):
>   nir: Handle call instructions in foreach_src
>   nir/validate: Use the type from the tail of call parameter derefs
> 
>  src/compiler/nir/nir.c  | 17 -
>  src/compiler/nir/nir_validate.c |  6 --
>  2 files changed, 20 insertions(+), 3 deletions(-)
> 
> -- 
> 2.17.1
> 


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


Re: [Mesa-dev] [PATCH 0/2] Two stable fixes for call instructions

2018-06-25 Thread Dylan Baker
Quoting Jason Ekstrand (2018-06-25 12:36:39)
> On June 25, 2018 12:09:50 Dylan Baker  wrote:
> 
> > Quoting Jason Ekstrand (2018-06-25 09:13:03)
> >> These two patches are fixes for call instructions that get the basemark
> >> shaders to pass NIR validation.  Since the deref instruction stuff has
> >> landed, these will have to go straight to stable without ever hitting
> >> master.
> >>
> >> Dylan, please merge to whatever place you merge stable things once they've
> >> had review.
> >
> > FYI, the best ways to ensure something get to stable are to (in order):
> >
> > Add a Fixes: abcdef123456789 ("nir: do things")
> >
> > Or, if your fixes don't fix a specific commit:
> >
> > CC: "18.1" 
> >
> > There are scripts that look over the master branch, and generate a list of
> > commits to pull into the stable branch based on that.
> 
> Above, I clearly stated that these patches will never hurt the master 
> branch. They will need to go directly to stable.

Ah, sorry, I misread that.


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


Re: [Mesa-dev] [PATCH 01/19] radeonsi: clean up passing the is_monolithic flag for compilation

2018-06-25 Thread Dylan Baker
R300 had the same problem. Linking to amd_common ends up pulling in addrlib 
too. Jfyi

On June 25, 2018 5:48:51 PM PDT, Timothy Arceri  wrote:
>On 26/06/18 09:51, Dieter Nützel wrote:
>> Hello Marek,
>> 
>> after this series landed I get this:
>> 
>> Making all in targets/pipe-loader
>> make[4]: Verzeichnis „/opt/mesa/src/gallium/targets/pipe-loader“ wird
>
>> betreten
>>    CXXLD    pipe_r600.la
>>
>../../../../src/gallium/winsys/radeon/drm/.libs/libradeonwinsys.a(radeon_drm_surface.o):
>
>> In function `radeon_winsys_surface_init':
>> /opt/mesa/src/gallium/winsys/radeon/drm/radeon_drm_surface.c:307: 
>> undefined reference to `ac_compute_cmask'
>> collect2: error: ld returned 1 exit status
>> make[4]: *** [Makefile:970: pipe_r600.la] Fehler 1
>> 
>> Didn't have more time for digging, yet.
>
>r600 probably doesn't get linked to the amd common (ac) code that is 
>normally just shared between radv and radeonsi.
>
>> 
>> Dieter
>> 
>> Am 23.06.2018 00:31, schrieb Marek Olšák:
>>> From: Marek Olšák 
>>>
>>> ---
>>>  src/gallium/drivers/radeonsi/si_shader.c  | 30
>+--
>>>  src/gallium/drivers/radeonsi/si_shader.h  |  1 -
>>>  .../drivers/radeonsi/si_shader_internal.h |  3 --
>>>  .../drivers/radeonsi/si_state_shaders.c   |  7 +++--
>>>  4 files changed, 18 insertions(+), 23 deletions(-)
>>>
>>> diff --git a/src/gallium/drivers/radeonsi/si_shader.c
>>> b/src/gallium/drivers/radeonsi/si_shader.c
>>> index e7e2a12a7b0..677853af60b 100644
>>> --- a/src/gallium/drivers/radeonsi/si_shader.c
>>> +++ b/src/gallium/drivers/radeonsi/si_shader.c
>>> @@ -5047,22 +5047,21 @@ static void create_function(struct
>>> si_shader_context *ctx)
>>>  break;
>>>  default:
>>>  assert(0 && "unimplemented shader");
>>>  return;
>>>  }
>>>
>>>  si_create_function(ctx, "main", returns, num_returns, ,
>>>     si_get_max_workgroup_size(shader));
>>>
>>>  /* Reserve register locations for VGPR inputs the PS prolog may
>
>>> need. */
>>> -    if (ctx->type == PIPE_SHADER_FRAGMENT &&
>>> -    ctx->separate_prolog) {
>>> +    if (ctx->type == PIPE_SHADER_FRAGMENT && 
>>> !ctx->shader->is_monolithic) {
>>>  ac_llvm_add_target_dep_function_attr(ctx->main_fn,
>>>   "InitialPSInputAddr",
>>>   S_0286D0_PERSP_SAMPLE_ENA(1) |
>>>   S_0286D0_PERSP_CENTER_ENA(1) |
>>>   S_0286D0_PERSP_CENTROID_ENA(1) |
>>>   S_0286D0_LINEAR_SAMPLE_ENA(1) |
>>>   S_0286D0_LINEAR_CENTER_ENA(1) |
>>>   S_0286D0_LINEAR_CENTROID_ENA(1) |
>>>   S_0286D0_FRONT_FACE_ENA(1) |
>>>   S_0286D0_ANCILLARY_ENA(1) |
>>> @@ -6049,22 +6048,21 @@ static void si_init_exec_from_input(struct
>>> si_shader_context *ctx,
>>>  }
>>>
>>>  static bool si_vs_needs_prolog(const struct si_shader_selector
>*sel,
>>>     const struct si_vs_prolog_bits *key)
>>>  {
>>>  /* VGPR initialization fixup for Vega10 and Raven is always
>done 
>>> in the
>>>   * VS prolog. */
>>>  return sel->vs_needs_prolog || key->ls_vgpr_fix;
>>>  }
>>>
>>> -static bool si_compile_tgsi_main(struct si_shader_context *ctx,
>>> - bool is_monolithic)
>>> +static bool si_compile_tgsi_main(struct si_shader_context *ctx)
>>>  {
>>>  struct si_shader *shader = ctx->shader;
>>>  struct si_shader_selector *sel = shader->selector;
>>>  struct lp_build_tgsi_context *bld_base = >bld_base;
>>>
>>>  // TODO clean all this up!
>>>  switch (ctx->type) {
>>>  case PIPE_SHADER_VERTEX:
>>>  ctx->load_input = declare_input_vs;
>>>  if (shader->key.as_ls)
>>> @@ -6135,31 +6133,31 @@ static bool si_compile_tgsi_main(struct
>>> si_shader_context *ctx,
>>>   * - Add a barrier before the second shader.
>>>   * - In the second shader, reset EXEC to ~0 and wrap the main 
>>> part in
>>>   *   an if-statement. This is required for correctness in
>geometry
>>>   *   shaders, to ensure that empty GS waves do not send GS_EMIT
>and
>>>   *   GS_CUT messages.
>>>   *
>>>   * For monolithic merged shaders, the first shader is wrapped
>in an
>>>   * if-block together with its prolog in
>si_build_wrapper_function.
>>>   */
>>>  if (ctx->screen->info.chip_class >= GFX9) {
>>> -    if (!is_monolithic &&
>>> +    if (!shader->is_monolithic &&
>>>  sel->info.num_instructions > 1 && /* not empty shader
>*/
>>>  (shader->key.as_es || shader->key.as_ls) &&
>>>  (ctx->type == PIPE_SHADER_TESS_EVAL ||
>>>   (ctx->type == PIPE_SHADER_VERTEX &&
>>>    !si_vs_needs_prolog(sel,
>>key.part.vs.prolog {
>>>  si_init_exec_from_input(ctx,
>>>  ctx->param_merged_wave_info, 0);
>>>  } else if 

Re: [Mesa-dev] [PATCH 1/4] radeonsi: disable DCC MSAA for 128bpp formats on Stoney

2018-06-22 Thread Dylan Baker
Quoting Marek Olšák (2018-06-20 18:01:55)
> From: Marek Olšák 
> 
> Cc: 18.1 
> ---
>  src/gallium/drivers/radeonsi/si_texture.c | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_texture.c 
> b/src/gallium/drivers/radeonsi/si_texture.c
> index b46208be252..05d5d1b8a6d 100644
> --- a/src/gallium/drivers/radeonsi/si_texture.c
> +++ b/src/gallium/drivers/radeonsi/si_texture.c
> @@ -266,20 +266,25 @@ static int si_init_surface(struct si_screen *sscreen,
> if (is_stencil)
> flags |= RADEON_SURF_SBUFFER;
> }
>  
> if (sscreen->info.chip_class >= VI &&
> (ptex->flags & SI_RESOURCE_FLAG_DISABLE_DCC ||
>  ptex->format == PIPE_FORMAT_R9G9B9E5_FLOAT ||
>  (ptex->nr_samples >= 2 && !sscreen->dcc_msaa_allowed)))
> flags |= RADEON_SURF_DISABLE_DCC;
>  
> +   /* Stoney: 128bpp MSAA textures randomly fail piglit tests with DCC. 
> */
> +   if (sscreen->info.family == CHIP_STONEY &&
> +   bpe == 16 && ptex->nr_samples >= 2)
> +   flags |= RADEON_SURF_DISABLE_DCC;
> +
> /* VI: DCC clear for 4x and 8x MSAA array textures unimplemented. */
> if (sscreen->info.chip_class == VI &&
> num_color_samples >= 4 &&
> ptex->array_size > 1)
> flags |= RADEON_SURF_DISABLE_DCC;
>  
> /* GFX9: DCC clear for 4x and 8x MSAA textures unimplemented. */
> if (sscreen->info.chip_class >= GFX9 &&
> num_color_samples >= 4)
> flags |= RADEON_SURF_DISABLE_DCC;
> -- 
> 2.17.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Hi Marek,

For this to apply to 18.1 I needed to pull
1cc2e0cc6b47bd5efbf2af266405060785085e6b
"radeonsi: fully enable 2x DCC MSAA for array and non-array textures",
is that reasonable, or would you like me to do something else?

Dylan


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


[Mesa-dev] [PATCH] meson: Fix typo that breaks -Dgalium-xvmc=false

2018-06-22 Thread Dylan Baker
_xmvc -> _xvmc. Sigh

Fixes: a6943bb4ce99ea7af7222552f1326fb80823d0b2
   ("meson: Fix auto option for xvmc")
Signed-off-by: Dylan Baker 
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index e88616c9e82..b2722c71e5b 100644
--- a/meson.build
+++ b/meson.build
@@ -441,7 +441,7 @@ elif not (with_gallium_r600 or with_gallium_nouveau)
 endif
 dep_xvmc = null_dep
 with_gallium_xvmc = false
-if _xmvc != 'false'
+if _xvmc != 'false'
   dep_xvmc = dependency('xvmc', version : '>= 1.0.6', required : _xvmc == 
'true')
   with_gallium_xvmc = dep_xvmc.found()
 endif
-- 
2.17.1

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


Re: [Mesa-dev] [PATCH 7/8] radeonsi: always put persistent buffers into GTT on radeon

2018-06-20 Thread Dylan Baker
Quoting Marek Olšák (2018-06-20 08:58:05)
> On Wed, Jun 20, 2018 at 11:26 AM, Dylan Baker  wrote:
> > Quoting Marek Olšák (2018-06-08 20:16:54)
> >> From: Marek Olšák 
> >>
> >> This improves performance for certain games.
> >>
> >> Cc: 18.1 
> >> ---
> >>  src/gallium/drivers/radeonsi/si_buffer.c | 6 +-
> >>  1 file changed, 5 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/src/gallium/drivers/radeonsi/si_buffer.c 
> >> b/src/gallium/drivers/radeonsi/si_buffer.c
> >> index 2d68edc3404..0546fa9d336 100644
> >> --- a/src/gallium/drivers/radeonsi/si_buffer.c
> >> +++ b/src/gallium/drivers/radeonsi/si_buffer.c
> >> @@ -144,22 +144,26 @@ void si_init_resource_fields(struct si_screen 
> >> *sscreen,
> >> if (res->b.b.target == PIPE_BUFFER &&
> >> res->b.b.flags & (PIPE_RESOURCE_FLAG_MAP_PERSISTENT |
> >>   PIPE_RESOURCE_FLAG_MAP_COHERENT)) {
> >> /* Use GTT for all persistent mappings with older
> >>  * kernels, because they didn't always flush the HDP
> >>  * cache before CS execution.
> >>  *
> >>  * Write-combined CPU mappings are fine, the kernel
> >>  * ensures all CPU writes finish before the GPU
> >>  * executes a command stream.
> >> +*
> >> +* radeon doesn't have good BO move throttling, so put all
> >> +* persistent buffers into GTT to prevent VRAM CPU page 
> >> faults.
> >>  */
> >> -   if (!sscreen->info.kernel_flushes_hdp_before_ib)
> >> +   if (!sscreen->info.kernel_flushes_hdp_before_ib ||
> >> +   sscreen->info.drm_major == 2)
> >> res->domains = RADEON_DOMAIN_GTT;
> >> }
> >>
> >> /* Tiled textures are unmappable. Always put them in VRAM. */
> >> if ((res->b.b.target != PIPE_BUFFER && !rtex->surface.is_linear) ||
> >> res->b.b.flags & SI_RESOURCE_FLAG_UNMAPPABLE) {
> >> res->domains = RADEON_DOMAIN_VRAM;
> >> res->flags |= RADEON_FLAG_NO_CPU_ACCESS |
> >>  RADEON_FLAG_GTT_WC;
> >> }
> >> --
> >> 2.17.1
> >>
> >> ___
> >> mesa-dev mailing list
> >> mesa-dev@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
> > Hi Marek,
> >
> > This doesn't apply cleanly to 18.1, since
> > b81149e258a492ed0c81058fb535f6bfdacb36da isn't in 18.1; would you like me to
> > pull that commit as well, or do something else?
> 
> Yes, you can pull that commit too. Thanks!
> 
> Marek

Both pulled into the 18.1-proposed branch

There was a very minor conflict in the b811 commit (git being stupid really),
which I resolved. You can look at it here:
https://cgit.freedesktop.org/~dbaker/mesa/commit/?h=18.1-proposed=e979b79cecb347b045c3b3eca8678c30bf450fa6.
Let me know if anything looks off.

Dylan


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


Re: [Mesa-dev] [Mesa-stable] [PATCH] opencl: autotools: Fix linking order for OpenCL target

2018-05-01 Thread Dylan Baker
Quoting Aaron Watry (2018-05-01 10:59:43)
> Given the discussion that's ongoing, this patch might not land as-is,
> but if it does:
> Tested-By: Aaron Watry 
> 
> Note: The meson build currently works as-is and doesn't require an
> equivalent patch.

Just FYI, meson uses as-needed and link-groups by default.

Dylan


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


[Mesa-dev] [PATCH] bin: force git show to use default pretty setting

2018-04-26 Thread Dylan Baker
I have pretty default to short, which breaks this script.

cc: Emil Velikov <emil.veli...@collabora.com>
cc: Andres Gomez <ago...@igalia.com>
cc: Juan A. Suarez <jasua...@igalia.com>
Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 bin/get-fixes-pick-list.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/get-fixes-pick-list.sh b/bin/get-fixes-pick-list.sh
index fb7ef223820..983af0983dd 100755
--- a/bin/get-fixes-pick-list.sh
+++ b/bin/get-fixes-pick-list.sh
@@ -38,7 +38,7 @@ do
 
# Place every "fixes:" tag on its own line and join with the next word
# on its line or a later one.
-   fixes=`git show -s $sha | tr -d "\n" | sed -e 
's/fixes:[[:space:]]*/\nfixes:/Ig' | grep "fixes:" | sed -e 
's/\(fixes:[a-zA-Z0-9]*\).*$/\1/'`
+   fixes=`git show --pretty=medium -s $sha | tr -d "\n" | sed -e 
's/fixes:[[:space:]]*/\nfixes:/Ig' | grep "fixes:" | sed -e 
's/\(fixes:[a-zA-Z0-9]*\).*$/\1/'`
 
# For each one try to extract the tag
fixes_count=`echo "$fixes" | wc -l`
-- 
2.17.0

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


Re: [Mesa-dev] [PATCH] bin: force git show to use default pretty setting

2018-04-26 Thread Dylan Baker
Quoting Emil Velikov (2018-04-26 11:04:01)
> On 26 April 2018 at 18:45, Dylan Baker <dy...@pnwbakers.com> wrote:
> > I have pretty default to short, which breaks this script.
> >
> Out of curiosity: why would you do this to yourself ;-)

Because I use tig, so all I have to do is press enter to see the entire commit,
log and patch :)

Dylan

> 
> > cc: Emil Velikov <emil.veli...@collabora.com>
> > cc: Andres Gomez <ago...@igalia.com>
> > cc: Juan A. Suarez <jasua...@igalia.com>
> > Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
> > ---
> >  bin/get-fixes-pick-list.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/bin/get-fixes-pick-list.sh b/bin/get-fixes-pick-list.sh
> > index fb7ef223820..983af0983dd 100755
> > --- a/bin/get-fixes-pick-list.sh
> > +++ b/bin/get-fixes-pick-list.sh
> > @@ -38,7 +38,7 @@ do
> >
> > # Place every "fixes:" tag on its own line and join with the next 
> > word
> > # on its line or a later one.
> > -   fixes=`git show -s $sha | tr -d "\n" | sed -e 
> > 's/fixes:[[:space:]]*/\nfixes:/Ig' | grep "fixes:" | sed -e 
> > 's/\(fixes:[a-zA-Z0-9]*\).*$/\1/'`
> > +   fixes=`git show --pretty=medium -s $sha | tr -d "\n" | sed -e 
> > 's/fixes:[[:space:]]*/\nfixes:/Ig' | grep "fixes:" | sed -e 
> > 's/\(fixes:[a-zA-Z0-9]*\).*$/\1/'`
> >
> An on a serious note - there are plenty of places that will need this
> kind of fix.
> Pretty much any git show/log instances that do not specify --pretty.
> 
> -Emil


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


Re: [Mesa-dev] [PATCH] meson: fix race condition revealed by using 0.44

2018-04-26 Thread Dylan Baker
Quoting Emil Velikov (2018-04-26 10:35:50)
> On 26 April 2018 at 18:24, Dylan Baker <dy...@pnwbakers.com> wrote:
> > It turns out that the blocking target we had was hiding some race
> > conditions in the anv driver with anv_extensions.h generation, we should
> > fix those.
> >
> anv_entrypoints[0] is the first output of the anv_entrypoints custom_target.
> Aka it's effectively the same as anv_extensions_h, isn't it?

Actually, there is anv_entrypoints.[ch], and anv_extensions.[ch], and it's the
latter that we're missing as an explicit dependency (I got confused about that
too). The thing that happened here is that the blocking target created a proper
dependency chain, but when we removed it that was broken, and we got a race.

Dylan


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


[Mesa-dev] [PATCH] meson: fix race condition revealed by using 0.44

2018-04-26 Thread Dylan Baker
It turns out that the blocking target we had was hiding some race
conditions in the anv driver with anv_extensions.h generation, we should
fix those.

CC: Scott D Phillips <scott.d.phill...@intel.com>
CC: Mark Janes <mark.a.ja...@intel.com>
Fixes: 92550d9b16d2b295bdac087f31b1fd6d0f808e02
   ("meson: remove workaround for custom target creating .h and .c files")
Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 src/intel/vulkan/meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build
index 06acc78391f..f20a8a54c9b 100644
--- a/src/intel/vulkan/meson.build
+++ b/src/intel/vulkan/meson.build
@@ -1,4 +1,4 @@
-# Copyright © 2017 Intel Corporation
+# Copyright © 2017-2018 Intel Corporation
 
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -96,7 +96,7 @@ foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', 
['gen7_cmd_buffer.c']],
   _gen = g[0]
   libanv_gen_libs += static_library(
 'libanv_gen@0@'.format(_gen),
-[anv_gen_files, g[1], anv_entrypoints[0]],
+[anv_gen_files, g[1], anv_entrypoints[0], anv_extensions_h],
 include_directories : [
   inc_common, inc_compiler, inc_drm_uapi, inc_intel, inc_vulkan_util,
   inc_vulkan_wsi,
@@ -220,7 +220,7 @@ if with_tests
   'anv_@0@'.format(t),
   executable(
 t,
-['tests/@0@.c'.format(t), anv_entrypoints[0]],
+['tests/@0@.c'.format(t), anv_entrypoints[0], anv_extensions_h],
 link_with : libvulkan_intel_test,
 dependencies : [dep_libdrm, dep_thread, dep_m, dep_valgrind],
 include_directories : [
-- 
2.17.0

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


Re: [Mesa-dev] [ANNOUNCE] mesa 18.1.0-rc2

2018-05-03 Thread Dylan Baker
Quoting Emil Velikov (2018-05-03 03:40:47)
> Hi Dylan,
> 
> A few small nitpicks:
> 
> On 27 April 2018 at 22:07, Dylan Baker <dy...@pnwbakers.com> wrote:
> > Hi List,
> >
> s/List/list/
> 
> > Mesa 18.1.0-rc2 is now available. There are 20 nominated patches, and no 
> > queued
> > or rejected patches. All patches applied cleanly, so no conflicts at all. 
> > Yay.
> >
> Please follow the existing template or suggest improvements if
> something feels unusual.
> 
> Here - keep queued/nominated/rejected summary numbers on separate lines.
> It cuts parse time to 0.5s ;-)
> 
> >
> > git tag: mesa-18.1.0-rc2
> >
> This should be just above the tarballs
> 
> >
> > Nominated (20)
> > ==
> >
> 
> > Jason Ekstrand (2):
> >
> >   • i965/fs: Return mlen Android.common.mk Android.mk appveyor.yml 
> > autogen.sh
> > bin build-support changes.html CleanSpec.mk common.py configure.ac docs
> > doxygen include install-gallium-links.mk install-lib-links.mk m4
> > Makefile.am mesa-18.1.0-devel meson.build meson_options.txt REVIEWERS 
> > scons
> > SConstruct scripts src subprojects VERSION 8 for size_read() for
> > INTERPOLATE_AT_*
> Seems like you're using some homegrown script for the patch list.

This is the output of the bin/shortlog_mesa.sh run though w3m to convert it to
text.

> 
> You want to use git shortlog instead - it provides a consistent
> experience and doesn't have the bugs hit above.
> Don't forget to send patches for the releasing documentation. Be that
> removing unnecessary fluff or adding missing bits of info.

I have branch, but I wanted to wait until we got to the release, just so I had a
chance to polish and add things as I came on them.

> -Emil



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


Re: [Mesa-dev] [Mesa-announce] [ANNOUNCE] mesa 18.1.0-rc2

2018-04-28 Thread Dylan Baker


On April 28, 2018 9:12:38 AM PDT, "Juan A. Suarez Romero" <jasua...@igalia.com> 
wrote:
>On Fri, 2018-04-27 at 14:07 -0700, Dylan Baker wrote:
>> Hi List,
>> 
>> Mesa 18.1.0-rc2 is now available. There are 20 nominated patches, and
>no queued
>> or rejected patches. All patches applied cleanly, so no conflicts at
>all. Yay.
>> 
>> 
>
>I think you meant 20 queued patches, not nominated. Queued are those
>added in
>the release (I see those 20 patches in mesa 18.1.0-rc2 release), while
>Nominated
>are those that couldn't be applied because they arrived too late, but
>very
>likely will be included in the next version.
>
>
>   J.A.

Oops, yes indeed. That's what I get for making the release right before I 
needed to leave for the day.

>
>
>> git tag: mesa-18.1.0-rc2
>> 
>> 
>> Nominated (20)
>> ==
>> 
>> Bas Nieuwenhuizen (1):
>> 
>>   • nir: Do not use progress for unreachable code in return lowering.
>> 
>> Dylan Baker (7):
>> 
>>   • bin: force git show to use default pretty setting
>>   • compiler/glsl: close fd's in glcpp_test.py
>>   • bin/install_megadrivers: fix DESTDIR and -D*-path
>>   • meson: don't build classic mesa tests without dri_drivers
>>   • meson: only build mesa_st tests when build-tests is true
>>   • meson: fix graw-xlib after auxiliary consolidation
>>   • bump version for rc2
>> 
>> Eric Anholt (1):
>> 
>>   • gallium/util: Fix incorrect refcounting of separate stencil.
>> 
>> Ian Romanick (1):
>> 
>>   • intel/compiler: Add scheduler deps for instructions that
>implicitly read g0
>> 
>> Jason Ekstrand (2):
>> 
>>   • i965/fs: Return mlen Android.common.mk Android.mk appveyor.yml
>autogen.sh
>> bin build-support changes.html CleanSpec.mk common.py
>configure.ac docs
>> doxygen include install-gallium-links.mk install-lib-links.mk m4
>> Makefile.am mesa-18.1.0-devel meson.build meson_options.txt
>REVIEWERS scons
>> SConstruct scripts src subprojects VERSION 8 for size_read() for
>> INTERPOLATE_AT_*
>>   • anv/allocator: Don't shrink either end of the block pool
>> 
>> Johan Klokkhammer Helsing (1):
>> 
>>   • st/dri: Fix dangling pointer to a destroyed dri_drawable
>> 
>> Juan A. Suarez Romero (1):
>> 
>>   • travis: update libva required version
>> 
>> Marek Olšák (1):
>> 
>>   • Revert "st/dri: Fix dangling pointer to a destroyed dri_drawable"
>> 
>> Samuel Pitoiset (5):
>> 
>>   • ac/nir: add missing round_slice for 1D arrays
>>   • ac: fix the number of coordinates for ac_image_get_lod and arrays
>>   • radv: fix DCC enablement since partial MSAA implementation
>>   • radv: set ac_surf_info::num_channels correctly
>>   • ac: fix texture query LOD for 1D textures on GFX9
>> 
>> 
>> Tarballs
>> 
>> 
>> https://mesa.freedesktop.org/archive/mesa-18.1.0-rc2.tar.gz
>> MD5:  3534aeaef7b00792a7ed5be9c1bd4553  mesa-18.1.0-rc2.tar.gz
>> SHA1: 7613956b10a5a28d67227e733492b3135a213e7e 
>mesa-18.1.0-rc2.tar.gz
>> SHA256:
>a2cd0b0b41458d1bd4e448d3c60eb6f94132b141c28bf9c6132037215be80754 
>mesa-18.1.0-rc2.tar.gz
>> SHA512:
>32cd201f68ac451aba958d99b7918aa88c83e15564882af41260a087b1ec26fc0c259c0fb252b69b8ffad8e993f89a8c379596a1f6bbd8422a2a1cadda4fea18
> mesa-18.1.0-rc2.tar.gz
>> PGP:  https://mesa.freedesktop.org/archive/mesa-18.1.0-rc2.tar.gz.sig
>> 
>> https://mesa.freedesktop.org/archive/mesa-18.1.0-rc2.tar.xz
>> MD5:  aac12af0cbc92a5d91d11a5ba1e3324e  mesa-18.1.0-rc2.tar.xz
>> SHA1: 6f181c0c3fd9f4a940e39f2895f61223f79a88ad 
>mesa-18.1.0-rc2.tar.xz
>> SHA256:
>39f0a0c748edcd13b1bbefbf203be937a7931f3e325a908c59fecc91d1bd008e 
>mesa-18.1.0-rc2.tar.xz
>> SHA512:
>43ddb27c436ab6ad08c4f5f764855e0681c10995e5279146c01e03e6e8af98dd23d96a20d3ac50107a6ca89cc3dd094bc472ddd70d290d0357cef3059ae34cfc
> mesa-18.1.0-rc2.tar.xz
>> PGP:  https://mesa.freedesktop.org/archive/mesa-18.1.0-rc2.tar.xz.sig
>> 
>> ___
>> mesa-announce mailing list
>> mesa-annou...@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-announce
>___
>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 3/4] meson: build libEGL

2017-10-19 Thread Dylan Baker
Quoting Daniel Stone (2017-10-19 07:34:28)
> Hi Dylan,
> 
> On 19 October 2017 at 01:55, Dylan Baker <dy...@pnwbakers.com> wrote:
> > This is based heavily on Daniel Stone's work for the same, rebased on
> > master and with a number of TODO's fixed.
> >
> > This does not implement glvnd (which is coming in a later patch)
> >
> > Meson builds egl slightly differently than autotools, namely it doesn't
> > build an intermediate shared library. It doesn't do this because meson
> > doesn't have problems with the name of the library being dynamically
> > generated, so the glvnd and non-glvnd code can follow the same path.
> 
> Thanks a million for picking this up, and fixing all the egregious
> bugs / gaps / variable name inconsistency! Is this available in a
> fully-baked git branch somewhere?

https://github.com/dcbaker/mesa submit/meson-egl

> 
> > +linux_dmabuf_unstable_v1_protocol_c = custom_target(
> > +  'linux-dmabuf-unstable-v1-protocol.c',
> > +  input : wayland_dmabuf_xml,
> > +  output : 'linux-dmabuf-unstable-v1-protocol.c',
> > +  command : [prog_wl_scanner, 'code', '@INPUT@', '@OUTPUT@'],
> > +)
> > +
> > +linux_dmabuf_unstable_v1_client_protocol_h = custom_target(
> > +  'linux-dmabuf-unstable-v1-client-protocol.h',
> > +  input : wayland_dmabuf_xml,
> > +  output : 'linux-dmabuf-unstable-v1-client-protocol.h',
> > +  command : [prog_wl_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
> > +)
> 
> Could you please move these into src/egl/wayland/wayland-drm? They're
> not actually wl_drm of course, but I have patches out to use
> linux-dmabuf inside Vulkan as well, so having wl_drm and
> zwp_linux_dmabuf in the same place where it's just built once seems
> like an idea. Then it'd be trivial to hoist that out of src/egl/
> later.

Jason and I talked about this, and he thought that the better thing to do would
be to make a src/wsi folder that could have things like src/wsi/wayland,
src/wsi/x11, etc. and we could move it in there. I like that idea too, would
that be okay as follow up work?

> 
> > +libwayland_egl = shared_library(
> > +  'wayland-egl',
> > +  'wayland-egl.c',
> > +  c_args : [c_vis_args],
> > +  link_args : ld_args_gc_sections,
> > +  version : '1.0.0',
> > +  install : true,
> >  )
> 
> As a drive-by musing, is there a reason c_vis_args isn't part of the
> global arguments? I realised after the fact that I'd left it out of
> quite a few places in my branch.

There are actually some targets that don't have visibility flags set for them.
Maybe those are just oversights?

> 
> Other than that, it looks good to me, so:
> Reviewed-by: Daniel Stone <dani...@collabora.com>
> 
> Cheers,
> Daniel


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


Re: [Mesa-dev] [PATCH] docs: add documentation for building with meson

2017-10-19 Thread Dylan Baker
Quoting Emil Velikov (2017-10-19 09:44:37)
> On 18 October 2017 at 18:27, Dylan Baker <dy...@pnwbakers.com> wrote:
> 
> >> > +Note that in meson this defaults to "debug", and  not setting it to
> >> > +"release" will yield non-optimal performance and binary size
> >> Ouch, can we change that?
> >
> > When I did an informal poll in the Intel cube the universal consensus was 
> > that
> > defaulting to debug was a feature. If the wider community disagrees, yes, 
> > it can be
> > changed.
> >
> The intent behind is amazing, but it subtly changes behaviour over any
> of the existing build systems.
> 
> Past experience suggests that listing such changes in release
> notes/elsewhere people do miss it.
> Thus as users get annoyed with the optimised build there'll be some
> bad noise/publicity.
> 
> Just something to keep in mind.

That is good to keep in mind.

> 
> > I'll fix up the other stuff too.
> >
> Great thanks.
> 
> -Emil


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


[Mesa-dev] [PATCH] meson: don't build gallium dri target if gallium is disabled

2017-10-19 Thread Dylan Baker
Otherwise -Dgallium-drivers= will cause libmesa_gallium to be built and
the megadriver install script to attempt to install drivers without any
actual drivers being built.

fixes: 66f97f6640f5316b36177fd1053f0027eb6ec6cc ("meson: build radeonsi")
Reported-by: Rafael Antognolli <rafael.antogno...@intel.com>
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 src/gallium/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index a65b32c658e..97347819d60 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -67,7 +67,7 @@ subdir('state_trackers/dri')
 # TODO: virgl
 # TODO: winsys/sw/xlib
 # TODO: clover
-if with_dri
+if with_dri and with_gallium
   subdir('targets/dri')
 endif
 # TODO: xlib-glx
-- 
2.14.2

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


[Mesa-dev] [PATCH 4/7] meson: build r300 driver

2017-10-26 Thread Dylan Baker
This is build tested only

Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 meson.build  |   4 +-
 meson_options.txt|   2 +-
 src/gallium/drivers/r300/meson.build | 156 +++
 src/gallium/meson.build  |   4 +-
 src/gallium/targets/dri/meson.build  |  12 ++-
 5 files changed, 173 insertions(+), 5 deletions(-)
 create mode 100644 src/gallium/drivers/r300/meson.build

diff --git a/meson.build b/meson.build
index 7c70eede080..a03da18659e 100644
--- a/meson.build
+++ b/meson.build
@@ -106,6 +106,7 @@ endif
 with_gallium = false
 with_gallium_pl111 = false
 with_gallium_radeonsi = false
+with_gallium_r300 = false
 with_gallium_nouveau = false
 with_gallium_freedreno = false
 with_gallium_softpipe = false
@@ -119,6 +120,7 @@ if _drivers != ''
   _split = _drivers.split(',')
   with_gallium_pl111 = _split.contains('pl111')
   with_gallium_radeonsi = _split.contains('radeonsi')
+  with_gallium_r300 = _split.contains('r300')
   with_gallium_nouveau = _split.contains('nouveau')
   with_gallium_freedreno = _split.contains('freedreno')
   with_gallium_softpipe = _split.contains('swrast')
@@ -638,7 +640,7 @@ dep_libdrm_freedreno = []
 if with_amd_vk or with_gallium_radeonsi
   dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.85')
 endif
-if with_gallium_radeonsi or with_dri_r100 or with_dri_r200
+if with_gallium_radeonsi or with_dri_r100 or with_dri_r200 or with_gallium_r300
   dep_libdrm_radeon = dependency('libdrm_radeon', version : '>= 2.4.71')
 endif
 if with_gallium_nouveau or with_dri_nouveau
diff --git a/meson_options.txt b/meson_options.txt
index 3a6ad1014ac..6ac22600ceb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,7 +46,7 @@ option(
 option(
   'gallium-drivers',
   type : 'string',
-  value : 'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx',
+  value : 'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx,r300',
   description : 'comma separated list of gallium drivers to build.'
 )
 option(
diff --git a/src/gallium/drivers/r300/meson.build 
b/src/gallium/drivers/r300/meson.build
new file mode 100644
index 000..0d525d8d1b3
--- /dev/null
+++ b/src/gallium/drivers/r300/meson.build
@@ -0,0 +1,156 @@
+# Copyright ?? 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_r300 = files(
+  'r300_blit.c',
+  'r300_cb.h',
+  'r300_chipset.c',
+  'r300_chipset.h',
+  'r300_context.c',
+  'r300_context.h',
+  'r300_cs.h',
+  'r300_debug.c',
+  'r300_defines.h',
+  'r300_emit.c',
+  'r300_emit.h',
+  'r300_flush.c',
+  'r300_fs.c',
+  'r300_fs.h',
+  'r300_hyperz.c',
+  'r300_public.h',
+  'r300_query.c',
+  'r300_reg.h',
+  'r300_render.c',
+  'r300_render_stencilref.c',
+  'r300_render_translate.c',
+  'r300_resource.c',
+  'r300_screen_buffer.c',
+  'r300_screen_buffer.h',
+  'r300_screen.c',
+  'r300_screen.h',
+  'r300_shader_semantics.h',
+  'r300_state.c',
+  'r300_state_derived.c',
+  'r300_state_inlines.h',
+  'r300_texture.c',
+  'r300_texture_desc.c',
+  'r300_texture_desc.h',
+  'r300_texture.h',
+  'r300_tgsi_to_rc.c',
+  'r300_tgsi_to_rc.h',
+  'r300_transfer.c',
+  'r300_transfer.h',
+  'r300_vs.c',
+  'r300_vs_draw.c',
+  'r300_vs.h',
+  'compiler/memory_pool.c',
+  'compiler/memory_pool.h',
+  'compiler/r300_fragprog.c',
+  'compiler/r300_fragprog_emit.c',
+  'compiler/r300_fragprog.h',
+  'compiler/r300_fragprog_swizzle.c',
+  'compiler/r300_fragprog_swizzle.h',
+  'compiler/r3xx_fragprog.c',
+  'compiler/r3xx_vertprog.c',
+  'compiler/r3xx_vertprog_dump.c',
+  'compiler/r500_fragprog.c',
+  'compiler/r500_fragprog_emit.c',
+  'compiler/r500_fragprog.h',
+  'compiler/radeon_code.c',
+  'compiler/radeon_code.h',
+  'compiler/radeon_compiler.c',
+  'compiler/radeon_compiler.h',
+  'compiler/radeon_compiler_util.c',
+  'compiler/radeon_compiler_util.h',
+  'compiler/radeon_dataflow.c',
+  'com

[Mesa-dev] [PATCH 1/7] svga: Use __asm__ instead of asm

2017-10-26 Thread Dylan Baker
Which allows the code to be compiled with c99 instead of gnu99.

A little history. This code is guarded by #ifdef __GNUC__, so it's only
compiled with autotools on *nix, SCons with MSVC wont hit that code.
However, meson is going to build both MSVC and GCC/Clang paths. As such
it makes sense to not have to override the std for gcc/clang, but ensure
that it's not set to gnu99 when building with MSVC when there's a
straightforward code change that allows removing the need for gnu99.

I have compile tested this with GCC and Clang

cc: Brian Paul <bri...@vmware.com>
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---

Brian, I don't know who the right person and VMWare to ping for build system
stuff is. If there' someone better please let me know os I can cc them instead.

 src/gallium/drivers/svga/Makefile.am|  3 ---
 src/gallium/drivers/svga/svga_msg.c | 10 +-
 src/gallium/winsys/svga/drm/Makefile.am |  3 ---
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/gallium/drivers/svga/Makefile.am 
b/src/gallium/drivers/svga/Makefile.am
index 1ad5e0f91e6..2e5220e9f27 100644
--- a/src/gallium/drivers/svga/Makefile.am
+++ b/src/gallium/drivers/svga/Makefile.am
@@ -30,9 +30,6 @@ AM_CFLAGS = \
$(GALLIUM_DRIVER_CFLAGS) \
$(MSVC2013_COMPAT_CFLAGS)
 
-#On some systems -std= must be added to CFLAGS to be the last -std=
-CFLAGS += -std=gnu99
-
 noinst_HEADERS = $(SVGA_H_FILES)
 noinst_LTLIBRARIES = libsvga.la
 
diff --git a/src/gallium/drivers/svga/svga_msg.c 
b/src/gallium/drivers/svga/svga_msg.c
index e0346dee751..8b63132cb57 100755
--- a/src/gallium/drivers/svga/svga_msg.c
+++ b/src/gallium/drivers/svga/svga_msg.c
@@ -83,7 +83,7 @@
  port_num, magic,  \
  ax, bx, cx, dx, si, di)   \
 ({ \
-   asm volatile ("inl %%dx, %%eax;" :  \
+   __asm__ volatile ("inl %%dx, %%eax;" :  \
   "=a"(ax),\
   "=b"(bx),\
   "=c"(cx),\
@@ -128,7 +128,7 @@ typedef uint64_t VMW_REG;
  port_num, magic, bp, \
  ax, bx, cx, dx, si, di)  \
 ({\
-   asm volatile ("push %%rbp;"\
+   __asm__ volatile ("push %%rbp;"\
   "movq %12, %%rbp;"  \
   "rep outsb;"\
   "pop %%rbp;" :  \
@@ -152,7 +152,7 @@ typedef uint64_t VMW_REG;
  port_num, magic, bp, \
  ax, bx, cx, dx, si, di)  \
 ({\
-   asm volatile ("push %%rbp;"\
+   __asm__ volatile ("push %%rbp;"\
   "movq %12, %%rbp;"  \
   "rep insb;" \
   "pop %%rbp" :   \
@@ -183,7 +183,7 @@ typedef uint32_t VMW_REG;
  port_num, magic, bp, \
  ax, bx, cx, dx, si, di)  \
 ({\
-   asm volatile ("push %%ebp;"\
+   __asm__ volatile ("push %%ebp;"\
   "mov %12, %%ebp;"   \
   "rep outsb;"\
   "pop %%ebp;" :  \
@@ -208,7 +208,7 @@ typedef uint32_t VMW_REG;
  port_num, magic, bp, \
  ax, bx, cx, dx, si, di)  \
 ({\
-   asm volatile ("push %%ebp;"\
+   __asm__ volatile ("push %%ebp;"\
   "mov %12, %%ebp;"   \
   "rep insb;" \
   "pop %%ebp" :   \
diff --git a/src/gallium/winsys/svga/drm/Makefile.am 
b/src/gallium/winsys/svga/drm/Makefile.am
index dfa97367650..ac9de18d3df 100644
--- a/src/gallium/winsys/svga/drm/Makefile.am
+++ b/src/gallium/winsys/svga/drm/Makefile.am
@@ -29,9 +29,6 @@ AM_CFLAGS = \
$(GALLIUM_WINSYS_CFLAGS) \
$(LIBDRM_CFLAGS)
 
-#On some systems -std= must be added to CFLAGS to be the last -std=
-CFLAGS += -std=gnu99
-
 noinst_LTLIBRARIES = libsvgadrm.la
 
 libsvgadrm_la_SOURCES = $(C_SOURCES)
-- 
2.14.2

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


[Mesa-dev] Meson for remaining gallium drivers (except SWR)

2017-10-26 Thread Dylan Baker
This series implements the rest of the remaining gallium drivers except SWR. I
have a branch for SWR, but it needs some upstream meson patches that haven't
landed, but will hopefully be in 0.44.0

Most of this is pretty straight forward, except for one change to svga.

I have no hardware/software to test these.

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


[Mesa-dev] [PATCH 2/7] meson: add proper LLVM modules to check for RadeonSI as well

2017-10-26 Thread Dylan Baker
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 1da1bb06798..64084d686e3 100644
--- a/meson.build
+++ b/meson.build
@@ -647,7 +647,7 @@ if with_gallium_freedreno
 endif
 
 llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit']
-if with_amd_vk
+if with_amd_vk or with_gallium_radeonsi # TODO: r600
   llvm_modules += ['amdgpu', 'bitreader', 'ipo']
 endif
 dep_llvm = dependency(
-- 
2.14.2

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


[Mesa-dev] [PATCH 7/7] meson: build virgl driver

2017-10-26 Thread Dylan Baker
Build tested only.

cc: Dave Airlie <airl...@redhat.com>
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 meson.build| 12 ++---
 meson_options.txt  |  2 +-
 src/gallium/drivers/virgl/meson.build  | 39 ++
 src/gallium/meson.build|  8 ++
 src/gallium/targets/dri/meson.build|  5 
 src/gallium/winsys/virgl/drm/meson.build   | 27 +
 src/gallium/winsys/virgl/vtest/meson.build | 26 
 7 files changed, 115 insertions(+), 4 deletions(-)
 create mode 100644 src/gallium/drivers/virgl/meson.build
 create mode 100644 src/gallium/winsys/virgl/drm/meson.build
 create mode 100644 src/gallium/winsys/virgl/vtest/meson.build

diff --git a/meson.build b/meson.build
index ad2025076a5..6253e905fb3 100644
--- a/meson.build
+++ b/meson.build
@@ -117,6 +117,7 @@ with_gallium_etnaviv = false
 with_gallium_imx = false
 with_gallium_i915 = false
 with_gallium_svga = false
+with_gallium_virgl = false
 _drivers = get_option('gallium-drivers')
 if _drivers != ''
   _split = _drivers.split(',')
@@ -133,6 +134,7 @@ if _drivers != ''
   with_gallium_imx = _split.contains('imx')
   with_gallium_i915 = _split.contains('i915')
   with_gallium_svga = _split.contains('svga')
+  with_gallium_virgl = _split.contains('virgl')
   with_gallium = true
   with_dri = true
 endif
@@ -207,9 +209,13 @@ else
   with_egl = false
 endif
 
-# TODO: or virgl
-if with_egl and with_gallium_radeonsi and not (with_platform_drm or 
with_platform_surfaceless)
-  error('RadeonSI requires drm or surfaceless platform when using EGL')
+if with_egl and not (with_platform_drm or with_platform_surfaceless)
+  if with_gallium_radeonsi
+error('RadeonSI requires drm or surfaceless platform when using EGL')
+  endif
+  if with_gallium_virgl
+error('Virgl requires drm or surfaceless platform when using EGL')
+  endif
 endif
 
 pre_args += '-DGLX_USE_TLS'
diff --git a/meson_options.txt b/meson_options.txt
index bda9601ea4e..c5403c7decb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,7 +46,7 @@ option(
 option(
   'gallium-drivers',
   type : 'string',
-  value : 
'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx,r300,r600,svga',
+  value : 
'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx,r300,r600,svga,virgl',
   description : 'comma separated list of gallium drivers to build.'
 )
 option(
diff --git a/src/gallium/drivers/virgl/meson.build 
b/src/gallium/drivers/virgl/meson.build
new file mode 100644
index 000..8284f548927
--- /dev/null
+++ b/src/gallium/drivers/virgl/meson.build
@@ -0,0 +1,39 @@
+# Copyright ?? 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_libvirgl = files(
+  'virgl_buffer.c',
+  'virgl_context.c',
+  'virgl_encode.c',
+  'virgl_query.c',
+  'virgl_resource.c',
+  'virgl_screen.c',
+  'virgl_streamout.c',
+  'virgl_texture.c',
+  'virgl_tgsi.c',
+)
+
+libvirgl = static_library(
+  'virgl',
+  files_libvirgl,
+  c_args : c_vis_args,
+  include_directories : inc_common,
+  dependencies : dep_libdrm,
+)
diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index 155800ffc8e..0772052f0bd 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -1,4 +1,5 @@
 # Copyright ?? 2017 Dylan Baker
+# Copyright ?? 2017 Intel Corporation
 
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -54,6 +55,9 @@ endif
 if with_gallium_svga
   subdir('drivers/svga')
 endif
+if with_gallium_virgl
+  subdir('drivers/virgl')
+endif
 subdir('drivers/llvmpipe')
 subdir('winsys/sw/null')
 subdir('winsys/sw/dri')
@@ -84,6 +88,10 @@ endif
 if with_gallium_svga
   subdir('winsys/svga/drm')
 endif
+if with_gallium_virgl
+  subdir('winsys/virgl/drm')
+  s

[Mesa-dev] [PATCH 6/7] meson: build svga driver on linux

2017-10-26 Thread Dylan Baker
Build tested only.

cc: Brian Paul <bri...@vmware.com>
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 meson.build |  2 +
 meson_options.txt   |  2 +-
 src/gallium/drivers/svga/meson.build| 88 +
 src/gallium/meson.build |  7 ++-
 src/gallium/targets/dri/meson.build |  5 ++
 src/gallium/winsys/svga/drm/meson.build | 45 +
 6 files changed, 147 insertions(+), 2 deletions(-)
 create mode 100644 src/gallium/drivers/svga/meson.build
 create mode 100644 src/gallium/winsys/svga/drm/meson.build

diff --git a/meson.build b/meson.build
index 3aa4cbfddc4..ad2025076a5 100644
--- a/meson.build
+++ b/meson.build
@@ -116,6 +116,7 @@ with_gallium_vc5 = false
 with_gallium_etnaviv = false
 with_gallium_imx = false
 with_gallium_i915 = false
+with_gallium_svga = false
 _drivers = get_option('gallium-drivers')
 if _drivers != ''
   _split = _drivers.split(',')
@@ -131,6 +132,7 @@ if _drivers != ''
   with_gallium_etnaviv = _split.contains('etnaviv')
   with_gallium_imx = _split.contains('imx')
   with_gallium_i915 = _split.contains('i915')
+  with_gallium_svga = _split.contains('svga')
   with_gallium = true
   with_dri = true
 endif
diff --git a/meson_options.txt b/meson_options.txt
index b811fda0dc1..bda9601ea4e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,7 +46,7 @@ option(
 option(
   'gallium-drivers',
   type : 'string',
-  value : 'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx,r300,r600',
+  value : 
'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx,r300,r600,svga',
   description : 'comma separated list of gallium drivers to build.'
 )
 option(
diff --git a/src/gallium/drivers/svga/meson.build 
b/src/gallium/drivers/svga/meson.build
new file mode 100644
index 000..d9a7da95a33
--- /dev/null
+++ b/src/gallium/drivers/svga/meson.build
@@ -0,0 +1,88 @@
+# Copyright ?? 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_svga = files(
+  'svga_cmd.c',
+  'svga_cmd_vgpu10.c',
+  'svga_context.c',
+  'svga_draw_arrays.c',
+  'svga_draw.c',
+  'svga_draw_elements.c',
+  'svga_format.c',
+  'svga_link.c',
+  'svga_msg.c',
+  'svga_pipe_blend.c',
+  'svga_pipe_blit.c',
+  'svga_pipe_clear.c',
+  'svga_pipe_constants.c',
+  'svga_pipe_depthstencil.c',
+  'svga_pipe_draw.c',
+  'svga_pipe_flush.c',
+  'svga_pipe_fs.c',
+  'svga_pipe_gs.c',
+  'svga_pipe_misc.c',
+  'svga_pipe_query.c',
+  'svga_pipe_rasterizer.c',
+  'svga_pipe_sampler.c',
+  'svga_pipe_streamout.c',
+  'svga_pipe_vertex.c',
+  'svga_pipe_vs.c',
+  'svga_resource_buffer.c',
+  'svga_resource_buffer_upload.c',
+  'svga_resource.c',
+  'svga_resource_texture.c',
+  'svga_sampler_view.c',
+  'svga_screen.c',
+  'svga_screen_cache.c',
+  'svga_shader.c',
+  'svga_state.c',
+  'svga_state_constants.c',
+  'svga_state_framebuffer.c',
+  'svga_state_fs.c',
+  'svga_state_gs.c',
+  'svga_state_need_swtnl.c',
+  'svga_state_rss.c',
+  'svga_state_sampler.c',
+  'svga_state_tgsi_transform.c',
+  'svga_state_tss.c',
+  'svga_state_vdecl.c',
+  'svga_state_vs.c',
+  'svga_surface.c',
+  'svga_swtnl_backend.c',
+  'svga_swtnl_draw.c',
+  'svga_swtnl_state.c',
+  'svga_tgsi.c',
+  'svga_tgsi_decl_sm30.c',
+  'svga_tgsi_insn.c',
+  'svga_tgsi_vgpu10.c',
+  'svgadump/svga_dump.c',
+  'svgadump/svga_shader_dump.c',
+  'svgadump/svga_shader_op.c',
+)
+
+libsvga = static_library(
+  'svga',
+  files_svga,
+  c_args : [c_vis_args, c_msvc_compat_args],
+  include_directories : [
+inc_src, inc_include, inc_gallium, inc_gallium_aux,
+include_directories('include')
+  ],
+)
diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index da8db5a36f2..155800ffc8e 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -51,6 +51,9 @@ endif
 if with_gallium_r600
   subdir('drivers/r600')
 endif
+if with_gallium_svga
+  subdi

[Mesa-dev] [PATCH 3/7] meson: build i915g driver

2017-10-26 Thread Dylan Baker
Build tested only.

Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 meson.build |  7 +++-
 src/gallium/drivers/i915/meson.build| 70 +
 src/gallium/meson.build |  7 +++-
 src/gallium/targets/dri/meson.build |  5 +++
 src/gallium/winsys/i915/drm/meson.build | 31 +++
 5 files changed, 118 insertions(+), 2 deletions(-)
 create mode 100644 src/gallium/drivers/i915/meson.build
 create mode 100644 src/gallium/winsys/i915/drm/meson.build

diff --git a/meson.build b/meson.build
index 64084d686e3..7c70eede080 100644
--- a/meson.build
+++ b/meson.build
@@ -113,6 +113,7 @@ with_gallium_vc4 = false
 with_gallium_vc5 = false
 with_gallium_etnaviv = false
 with_gallium_imx = false
+with_gallium_i915 = false
 _drivers = get_option('gallium-drivers')
 if _drivers != ''
   _split = _drivers.split(',')
@@ -125,6 +126,7 @@ if _drivers != ''
   with_gallium_vc5 = _split.contains('vc5')
   with_gallium_etnaviv = _split.contains('etnaviv')
   with_gallium_imx = _split.contains('imx')
+  with_gallium_i915 = _split.contains('i915')
   with_gallium = true
   with_dri = true
 endif
@@ -140,12 +142,15 @@ endif
 if with_dri_swrast and with_gallium_softpipe
   error('Only one swrast provider can be built')
 endif
+if with_dri_i915 and with_gallium_i915
+  error('Only one i915 provider can be built')
+endif
 if with_gallium_imx and not with_gallium_etnaviv
   error('IMX driver requires etnaviv driver')
 endif
 
 dep_libdrm_intel = []
-if with_dri_i915
+if with_dri_i915 or with_gallium_i915
   dep_libdrm_intel = dependency('libdrm_intel', version : '>= 2.4.75')
 endif
 
diff --git a/src/gallium/drivers/i915/meson.build 
b/src/gallium/drivers/i915/meson.build
new file mode 100644
index 000..17f0f6adf8f
--- /dev/null
+++ b/src/gallium/drivers/i915/meson.build
@@ -0,0 +1,70 @@
+# Copyright ?? 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_i915 = files(
+  'i915_batchbuffer.h',
+  'i915_batch.h',
+  'i915_blit.c',
+  'i915_blit.h',
+  'i915_clear.c',
+  'i915_context.c',
+  'i915_context.h',
+  'i915_debug.c',
+  'i915_debug_fp.c',
+  'i915_debug.h',
+  'i915_debug_private.h',
+  'i915_flush.c',
+  'i915_fpc_emit.c',
+  'i915_fpc.h',
+  'i915_fpc_optimize.c',
+  'i915_fpc_translate.c',
+  'i915_prim_emit.c',
+  'i915_prim_vbuf.c',
+  'i915_public.h',
+  'i915_query.c',
+  'i915_query.h',
+  'i915_reg.h',
+  'i915_resource_buffer.c',
+  'i915_resource.c',
+  'i915_resource.h',
+  'i915_resource_texture.c',
+  'i915_screen.c',
+  'i915_screen.h',
+  'i915_state.c',
+  'i915_state_derived.c',
+  'i915_state_dynamic.c',
+  'i915_state_emit.c',
+  'i915_state_fpc.c',
+  'i915_state.h',
+  'i915_state_immediate.c',
+  'i915_state_inlines.h',
+  'i915_state_sampler.c',
+  'i915_state_static.c',
+  'i915_surface.c',
+  'i915_surface.h',
+  'i915_winsys.h',
+)
+
+libi915 = static_library(
+  'i915',
+  files_i915,
+  c_args : [c_vis_args],
+  include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux],
+)
diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index 570c37e6475..fe135cd3aac 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -42,6 +42,9 @@ endif
 if with_gallium_etnaviv
   subdir('drivers/etnaviv')
 endif
+if with_gallium_i915
+  subdir('drivers/i915')
+endif
 subdir('drivers/llvmpipe')
 subdir('winsys/sw/null')
 subdir('winsys/sw/dri')
@@ -66,8 +69,10 @@ endif
 if with_gallium_imx
   subdir('winsys/imx/drm')
 endif
+if with_gallium_i915
+  subdir('winsys/i915/drm')
+endif
 subdir('state_trackers/dri')
-# TODO: i915
 # TODO: SVGA
 # TODO: r300
 # TODO: r600
diff --git a/src/gallium/targets/dri/meson.build 
b/src/gallium/targets/dri/meson.build
index 0ce088e1aca..631cd664e52 100644
--- a/src/gallium/targets/dri/meson.build
+++ b/src/gallium/targets/dri/meson.build
@@ -107,6 +107,11 @@ if with_gallium_imx
   galli

[Mesa-dev] [PATCH 5/7] meson: build r600

2017-10-26 Thread Dylan Baker
This has been build tested only.

Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 meson.build  |  20 --
 meson_options.txt|   2 +-
 src/gallium/drivers/r600/meson.build | 128 +++
 src/gallium/meson.build  |   4 +-
 src/gallium/targets/dri/meson.build  |   7 +-
 5 files changed, 153 insertions(+), 8 deletions(-)
 create mode 100644 src/gallium/drivers/r600/meson.build

diff --git a/meson.build b/meson.build
index a03da18659e..3aa4cbfddc4 100644
--- a/meson.build
+++ b/meson.build
@@ -107,6 +107,7 @@ with_gallium = false
 with_gallium_pl111 = false
 with_gallium_radeonsi = false
 with_gallium_r300 = false
+with_gallium_r600 = false
 with_gallium_nouveau = false
 with_gallium_freedreno = false
 with_gallium_softpipe = false
@@ -121,6 +122,7 @@ if _drivers != ''
   with_gallium_pl111 = _split.contains('pl111')
   with_gallium_radeonsi = _split.contains('radeonsi')
   with_gallium_r300 = _split.contains('r300')
+  with_gallium_r600 = _split.contains('r600')
   with_gallium_nouveau = _split.contains('nouveau')
   with_gallium_freedreno = _split.contains('freedreno')
   with_gallium_softpipe = _split.contains('swrast')
@@ -623,9 +625,13 @@ dep_thread = dependency('threads')
 if dep_thread.found() and host_machine.system() == 'linux'
   pre_args += '-DHAVE_PTHREAD'
 endif
-dep_elf = dependency('libelf', required : false)
-if not dep_elf.found() and (with_amd_vk or with_gallium_radeonsi) # TODO: 
clover, r600
-  dep_elf = cc.find_library('elf')
+if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 # TODO: clover
+  dep_elf = dependency('libelf', required : false)
+  if not dep_elf.found()
+dep_elf = cc.find_library('elf')
+  endif
+else
+  dep_elf = []
 endif
 dep_expat = dependency('expat')
 # this only exists on linux so either this is linux and it will be found, or
@@ -640,7 +646,8 @@ dep_libdrm_freedreno = []
 if with_amd_vk or with_gallium_radeonsi
   dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.85')
 endif
-if with_gallium_radeonsi or with_dri_r100 or with_dri_r200 or with_gallium_r300
+if (with_gallium_radeonsi or with_dri_r100 or with_dri_r200 or
+with_gallium_r300 or with_gallium_r600)
   dep_libdrm_radeon = dependency('libdrm_radeon', version : '>= 2.4.71')
 endif
 if with_gallium_nouveau or with_dri_nouveau
@@ -654,8 +661,11 @@ if with_gallium_freedreno
 endif
 
 llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit']
-if with_amd_vk or with_gallium_radeonsi # TODO: r600
+if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
   llvm_modules += ['amdgpu', 'bitreader', 'ipo']
+  if with_gallium_r600
+llvm_modules += 'asmparser'
+  endif
 endif
 dep_llvm = dependency(
   'llvm', version : '>= 3.9.0', required : with_amd_vk, modules : llvm_modules,
diff --git a/meson_options.txt b/meson_options.txt
index 6ac22600ceb..b811fda0dc1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,7 +46,7 @@ option(
 option(
   'gallium-drivers',
   type : 'string',
-  value : 'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx,r300',
+  value : 'pl111,radeonsi,nouveau,freedreno,swrast,vc4,etnaviv,imx,r300,r600',
   description : 'comma separated list of gallium drivers to build.'
 )
 option(
diff --git a/src/gallium/drivers/r600/meson.build 
b/src/gallium/drivers/r600/meson.build
new file mode 100644
index 000..411b550331d
--- /dev/null
+++ b/src/gallium/drivers/r600/meson.build
@@ -0,0 +1,128 @@
+# Copyright ?? 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_r600 = files(
+  'r600d_common.h',
+  'compute_memory_pool.c',
+  'compute_memory_pool.h',
+  'eg_asm.c',
+  'eg_debug.c',
+  'eg_sq.h',
+  'evergreen_compute.c',
+  'evergreen_compute.h',
+  'evergreen_compute_internal.h',
+  'evergreend.h',
+  'evergreen_hw_context.c',
+  'evergreen_state.c',
+  'r600_asm.c

Re: [Mesa-dev] [PATCH mesa v2] meson: wire up selinux

2017-10-26 Thread Dylan Baker
I don't have an selinux enabled system to test with either, but this looks
correct and doesn't break the build.

Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Quoting Eric Engestrom (2017-10-26 09:30:24)
> Signed-off-by: Eric Engestrom <eric.engest...@imgtec.com>
> ---
> build-tested only
> ---
>  meson.build   | 5 -
>  meson_options.txt | 6 ++
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 2a89b6482f966293282f..d245fbcea2ee9b02baf5 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -688,8 +688,11 @@ endif
>  prog_bison = find_program('bison', required : with_any_opengl)
>  prog_flex = find_program('flex', required : with_any_opengl)
>  
> -# TODO: selinux
>  dep_selinux = []
> +if get_option('selinux')
> +  dep_selinux = dependency('libselinux')
> +  pre_args += '-DMESA_SELINUX'
> +endif
>  
>  # TODO: llvm-prefix and llvm-shared-libs
>  
> diff --git a/meson_options.txt b/meson_options.txt
> index b44c93df0015f828d9e1..665ebb318c90142183b4 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -160,3 +160,9 @@ option(
>value : false,
>description : 'Enable floating point textures and renderbuffers. This 
> option may be patent encumbered, please read docs/patents.txt and consult 
> with your lawyer before turning this on.'
>  )
> +option(
> +  'selinux',
> +  type : 'boolean',
> +  value : false,
> +  description : 'Build an SELinux-aware Mesa'
> +)
> -- 
> Cheers,
>   Eric
> 


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


Re: [Mesa-dev] [PATCH mesa 1/2] buildsys: move file regeneration logic to the script itself

2017-10-26 Thread Dylan Baker
I have a few tiny nits, but otherwise this seems fine:
Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Quoting Eric Engestrom (2017-10-26 08:40:56)
> Suggested-by: Jordan Justen <jordan.l.jus...@intel.com>
> Signed-off-by: Eric Engestrom <eric.engest...@imgtec.com>
> ---
>  bin/git_sha1_gen.py  | 13 -
>  src/Makefile.am  | 15 ---
>  src/SConscript   | 22 ++
>  src/mesa/Android.libmesa_git_sha1.mk |  4 ++--
>  4 files changed, 24 insertions(+), 30 deletions(-)
> 
> diff --git a/bin/git_sha1_gen.py b/bin/git_sha1_gen.py
> index c75dba101acf4ffc85fb..7b9267b59e9d1d897cc4 100755
> --- a/bin/git_sha1_gen.py
> +++ b/bin/git_sha1_gen.py
> @@ -6,6 +6,7 @@
>  """
>  
>  
> +import argparse
>  import os
>  import os.path
>  import subprocess
> @@ -27,10 +28,20 @@ def get_git_sha1():
>  git_sha1 = ''
>  return git_sha1
>  
> +parser = argparse.ArgumentParser()
> +parser.add_argument('--output', help='File to write the #define in',
> +required=True)
> +args = parser.parse_args()
>  
>  git_sha1 = os.environ.get('MESA_GIT_SHA1_OVERRIDE', get_git_sha1())[:10]
>  if git_sha1:
>  git_sha1_h_in_path = os.path.join(os.path.dirname(sys.argv[0]),
>  '..', 'src', 'git_sha1.h.in')
>  with open(git_sha1_h_in_path , 'r') as git_sha1_h_in:
> -sys.stdout.write(git_sha1_h_in.read().replace('@VCS_TAG@', git_sha1))
> +new_sha1 = git_sha1_h_in.read().replace('@VCS_TAG@', git_sha1)
> +if os.path.isfile(args.output):
> +with open(args.output, 'r') as git_sha1_h:
> +if git_sha1_h.read() == new_sha1:
> +quit()
> +with open(args.output, 'w') as git_sha1_h:
> +git_sha1_h.write(new_sha1)
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 5ef2d4f55eacc470a7a9..1de4fca6a1216e7662b1 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -19,17 +19,10 @@
>  # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
> DEALINGS
>  # IN THE SOFTWARE.
>  
> -.PHONY: git_sha1.h.tmp
> -git_sha1.h.tmp:
> -   @$(PYTHON2) $(top_srcdir)/bin/git_sha1_gen.py > $@
> -
> -git_sha1.h: git_sha1.h.tmp
> -   @echo "updating git_sha1.h"
> -   @if ! cmp -s git_sha1.h.tmp git_sha1.h; then \
> -   mv git_sha1.h.tmp git_sha1.h ;\
> -   else \
> -   rm git_sha1.h.tmp ;\
> -   fi
> +.PHONY: git_sha1.h
> +git_sha1.h: $(top_srcdir)/src/git_sha1.h.in
> +   @echo "updating $@"
> +   @$(PYTHON2) $(top_srcdir)/bin/git_sha1_gen.py --output $@
>  
>  BUILT_SOURCES = git_sha1.h
>  CLEANFILES = $(BUILT_SOURCES)
> diff --git a/src/SConscript b/src/SConscript
> index a277e8b79254588e8fd4..820c3c01289e7544a57e 100644
> --- a/src/SConscript
> +++ b/src/SConscript
> @@ -24,22 +24,12 @@ def write_git_sha1_h_file(filename):
>  to retrieve the git hashid and write the header file.  An empty file
>  will be created if anything goes wrong."""
>  
> -tempfile = "git_sha1.h.tmp"
> -with open(tempfile, "w") as f:
> -args = [ python_cmd, Dir('#').abspath + '/bin/git_sha1_gen.py' ]
> -try:
> -subprocess.Popen(args, stdout=f).wait()
> -except:
> -print("Warning: exception in write_git_sha1_h_file()")
> -return
> -
> -if not os.path.exists(filename) or not filecmp.cmp(tempfile, filename):
> -# The filename does not exist or it's different from the new file,
> -# so replace old file with new.
> -if os.path.exists(filename):
> -os.remove(filename)
> -os.rename(tempfile, filename)
> -return
> +args = [ python_cmd, Dir('#').abspath + '/bin/git_sha1_gen.py', 
> '--output', filename]

space after the opening brace but none before the closing. I don't konw what the
scons style is, but you should probably be consistent

> +try:
> +subprocess.Popen(args).wait()

how about subprocess.call() instead of Popen().wait()?

> +except:
> +print("Warning: exception in write_git_sha1_h_file()")
> +return
>  
>  
>  # Create the git_sha1.h header file
> diff --git a/src/mesa/Android.libmesa_git_sha1.mk 
> b/src/mesa/Android.libmesa_git_sha1.mk
> index ddb30c428af739ee9fe5..d27923074dd289a115de 100644
> --- a/src/mesa/Android.libmesa_git_sha1.mk
> +++ b/src/mesa/Android.libmesa_git_sha1.mk
> @@ -43,10 +43,10 @@ $(intermediates)/dummy.c:
>  
>  LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, git_sha1.h

Re: [Mesa-dev] [PATCH mesa v2 2/2] meson: bring MESA_GIT_SHA1 in line with other build systems

2017-10-26 Thread Dylan Baker
one small nit, otherwise,
Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Quoting Eric Engestrom (2017-10-26 08:40:57)
> From: Eric Engestrom <e...@engestrom.ch>
> 
> Meson's vcs_tag() uses the output of `git describe`, eg.
>   17.3-branchpoint-5-gfbf29c3cd15ae831e249+
> 
> Whereas the other build systems used a script that outputs only the sha1
> of the HEAD commit, eg.
>   fbf29c3cd1
> 
> Given that this information is used by printing it next to the version
> number, there's some redundancy here, and inconsistency between build
> systems.
> 
> Bring Meson in line by making it use the same script, with the added
> advantage of now supporting the MESA_GIT_SHA1_OVERRIDE env var.
> 
> Signed-off-by: Eric Engestrom <e...@engestrom.ch>
> ---
> v2: add patch 1/2 to avoid having to rebuild when nothing changed (Jordan 
> Justen)
> ---
>  bin/meson.build | 21 +
>  meson.build |  1 +
>  src/meson.build |  6 --
>  3 files changed, 26 insertions(+), 2 deletions(-)
>  create mode 100644 bin/meson.build
> 
> diff --git a/bin/meson.build b/bin/meson.build
> new file mode 100644
> index ..b8b44baf7d03e2b0658f
> --- /dev/null
> +++ b/bin/meson.build
> @@ -0,0 +1,21 @@
> +# Copyright © 2017 Eric Engestrom
> +
> +# Permission is hereby granted, free of charge, to any person obtaining a 
> copy
> +# of this software and associated documentation files (the "Software"), to 
> deal
> +# in the Software without restriction, including without limitation the 
> rights
> +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> +# copies of the Software, and to permit persons to whom the Software is
> +# furnished to do so, subject to the following conditions:
> +
> +# The above copyright notice and this permission notice shall be included in
> +# all copies or substantial portions of the Software.
> +
> +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
> FROM,
> +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
> THE
> +# SOFTWARE.
> +
> +git_sha1_gen_py = files('git_sha1_gen.py')
> diff --git a/meson.build b/meson.build
> index 5f6dabc33ec83498e335..738ebc510ace26fd7917 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -846,4 +846,5 @@ endif
>  pkg = import('pkgconfig')
>  
>  subdir('include')
> +subdir('bin')
>  subdir('src')
> diff --git a/src/meson.build b/src/meson.build
> index 9b1b0ae594d103a12ba2..363baf5ae5e63a70333b 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -34,9 +34,11 @@ libglsl_util = static_library(
>build_by_default : false,
>  )
>  
> -sha1_h = vcs_tag(
> -  input : 'git_sha1.h.in',
> +sha1_h = custom_target(
> +  'git_sha1.h',
>output : 'git_sha1.h',
> +  command : [prog_python2, git_sha1_gen_py, '--output', '@OUTPUT@'],
> +  build_always : true,
>  )

I would leave a comment about why we're setting build always to true.

>  
>  subdir('gtest')
> -- 
> Cheers,
>   Eric
> 


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


Re: [Mesa-dev] [PATCH] meson: do not search for needless deps

2017-10-26 Thread Dylan Baker
Quoting Gert Wollny (2017-10-26 02:49:56)
> 
> Am Mittwoch, den 25.10.2017, 10:24 +0200 schrieb Erik Faye-Lund:
> > If we don't want to use these deps, there's no good reason to search
> > for them in the first place. This should shave a bit of time for the
> > initial build.
> > ---
> > 
> > This would be a way of dealing with Gert's suggestion. Goes on top
> > of the previous patch.
> > 
> > Thoughts?
> > 
> >  meson.build | 20 ++--
> >  1 file changed, 14 insertions(+), 6 deletions(-)
> > 
> > diff --git a/meson.build b/meson.build
> > index e842bb1652..201956c4c8 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -666,9 +666,13 @@ if with_glvnd
> >  endif
> >  
> >  # TODO: make this conditional
> > -dep_valgrind = dependency('valgrind', required : false)
> > -if dep_valgrind.found() and with_valgrind
> > -  pre_args += '-DHAVE_VALGRIND'
> > +if with_valgrind
> > +  dep_valgrind = dependency('valgrind', required : false)
> > +  if dep_valgrind.found()
> > +pre_args += '-DHAVE_VALGRIND'
> > +  endif
> > +else
> > +  dep_valgrind = []
> >  endif
> >  
> >  # pthread stubs. Lets not and say we didn't
> > @@ -681,9 +685,13 @@ dep_selinux = []
> >  
> >  # TODO: llvm-prefix and llvm-shared-libs
> >  
> > -dep_unwind = dependency('libunwind', required : false)
> > -if dep_unwind.found() and with_libunwind
> > -  pre_args += '-DHAVE_LIBUNWIND'
> > +if with_libunwind
> > +  dep_unwind = dependency('libunwind', required : false)
> > +  if dep_unwind.found()
> > +pre_args += '-DHAVE_LIBUNWIND'
> > +  endif
> > +else
> > +  dep_unwind = []
> >  endif
> >  
> >  # TODO: flags for opengl, gles, dri
> 
> Obviously, I like this more, but after reviewing what is done with the
> autotools, I think it would be preferable if meson would do the same
> i.e. with autotools 
> 
>   --enable-libunwind=no -> don't use libunwind 
>   --enable-libunwind=yes -> require libunwind 
> 
> and if not given, then use it if available. The "force using libunwind"
> option is currently missing.
> 
> I don't know yet how to use meson properly, but I guess one could
> achieve this  by something like (put in the apropriate files): 
> 
> option('with_libunwind', 
> type : 'combo', 
> choices : ['auto', 'yes', 'no'])
> 
> if with_libunwind != 'no'
>   dep_unwind = dependency('libunwind', 
>required : with_libunwind == 'yes')
>   if dep_unwind.found()
> pre_args += '-DHAVE_LIBUNWIND'
>   endif
> else
>   dep_unwind = []
> endif
> 
> Best, 
> Gert

That is in fact how you'd do it. The only thing I'd change is Ajax convinced me
that auto, yes, no should be auto, true, false. That way when you're passing
options you don't have to care whether it's a boolean or tri-state.

Dylan


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


Re: [Mesa-dev] meson for remaining class drivers

2017-10-26 Thread Dylan Baker
Quoting Eric Anholt (2017-10-26 10:33:11)
> Dylan Baker <dy...@pnwbakers.com> writes:
> 
> > [ Unknown signature status ]
> > ping
> 
> You had my r-b other than one comment.  Are you pinging for something
> else?

Ilia and Timothy had expressed that they wanted to look at it, I wanted to make
sure they didn't have comments before I pushed.


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


Re: [Mesa-dev] [PATCH 9/9] meson: build gallium based osmesa

2017-10-26 Thread Dylan Baker
Quoting Eric Engestrom (2017-10-26 02:40:20)
> On Wednesday, 2017-10-25 15:58:23 -0700, Dylan Baker wrote:
> > This has been tested with the osdemo from mesa-demos
> > 
> > Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
> > ---
> >  meson.build   |  3 ++
> >  meson_options.txt |  2 +-
> >  src/gallium/meson.build   |  7 ++-
> >  src/gallium/state_trackers/osmesa/meson.build | 28 +++
> >  src/gallium/targets/osmesa/meson.build| 68 
> > +++
> >  5 files changed, 106 insertions(+), 2 deletions(-)
> >  create mode 100644 src/gallium/state_trackers/osmesa/meson.build
> >  create mode 100644 src/gallium/targets/osmesa/meson.build
> > 
> > diff --git a/meson.build b/meson.build
> > index 79ce59c6b27..0bbe330042b 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -704,6 +704,9 @@ if with_osmesa != 'none'
> >if with_osmesa == 'classic' and not with_dri_swrast
> >  error('OSMesa classic requires dri (classic) swrast.')
> >endif
> > +  if with_osmesa == 'gallium' and not with_gallium_softpipe
> > +error('OSMesa gallium requires gallium softpipe or llvmpipe.')
> > +  endif
> >osmesa_lib_name = 'OSMesa'
> >osmesa_bits = get_option('osmesa-bits')
> >if osmesa_bits != '8'
> > diff --git a/meson_options.txt b/meson_options.txt
> > index 97aca571a48..a0b8044e4bb 100644
> > --- a/meson_options.txt
> > +++ b/meson_options.txt
> > @@ -164,7 +164,7 @@ option(
> >'osmesa',
> >type : 'combo',
> >value : 'none',
> > -  choices : ['none', 'classic'],
> > +  choices : ['none', 'classic', 'gallium'],
> >description : 'Build OSmesa.'
> >  )
> >  option(
> > diff --git a/src/gallium/meson.build b/src/gallium/meson.build
> > index e0941103b93..6edfe80321d 100644
> > --- a/src/gallium/meson.build
> > +++ b/src/gallium/meson.build
> > @@ -66,6 +66,9 @@ if with_gallium_imx
> >subdir('winsys/imx/drm')
> >  endif
> >  subdir('state_trackers/dri')
> > +if with_osmesa == 'gallium'
> > +  subdir('state_trackers/osmesa')
> > +endif
> >  # TODO: i915
> >  # TODO: SVGA
> >  # TODO: r300
> > @@ -77,9 +80,11 @@ subdir('state_trackers/dri')
> >  if with_dri and with_gallium
> >subdir('targets/dri')
> >  endif
> > +if with_osmesa == 'gallium'
> > +  subdir('targets/osmesa')
> > +endif
> >  # TODO: xlib-glx
> >  # TODO: OMX
> > -# TODO: osmesa
> >  # TODO: VA
> >  # TODO: vdpau
> >  # TODO: xa
> > diff --git a/src/gallium/state_trackers/osmesa/meson.build 
> > b/src/gallium/state_trackers/osmesa/meson.build
> > new file mode 100644
> > index 000..dacf10512d6
> > --- /dev/null
> > +++ b/src/gallium/state_trackers/osmesa/meson.build
> > @@ -0,0 +1,28 @@
> > +# Copyright © 2017 Intel Corporation
> > +
> > +# Permission is hereby granted, free of charge, to any person obtaining a 
> > copy
> > +# of this software and associated documentation files (the "Software"), to 
> > deal
> > +# in the Software without restriction, including without limitation the 
> > rights
> > +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> > +# copies of the Software, and to permit persons to whom the Software is
> > +# furnished to do so, subject to the following conditions:
> > +
> > +# The above copyright notice and this permission notice shall be included 
> > in
> > +# all copies or substantial portions of the Software.
> > +
> > +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
> > OR
> > +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
> > THE
> > +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
> > FROM,
> > +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
> > IN THE
> > +# SOFTWARE.
> > +
> > +libosmesa_st = static_library(
> > +  'osmesa_st',
> > +  'osmesa.c',
> > +  c_args : ['-DGALLIUM_SOFTPIPE', '-DGALLIUM_TRACE'],
> > +  include_directories : [
> > +inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa,
> > +  ],
> > +)
> > diff --git a/src/gallium/targets/osmesa/meso

[Mesa-dev] [PATCH] meson: Add a dependency on nir_opcodes_h for freedreno

2017-10-27 Thread Dylan Baker
This fixes a race condition in the build.

cc: Rob Clark <robdcl...@gmail.com>
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 src/gallium/drivers/freedreno/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/meson.build 
b/src/gallium/drivers/freedreno/meson.build
index 028be54ebac..6f7cf2b3bd4 100644
--- a/src/gallium/drivers/freedreno/meson.build
+++ b/src/gallium/drivers/freedreno/meson.build
@@ -200,7 +200,7 @@ freedreno_includes = [
 
 libfreedreno = static_library(
   'freedreno',
-  [files_libfreedreno, ir3_nir_trig_c],
+  [files_libfreedreno, ir3_nir_trig_c, nir_opcodes_h],
   include_directories : freedreno_includes,
   c_args : [c_vis_args],
   cpp_args : [cpp_vis_args],
-- 
2.14.2

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


Re: [Mesa-dev] [PATCH] meson: drop vulkan if no drivers are built

2017-10-27 Thread Dylan Baker
This just papers over the actual problem, that dep_xcb isn't declared as an
empty list with the other glx dependencies.

Dylan

Quoting Erik Faye-Lund (2017-10-27 04:55:25)
> This avoids the following build-error when building with emtpy
> vulkan-drivers and without glx=dri:
> 
> Meson encountered an error in file src/vulkan/wsi/meson.build, line 30,
> column 2:
> Unknown variable "dep_xcb".
> 
> Signed-off-by: Erik Faye-Lund 
> ---
>  src/meson.build | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/meson.build b/src/meson.build
> index 9b1b0ae594..4b00ab910c 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -47,7 +47,9 @@ subdir('mapi')
>  # TODO: osmesa
>  subdir('compiler')
>  subdir('egl/wayland/wayland-drm')
> -subdir('vulkan')
> +if with_any_vk
> +  subdir('vulkan')
> +endif
>  subdir('amd')
>  if with_gallium_vc4
>subdir('broadcom')
> -- 
> 2.11.0
> 


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


[Mesa-dev] [PATCH] meson: declare an empty xcb dependency

2017-10-27 Thread Dylan Baker
This is needed in cases where xcb isn't actually needed as a dependency,
but may still be included somewhere.

cc: Erik Faye-Lund <kusmab...@gmail.com>
cc: Eric Engestrom <eric.engest...@imgtec.com>
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meson.build b/meson.build
index 875f9d4d294..102b75c2320 100644
--- a/meson.build
+++ b/meson.build
@@ -740,6 +740,7 @@ dep_xext = []
 dep_xdamage = []
 dep_xfixes = []
 dep_x11_xcb = []
+dep_xcb = []
 dep_xcb_glx = []
 dep_xcb_dri2 = []
 dep_xcb_dri3 = []
-- 
2.14.2

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


Re: [Mesa-dev] [PATCH mesa] meson: wire up egl/android

2017-10-27 Thread Dylan Baker
Whooo! Thanks for doing this!

Quoting Eric Engestrom (2017-10-27 07:40:17)
> Cc: Rob Herring <r...@kernel.org>
> Cc: Tomasz Figa <tf...@chromium.org>
> Signed-off-by: Eric Engestrom <eric.engest...@imgtec.com>
> ---
> Completely untested!
> It's a step in the right direction though; doesn't hurt non-android,
> and gets android closer to building on meson :)
> ---
>  meson.build | 13 +++--
>  src/egl/meson.build |  5 -
>  2 files changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 875f9d4d294d1911f239..761c33f4651ab37ab7b6 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -152,7 +152,7 @@ endif
>  # TODO: other OSes
>  with_dri_platform = 'drm'
>  
> -# TODO: android platform
> +with_platform_android = false
>  with_platform_wayland = false
>  with_platform_x11 = false
>  with_platform_drm = false
> @@ -161,6 +161,7 @@ egl_native_platform = ''
>  _platforms = get_option('platforms')
>  if _platforms != ''
>_split = _platforms.split(',')
> +  with_platform_android = _split.contains('android')
>with_platform_x11 = _split.contains('x11')
>with_platform_wayland = _split.contains('wayland')
>with_platform_drm = _split.contains('drm')
> @@ -252,7 +253,7 @@ if _vulkan_drivers != ''
>with_intel_vk = _split.contains('intel')
>with_amd_vk = _split.contains('amd')
>with_any_vk = with_amd_vk or with_intel_vk
> -  if not (with_platform_x11 or with_platform_wayland)
> +  if not (with_platform_x11 or with_platform_wayland or 
> with_platform_android)
>  error('Vulkan requires at least one platform (x11, wayland)')
>endif
>  endif
> @@ -330,6 +331,14 @@ endif
>  if with_platform_surfaceless
>pre_args += '-DHAVE_SURFACELESS_PLATFORM'
>  endif
> +if with_platform_android
> +  dep_android = [
> +  dependency('cutils'),
> +  dependency('hardware'),
> +  dependency('sync'),
> +  ]

The indent looks off here, it looks like 4 space instead of 2, and the closing
brace should be dedented.

Otherwise this looks good to me, though it would be great if one of the
ChromeOS guys could look at it (since I think that android builds are always
done with android.mk, and this would only be for the ChromeOS ARC++ container)

Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

> +  pre_args += '-DHAVE_ANDROID_PLATFORM'
> +endif
>  
>  prog_python2 = find_program('python2')
>  has_mako = run_command(prog_python2, '-c', 'import mako')
> diff --git a/src/egl/meson.build b/src/egl/meson.build
> index ea7ae06761f75c00a40c..cc51671f9d8f24708405 100644
> --- a/src/egl/meson.build
> +++ b/src/egl/meson.build
> @@ -129,7 +129,10 @@ if with_platform_wayland
>  'wayland/wayland-egl', 'wayland/wayland-drm',
>)
>  endif
> -# TODO: android
> +if with_platform_android
> +  deps_for_egl += dep_android
> +  files_egl += files('drivers/dri2/platform_android.c')
> +endif
>  
>  # TODO: glvnd
>  
> -- 
> Cheers,
>   Eric
> 


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


Re: [Mesa-dev] [PATCH 9/9] meson: build gallium based osmesa

2017-10-27 Thread Dylan Baker
Quoting Eric Engestrom (2017-10-27 02:28:05)
> On Thursday, 2017-10-26 13:55:35 -0700, Dylan Baker wrote:
> > Quoting Eric Engestrom (2017-10-26 02:40:20)
> > > On Wednesday, 2017-10-25 15:58:23 -0700, Dylan Baker wrote:
> > > > +if with_shared_glapi
> > > > +  osmesa_link_with += libglapi
> > > > +endif
> > > > +if with_ld_version_script
> > > > +  osmesa_link_args += [
> > > > +'-Wl,--version-script', join_paths(meson.current_source_dir(), 
> > > > 'osmesa.sym')
> > > 
> > > files('osmesa.sym') ?
> > > I'm not sure if it would work here though, since it expects a string.
> > > /me hopes meson converts the file_array to a list of its filenames
> > > 
> > 
> > files() doesn't work here. Maybe it makes sense to extend meson to support 
> > that?
> 
> We're not the first ones to think about this :)
> There's already an issue open for this exact case [1], which doesn't really
> have a conclusion. Might be worth chiming in, if only to ping them?
> 
> [1] https://github.com/mesonbuild/meson/issues/1592
> 

I kinda hacked something up real quick. I don't think it would be hard to
implement, although I started wondering about it. Part of what makes File so
special is that it always works no matter what directory you're in. I don't
think that th right thing is to be able to us them in string.format, but to be
able to pass them as a linker or compiler argument, and have that do the right
thing with them. I'll look into that more.

Dylan


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


[Mesa-dev] [PATCH] meson: Add threads dependencies to glsl_compiler executable

2017-10-27 Thread Dylan Baker
Fixes compiling the optional standalone glsl compiler.

Reported-by: DrNick (on irc)
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---

This is not compiled by default, but can be built by:
meson build
ninja -C build src/compiler/glsl/glsl_compiler

 src/compiler/glsl/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
index 76fcafb9910..aa0e7153f42 100644
--- a/src/compiler/glsl/meson.build
+++ b/src/compiler/glsl/meson.build
@@ -223,7 +223,7 @@ glsl_compiler = executable(
   'main.cpp',
   c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
   cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
-  dependencies : [dep_clock],
+  dependencies : [dep_clock, dep_thread],
   include_directories : [inc_common],
   link_with : [libglsl_standalone],
   build_by_default : false,
-- 
2.14.2

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


Re: [Mesa-dev] [PATCH] meson: declare an empty xcb dependency

2017-10-27 Thread Dylan Baker
Well, I went to push this, apparently this was in one of the osmesa
patches as an unrelated change.. :/

So it's fixed.

Dylan

Quoting Dylan Baker (2017-10-27 10:25:33)
> This is needed in cases where xcb isn't actually needed as a dependency,
> but may still be included somewhere.
> 
> cc: Erik Faye-Lund <kusmab...@gmail.com>
> cc: Eric Engestrom <eric.engest...@imgtec.com>
> Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
> ---
>  meson.build | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meson.build b/meson.build
> index 875f9d4d294..102b75c2320 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -740,6 +740,7 @@ dep_xext = []
>  dep_xdamage = []
>  dep_xfixes = []
>  dep_x11_xcb = []
> +dep_xcb = []
>  dep_xcb_glx = []
>  dep_xcb_dri2 = []
>  dep_xcb_dri3 = []
> -- 
> 2.14.2
> 


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


[Mesa-dev] [PATCH] scons: Fix glapi include path changes

2017-10-27 Thread Dylan Baker
fixes: 5daed06da2c0aaa4 ("osmesa: Include generated headers without path")
cc: Mark Janes <mark.a.ja...@intel.com>
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 src/mapi/glapi/SConscript  | 1 +
 src/mesa/drivers/osmesa/SConscript | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
index 994778a8fb9..11f2b6dddfd 100644
--- a/src/mapi/glapi/SConscript
+++ b/src/mapi/glapi/SConscript
@@ -31,6 +31,7 @@ env.Append(CPPPATH = [
 '#/src/mapi',
 '#/src/mesa',
 Dir('..'), # src/mapi build path
+Dir('.'), # src/mapi/glapi build path
 ])
 
 glapi_sources = [
diff --git a/src/mesa/drivers/osmesa/SConscript 
b/src/mesa/drivers/osmesa/SConscript
index 728031446e5..43da571f085 100644
--- a/src/mesa/drivers/osmesa/SConscript
+++ b/src/mesa/drivers/osmesa/SConscript
@@ -6,7 +6,9 @@ env.Prepend(CPPPATH = [
 '#src',
 '#src/mapi',
 '#src/mesa',
-Dir('../../../mapi'), # src/mapi build path for python-generated GL API 
files/headers
+# src/mapi{/glapi} build path for python-generated GL API files/headers
+Dir('../../../mapi'),
+Dir('../../../mapi/glapi'),
 ])
 
 env.Prepend(LIBS = [
-- 
2.14.2

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


Re: [Mesa-dev] [PATCH] scons: fix OSMesa driver build

2017-10-27 Thread Dylan Baker
Ah, I see that you fixed that already,
Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Quoting Brian Paul (2017-10-27 15:35:09)
> Fixes: ea53d9a8eb5d4b2 "glapi: include generated headers without path"
> ---
>  src/mesa/drivers/osmesa/SConscript | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/mesa/drivers/osmesa/SConscript 
> b/src/mesa/drivers/osmesa/SConscript
> index 7280314..9391dc3 100644
> --- a/src/mesa/drivers/osmesa/SConscript
> +++ b/src/mesa/drivers/osmesa/SConscript
> @@ -7,6 +7,7 @@ env.Prepend(CPPPATH = [
>  '#src/mapi',
>  '#src/mesa',
>  Dir('../../../mapi'), # src/mapi build path for python-generated GL API 
> files/headers
> +Dir('../../../mapi/glapi'), # src/mapi/glapi build path
>  ])
>  
>  env.Prepend(LIBS = [
> -- 
> 1.9.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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


Re: [Mesa-dev] [PATCH] scons: fix OSMesa driver build

2017-10-27 Thread Dylan Baker
I sent almost the same patch at exactly the same time. I also needed to add this
path to src/map/glapi/Sconscript to get scons building. Maybe that's unrelated?

Dylan

Quoting Brian Paul (2017-10-27 15:35:09)
> Fixes: ea53d9a8eb5d4b2 "glapi: include generated headers without path"
> ---
>  src/mesa/drivers/osmesa/SConscript | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/mesa/drivers/osmesa/SConscript 
> b/src/mesa/drivers/osmesa/SConscript
> index 7280314..9391dc3 100644
> --- a/src/mesa/drivers/osmesa/SConscript
> +++ b/src/mesa/drivers/osmesa/SConscript
> @@ -7,6 +7,7 @@ env.Prepend(CPPPATH = [
>  '#src/mapi',
>  '#src/mesa',
>  Dir('../../../mapi'), # src/mapi build path for python-generated GL API 
> files/headers
> +Dir('../../../mapi/glapi'), # src/mapi/glapi build path
>  ])
>  
>  env.Prepend(LIBS = [
> -- 
> 1.9.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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


Re: [Mesa-dev] [PATCH v4 2/3] autotools: Include meson.build files in tarball

2018-01-05 Thread Dylan Baker
Quoting Eric Engestrom (2018-01-05 06:02:52)
> On Thursday, 2018-01-04 10:28:41 -0800, Dylan Baker wrote:
> > Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
> 
> Do we really want to use autotools' `dist` to package libdrm once meson
> has landed?
> I would've though we would switch to meson and deprecate autotools right
> away.

I think we should maintain the autotools build at least for a couple of
releases. It gives distros a little bit of time to iron out any problems they
have in their automation.

> 
> On that note, have we talked about how long we'll keep autotools around?
> Since libdrm doesn't have a stable release schedule like mesa, it might
> be best to count it in months. 3 months? 6 months? A year?

I think 3 months would probably be fine, but I'm okay with whatever people
decide is appropriate.

> 
> Once that's decided, I think something like this should also be committed
> in this series:
> 
> 8<
> diff --git a/configure.ac b/configure.ac
> index 35378b3384290f8e1e26..38660e13995988f65c2c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -587,3 +587,9 @@ echo "  Tegra API  $TEGRA"
>  echo "  VC4 API$VC4"
>  echo "  Etnaviv API$ETNAVIV"
>  echo ""
> +
> +echo "libdrm's autotools build is DEPRECATED"
> +echo ""
> +echo "Please read the instructions in the README to start using Meson"
> +echo "The autotools build system will be removed on the next release after 
> 2018-XX-XX"
> +echo ""
> >8
> 
> > ---
> >  Makefile.am | 30 +-
> >  1 file changed, 29 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Makefile.am b/Makefile.am
> > index 7b86214..66f70ca 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -135,7 +135,35 @@ if HAVE_VMWGFX
> >  klibdrminclude_HEADERS += $(LIBDRM_INCLUDE_VMWGFX_H_FILES)
> >  endif
> >  
> > -EXTRA_DIST = include/drm/README
> > +EXTRA_DIST = \
> > + include/drm/README \
> > + amdgpu/meson.build \
> > + etnaviv/meson.build \
> > + exynos/meson.build \
> > + freedreno/meson.build \
> > + intel/meson.build \
> > + libkms/meson.build \
> > + man/meson.build \
> > + nouveau/meson.build \
> > + omap/meson.build \
> > + radeon/meson.build \
> > + tests/amdgpu/meson.build \
> > + tests/etnaviv/meson.build \
> > + tests/exynos/meson.build \
> > + tests/kms/meson.build \
> > + tests/kmstest/meson.build \
> > + tests/modeprint/meson.build \
> > + tests/nouveau/meson.build \
> > + tests/proptest/meson.build \
> > + tests/radeon/meson.build \
> > + tests/tegra/meson.build \
> > + tests/util/meson.build \
> > + tests/vbltest/meson.build \
> > + tests/meson.build \
> > + vc4/meson.build \
> > + data/meson.build \
> > + meson.build \
> > + meson_options.txt
> >  
> >  copy-headers :
> >   cp -r $(kernel_source)/include/uapi/drm/*.h $(top_srcdir)/include/drm/
> > -- 
> > git-series 0.9.1


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


Re: [Mesa-dev] [PATCH v4 3/3] README: Add note about meson

2018-01-05 Thread Dylan Baker
Quoting Eric Engestrom (2018-01-05 05:49:25)
> On Thursday, 2018-01-04 10:28:42 -0800, Dylan Baker wrote:
> > Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
> 
> Couple nitpicks, but:
> Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com>
> 
> > ---
> >  README | 21 ++---
> >  1 file changed, 18 insertions(+), 3 deletions(-)
> > 
> > diff --git a/README b/README
> > index 26cab9d..58e55bc 100644
> > --- a/README
> > +++ b/README
> > @@ -15,9 +15,24 @@ with an older kernel.
> >  Compiling
> >  -
> >  
> > -libdrm  is  a  standard  autotools  package and  follows  the  normal
> > -configure, build  and install steps.   The first step is  to configure
> > -the package, which is done by running the configure shell script:
> > +libdrm has two build systems, a legacy autotools build system, and a newer
> > +meson build system. The meson build system is much faster, and offers a 
> > +slightly different interface, but otherwise provides much the same 
> 
> s/much/pretty much/ ?

It is a valid construct, but it's a bit archaic, so how about
`s/much the same/equivalent/`?

> 
> > +feature set.
> > +
> > +To use it:
> > +
> > +meson builddir
> 
> I'd suggest `builddir/` to make it more obvious it's a dir, not
> a command.

Makes sense.

> 
> > +
> > +By default this will install into /usr/local, you can change your prefix
> > +with --prefix=/usr (or -Dprefix=/usr to meson configure).
> 
> "(or `meson configure builddir/ -D prefix=/usr` to change it after the
> initial meson setup)."

Done.

> 
> > +
> > +Then use ninja to build and install:
> > +
> > +ninja -C builddir install
> > +
> > +
> > +Alternatively you can invoke autotools configure:
> >  
> >   ./configure
> >  
> > -- 
> > git-series 0.9.1


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


Re: [Mesa-dev] [PATCH v4 1/3] Add meson build system

2018-01-04 Thread Dylan Baker
Quoting Igor Gnatenko (2018-01-04 13:43:51)
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> On Thu, 2018-01-04 at 10:28 -0800, Dylan Baker wrote:
> > This patch adds a complete meson build system, including tests and
> > install. It has the necessary hooks to allow it be used as a subproject
> > for other meson based builds such as mesa.
> 
> Builds fine on all architectures supported by Fedora, boots fine on my laptop
> (x86_64).
> 
> All nitpicks are inline.
> 
> > Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
> 
> Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.br...@gmail.com>
> 
> > diff --git a/meson_options.txt b/meson_options.txt
> > new file mode 100644
> > index 000..08c2ccd
> > --- /dev/null
> > +++ b/meson_options.txt
> > @@ -0,0 +1,143 @@
> > [...]
> > +option(
> > +  'intel',
> > +  type : 'combo',
> > +  value : 'auto',
> > +  choices : ['true', 'false', 'auto'],
> > +  description : '''Enable support for Intel's KMS API.''',
> 
> Any reason to use `'''` here and there?

to avoid escaping the ' in "Intel's". But I can change it if you prefer.

> 
> > [...]
> > +option(
> > +  'man-pages',
> > +  type : 'combo',
> > +  value : 'auto',
> > +  choices : ['true', 'false', 'auto'],
> > +  description : 'Enable manpage generation and install.',
> 
> "installation".
> 
> > [...]
> > +option(
> > +  'valgrind',
> > +  type : 'combo',
> > +  value : 'auto',
> > +  choices : ['true', 'false', 'auto'],
> > +  description : 'build libdrm with valgrind support',
> 
> "Build". And fullstop at the end of sentence.
> - -- 
> - -Igor Gnatenko
> -BEGIN PGP SIGNATURE-
> 
> iQIzBAEBCAAdFiEEhLFO09aHZVqO+CM6aVcUvRu8X0wFAlpOoBcACgkQaVcUvRu8
> X0yF9w//cgaMVkU4xTKegRJY4uuzTE3MQvMmaCoA8ivBaCWPuoX3ozlwsAgZZXaZ
> Vo83tZ0u80cjgoSG4I/JcNp3UhsxtGgqcrqqcof/SGn+YS43eFKPL57dowwQ5qk3
> ccAUgHtAdQXuCJFaQFsTISSEj1X07RA04mIMe7QZFh7AHsKmv+ctaTUO7uJsXJzi
> aX7Z9rntTCnXvzZy7Y56XPCleXfi+yDzQPdDopZAEdLYT8hYUvebo6JGQUpg8iNd
> YuvZsbkrpyV1uMY/2feSJ3Ns4ZTAj3I4F41Xbb7CqZt/BX60EnkZJXog4RSbdlri
> cxMX7gPkrOXxNJbllmdN0nPdBP/atViRY7dDkE4Lv4YrmwL8oT4Mjfyb/TeINT2X
> 6NltSgc8+zSvQSkjWyKHzQ3ZQCQHIAheG+V2Cvnc1NIfX06AV9USRsSRzBMza+gW
> cWNT2g/M0jjmLTVEoLR8MSLXAB9gfsBdRDEnvqEsZCqDh1idW1Ttuk3m/h3+BT8i
> GMyCrswVgKLI7gBbdVFdLDarEIVtTJlYvPkGXxRyOzv1r5dM/MMmeay7P3WD+liE
> CLF9nRVrekQA7Mh4Y61RSyFAntzBokNKL+FrSzSuseNtgYAM3Es0JgY1ndsczvVX
> zUqULC0AEAEwmAIQmDlYFG+ut8nIvmk6aWHHlvLwUHgiDD+MEc4=
> =dAKV
> -END PGP SIGNATURE-
> 


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


[Mesa-dev] [PATCH v4 3/3] README: Add note about meson

2018-01-04 Thread Dylan Baker
Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 README | 21 ++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 26cab9d..58e55bc 100644
--- a/README
+++ b/README
@@ -15,9 +15,24 @@ with an older kernel.
 Compiling
 -
 
-libdrm  is  a  standard  autotools  package and  follows  the  normal
-configure, build  and install steps.   The first step is  to configure
-the package, which is done by running the configure shell script:
+libdrm has two build systems, a legacy autotools build system, and a newer
+meson build system. The meson build system is much faster, and offers a 
+slightly different interface, but otherwise provides much the same 
+feature set.
+
+To use it:
+
+meson builddir
+
+By default this will install into /usr/local, you can change your prefix
+with --prefix=/usr (or -Dprefix=/usr to meson configure).
+
+Then use ninja to build and install:
+
+ninja -C builddir install
+
+
+Alternatively you can invoke autotools configure:
 
./configure
 
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v4 2/3] autotools: Include meson.build files in tarball

2018-01-04 Thread Dylan Baker
Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 Makefile.am | 30 +-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 7b86214..66f70ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -135,7 +135,35 @@ if HAVE_VMWGFX
 klibdrminclude_HEADERS += $(LIBDRM_INCLUDE_VMWGFX_H_FILES)
 endif
 
-EXTRA_DIST = include/drm/README
+EXTRA_DIST = \
+   include/drm/README \
+   amdgpu/meson.build \
+   etnaviv/meson.build \
+   exynos/meson.build \
+   freedreno/meson.build \
+   intel/meson.build \
+   libkms/meson.build \
+   man/meson.build \
+   nouveau/meson.build \
+   omap/meson.build \
+   radeon/meson.build \
+   tests/amdgpu/meson.build \
+   tests/etnaviv/meson.build \
+   tests/exynos/meson.build \
+   tests/kms/meson.build \
+   tests/kmstest/meson.build \
+   tests/modeprint/meson.build \
+   tests/nouveau/meson.build \
+   tests/proptest/meson.build \
+   tests/radeon/meson.build \
+   tests/tegra/meson.build \
+   tests/util/meson.build \
+   tests/vbltest/meson.build \
+   tests/meson.build \
+   vc4/meson.build \
+   data/meson.build \
+   meson.build \
+   meson_options.txt
 
 copy-headers :
cp -r $(kernel_source)/include/uapi/drm/*.h $(top_srcdir)/include/drm/
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v4 0/3] Meson build system

2018-01-04 Thread Dylan Baker
This is a third iteration of the meson build system for libdrm. This
version is significantly cleaned up from the last version and uses a
style more like the build system in mesa.

It builds all of the drivers and tests, and the tests can be run via
`ninja test`.

It has support for being used as a wrapped dependency wit ext_foo
variables. This means it can be used to build a mesa that requires a
newer libdrm than the system provides (which can be especially useful if
you can't install packages on that system) and for testing.

This has been build tested and mesa has been compiled against it, but
not functional testing has been done.

Changes since v3:
  - Fix freedreno kgsl check
  - Fix kgls -> kgsl typo
  - standardize meson options to use only `-` and not `_`
  - fix typo radoen -> radeon
  - add help messages to options
  - fix typo in kms-universal-planes binary
  - build and install modetest (this was missed in the first version for
some reason)
  - install amdgpu.ids as 644 instead of 444

Dylan Baker (3):
  Add meson build system
  autotools: Include meson.build files in tarball
  README: Add note about meson

 .editorconfig   |   4 +-
 Makefile.am |  30 ++-
 README  |  21 +-
 amdgpu/.editorconfig|   5 +-
 amdgpu/meson.build  |  70 +++-
 data/meson.build|  27 +++-
 etnaviv/meson.build |  64 ++-
 exynos/meson.build  |  53 +-
 freedreno/meson.build   |  82 -
 intel/meson.build   | 111 +++-
 libkms/meson.build  |  75 +++-
 man/meson.build |  66 ++-
 meson.build | 376 +-
 meson_options.txt   | 143 ++-
 nouveau/meson.build |  65 ++-
 omap/meson.build|  53 +-
 radeon/meson.build  |  65 ++-
 tegra/meson.build   |  52 +-
 tests/amdgpu/meson.build|  40 -
 tests/etnaviv/meson.build   |  54 +-
 tests/exynos/meson.build|  54 +-
 tests/kms/meson.build   |  54 +-
 tests/kmstest/meson.build   |  28 +++-
 tests/meson.build   |  86 -
 tests/modeprint/meson.build |  29 +++-
 tests/modetest/meson.build  |  29 +++-
 tests/nouveau/meson.build   |  30 +++-
 tests/proptest/meson.build  |  30 +++-
 tests/radeon/meson.build|  27 +++-
 tests/tegra/meson.build |  27 +++-
 tests/util/meson.build  |  37 -
 tests/vbltest/meson.build   |  28 +++-
 vc4/meson.build |  28 +++-
 33 files changed, 1939 insertions(+), 4 deletions(-)
 create mode 100644 amdgpu/meson.build
 create mode 100644 data/meson.build
 create mode 100644 etnaviv/meson.build
 create mode 100644 exynos/meson.build
 create mode 100644 freedreno/meson.build
 create mode 100644 intel/meson.build
 create mode 100644 libkms/meson.build
 create mode 100644 man/meson.build
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 nouveau/meson.build
 create mode 100644 omap/meson.build
 create mode 100644 radeon/meson.build
 create mode 100644 tegra/meson.build
 create mode 100644 tests/amdgpu/meson.build
 create mode 100644 tests/etnaviv/meson.build
 create mode 100644 tests/exynos/meson.build
 create mode 100644 tests/kms/meson.build
 create mode 100644 tests/kmstest/meson.build
 create mode 100644 tests/meson.build
 create mode 100644 tests/modeprint/meson.build
 create mode 100644 tests/modetest/meson.build
 create mode 100644 tests/nouveau/meson.build
 create mode 100644 tests/proptest/meson.build
 create mode 100644 tests/radeon/meson.build
 create mode 100644 tests/tegra/meson.build
 create mode 100644 tests/util/meson.build
 create mode 100644 tests/vbltest/meson.build
 create mode 100644 vc4/meson.build

base-commit: 831036a6f62005da9fb4a75fe043bd96ce672d27
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v4 1/3] Add meson build system

2018-01-04 Thread Dylan Baker
This patch adds a complete meson build system, including tests and
install. It has the necessary hooks to allow it be used as a subproject
for other meson based builds such as mesa.

v4: - fix freedreno kgls check

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 .editorconfig   |   4 +-
 amdgpu/.editorconfig|   5 +-
 amdgpu/meson.build  |  70 +++-
 data/meson.build|  27 +++-
 etnaviv/meson.build |  64 ++-
 exynos/meson.build  |  53 +-
 freedreno/meson.build   |  82 -
 intel/meson.build   | 111 +++-
 libkms/meson.build  |  75 +++-
 man/meson.build |  66 ++-
 meson.build | 376 +-
 meson_options.txt   | 143 ++-
 nouveau/meson.build |  65 ++-
 omap/meson.build|  53 +-
 radeon/meson.build  |  65 ++-
 tegra/meson.build   |  52 +-
 tests/amdgpu/meson.build|  40 -
 tests/etnaviv/meson.build   |  54 +-
 tests/exynos/meson.build|  54 +-
 tests/kms/meson.build   |  54 +-
 tests/kmstest/meson.build   |  28 +++-
 tests/meson.build   |  86 -
 tests/modeprint/meson.build |  29 +++-
 tests/modetest/meson.build  |  29 +++-
 tests/nouveau/meson.build   |  30 +++-
 tests/proptest/meson.build  |  30 +++-
 tests/radeon/meson.build|  27 +++-
 tests/tegra/meson.build |  27 +++-
 tests/util/meson.build  |  37 -
 tests/vbltest/meson.build   |  28 +++-
 vc4/meson.build |  28 +++-
 31 files changed, 1892 insertions(+)
 create mode 100644 amdgpu/meson.build
 create mode 100644 data/meson.build
 create mode 100644 etnaviv/meson.build
 create mode 100644 exynos/meson.build
 create mode 100644 freedreno/meson.build
 create mode 100644 intel/meson.build
 create mode 100644 libkms/meson.build
 create mode 100644 man/meson.build
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 nouveau/meson.build
 create mode 100644 omap/meson.build
 create mode 100644 radeon/meson.build
 create mode 100644 tegra/meson.build
 create mode 100644 tests/amdgpu/meson.build
 create mode 100644 tests/etnaviv/meson.build
 create mode 100644 tests/exynos/meson.build
 create mode 100644 tests/kms/meson.build
 create mode 100644 tests/kmstest/meson.build
 create mode 100644 tests/meson.build
 create mode 100644 tests/modeprint/meson.build
 create mode 100644 tests/modetest/meson.build
 create mode 100644 tests/nouveau/meson.build
 create mode 100644 tests/proptest/meson.build
 create mode 100644 tests/radeon/meson.build
 create mode 100644 tests/tegra/meson.build
 create mode 100644 tests/util/meson.build
 create mode 100644 tests/vbltest/meson.build
 create mode 100644 vc4/meson.build

diff --git a/.editorconfig b/.editorconfig
index 893b7be..bbad3e6 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -17,3 +17,7 @@ indent_style = tab
 [*.m4]
 indent_style = space
 indent_size = 2
+
+[meson.build,meson_options.txt]
+indent_style = space
+indent_size = 2
diff --git a/amdgpu/.editorconfig b/amdgpu/.editorconfig
index 2528d67..0c758d6 100644
--- a/amdgpu/.editorconfig
+++ b/amdgpu/.editorconfig
@@ -7,3 +7,8 @@ indent_style = tab
 indent_size = 8
 tab_width = 8
 insert_final_newline = true
+
+[meson.build]
+indent_style = space
+indent_size = 2
+insert_final_newline = false
diff --git a/amdgpu/meson.build b/amdgpu/meson.build
new file mode 100644
index 000..13bf88b
--- /dev/null
+++ b/amdgpu/meson.build
@@ -0,0 +1,70 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_amdgpu = files(
+  'amdgpu_asic_id.c',
+  'amdgpu_bo.c',
+  'amdgpu_cs.c',
+  'amdgpu_device.c',
+  'amdgpu_gpu_info.c',
+  'amdgpu_internal.h',
+  'amdgpu_vamgr.c',
+  'amdgpu_vm.c',
+  'util_hash.c',
+  'util_hash.h',
+  'util_hash_table.c',
+  'util_hash_tab

[Mesa-dev] [PATCH 1/3] Add meson build system

2018-01-05 Thread Dylan Baker
This patch adds a complete meson build system, including tests and
install. It has the necessary hooks to allow it be used as a subproject
for other meson based builds such as mesa.

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.br...@gmail.com>
---
 .editorconfig   |   4 +-
 amdgpu/.editorconfig|   4 +-
 amdgpu/meson.build  |  65 +++-
 data/meson.build|  27 +++-
 etnaviv/meson.build |  59 ++-
 exynos/meson.build  |  53 +-
 freedreno/meson.build   |  76 -
 intel/meson.build   | 105 +++-
 libkms/meson.build  |  74 -
 man/meson.build |  67 +++-
 meson.build | 364 +-
 meson_options.txt   | 143 +++-
 nouveau/meson.build |  58 ++-
 omap/meson.build|  53 +-
 radeon/meson.build  |  63 ++-
 tegra/meson.build   |  52 +-
 tests/amdgpu/meson.build|  34 +++-
 tests/etnaviv/meson.build   |  45 +-
 tests/exynos/meson.build|  54 +-
 tests/kms/meson.build   |  49 +-
 tests/kmstest/meson.build   |  30 +++-
 tests/meson.build   |  86 +-
 tests/modeprint/meson.build |  29 +++-
 tests/modetest/meson.build  |  29 +++-
 tests/nouveau/meson.build   |  30 +++-
 tests/proptest/meson.build  |  28 +++-
 tests/radeon/meson.build|  27 +++-
 tests/tegra/meson.build |  27 +++-
 tests/util/meson.build  |  28 +++-
 tests/vbltest/meson.build   |  28 +++-
 vc4/meson.build |  28 +++-
 31 files changed, 1819 insertions(+)
 create mode 100644 amdgpu/meson.build
 create mode 100644 data/meson.build
 create mode 100644 etnaviv/meson.build
 create mode 100644 exynos/meson.build
 create mode 100644 freedreno/meson.build
 create mode 100644 intel/meson.build
 create mode 100644 libkms/meson.build
 create mode 100644 man/meson.build
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 nouveau/meson.build
 create mode 100644 omap/meson.build
 create mode 100644 radeon/meson.build
 create mode 100644 tegra/meson.build
 create mode 100644 tests/amdgpu/meson.build
 create mode 100644 tests/etnaviv/meson.build
 create mode 100644 tests/exynos/meson.build
 create mode 100644 tests/kms/meson.build
 create mode 100644 tests/kmstest/meson.build
 create mode 100644 tests/meson.build
 create mode 100644 tests/modeprint/meson.build
 create mode 100644 tests/modetest/meson.build
 create mode 100644 tests/nouveau/meson.build
 create mode 100644 tests/proptest/meson.build
 create mode 100644 tests/radeon/meson.build
 create mode 100644 tests/tegra/meson.build
 create mode 100644 tests/util/meson.build
 create mode 100644 tests/vbltest/meson.build
 create mode 100644 vc4/meson.build

diff --git a/.editorconfig b/.editorconfig
index 893b7be..29b4f39 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -17,3 +17,7 @@ indent_style = tab
 [*.m4]
 indent_style = space
 indent_size = 2
+
+[{meson.build,meson_options.txt}]
+indent_style = space
+indent_size = 2
diff --git a/amdgpu/.editorconfig b/amdgpu/.editorconfig
index 2528d67..426273f 100644
--- a/amdgpu/.editorconfig
+++ b/amdgpu/.editorconfig
@@ -7,3 +7,7 @@ indent_style = tab
 indent_size = 8
 tab_width = 8
 insert_final_newline = true
+
+[meson.build]
+indent_style = space
+indent_size = 2
diff --git a/amdgpu/meson.build b/amdgpu/meson.build
new file mode 100644
index 000..55ab9d1
--- /dev/null
+++ b/amdgpu/meson.build
@@ -0,0 +1,65 @@
+# Copyright © 2017-2018 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+
+datadir_amdgpu = join_paths(get_option('datadir'), 'libdrm', 'amdgpu.ids')
+
+libdrm_amdgpu = shared_library(
+  'drm_amdgpu',
+  [
+files(
+  'amdgpu_asic_id.c', 'amdgpu_bo.c', 'amdgpu_cs.c', 'amdgpu_device.c',
+  'amdgpu_gpu_info.c'

[Mesa-dev] [PATCH 2/3] autotools: Include meson.build files in tarball

2018-01-05 Thread Dylan Baker
Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 Makefile.am | 30 +-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 7b86214..66f70ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -135,7 +135,35 @@ if HAVE_VMWGFX
 klibdrminclude_HEADERS += $(LIBDRM_INCLUDE_VMWGFX_H_FILES)
 endif
 
-EXTRA_DIST = include/drm/README
+EXTRA_DIST = \
+   include/drm/README \
+   amdgpu/meson.build \
+   etnaviv/meson.build \
+   exynos/meson.build \
+   freedreno/meson.build \
+   intel/meson.build \
+   libkms/meson.build \
+   man/meson.build \
+   nouveau/meson.build \
+   omap/meson.build \
+   radeon/meson.build \
+   tests/amdgpu/meson.build \
+   tests/etnaviv/meson.build \
+   tests/exynos/meson.build \
+   tests/kms/meson.build \
+   tests/kmstest/meson.build \
+   tests/modeprint/meson.build \
+   tests/nouveau/meson.build \
+   tests/proptest/meson.build \
+   tests/radeon/meson.build \
+   tests/tegra/meson.build \
+   tests/util/meson.build \
+   tests/vbltest/meson.build \
+   tests/meson.build \
+   vc4/meson.build \
+   data/meson.build \
+   meson.build \
+   meson_options.txt
 
 copy-headers :
cp -r $(kernel_source)/include/uapi/drm/*.h $(top_srcdir)/include/drm/
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 3/3] README: Add note about meson

2018-01-05 Thread Dylan Baker
Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 README | 24 +---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 26cab9d..f3df9ac 100644
--- a/README
+++ b/README
@@ -15,9 +15,27 @@ with an older kernel.
 Compiling
 -
 
-libdrm  is  a  standard  autotools  package and  follows  the  normal
-configure, build  and install steps.   The first step is  to configure
-the package, which is done by running the configure shell script:
+libdrm has two build systems, a legacy autotools build system, and a newer
+meson build system. The meson build system is much faster, and offers a
+slightly different interface, but otherwise provides an equivalent feature set.
+
+To use it:
+
+meson builddir/
+
+By default this will install into /usr/local, you can change your prefix
+with --prefix=/usr (or `meson configure builddir/ -Dprefix=/usr` after 
+the initial meson setup).
+
+Then use ninja to build and install:
+
+ninja -C builddir/ install
+
+If you are installing into a system location you will need to run install
+separately, and as root.
+
+
+Alternatively you can invoke autotools configure:
 
./configure
 
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 14/14] meson: glsl: add missing nir header dependency

2018-01-05 Thread Dylan Baker
Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Quoting Greg V (2017-12-31 08:55:28)
> ---
>  src/compiler/glsl/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
> index 6aaa9bab05..9e7589c325 100644
> --- a/src/compiler/glsl/meson.build
> +++ b/src/compiler/glsl/meson.build
> @@ -200,7 +200,7 @@ files_libglsl_standalone = files(
>  libglsl = static_library(
>'glsl',
>[files_libglsl, glsl_parser, glsl_lexer_cpp, ir_expression_operation_h,
> -   ir_expression_operation_strings_h, ir_expression_operation_constant_h],
> +   ir_expression_operation_strings_h, ir_expression_operation_constant_h, 
> nir_opcodes_h],
>c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
>cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
>link_with : [libnir, libglcpp],
> -- 
> 2.15.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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


Re: [Mesa-dev] [PATCH 11/14] meson: fix missing dependencies

2018-01-05 Thread Dylan Baker
Quoting Greg V (2017-12-31 08:55:25)
> ---
>  src/gallium/drivers/radeonsi/meson.build | 2 +-
>  src/mesa/meson.build | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/meson.build 
> b/src/gallium/drivers/radeonsi/meson.build
> index 58132bf072..8a7045de0d 100644
> --- a/src/gallium/drivers/radeonsi/meson.build
> +++ b/src/gallium/drivers/radeonsi/meson.build
> @@ -77,7 +77,7 @@ libradeonsi = static_library(
>],
>c_args : [c_vis_args],
>cpp_args : [cpp_vis_args],
> -  dependencies : dep_llvm,
> +  dependencies : [dep_llvm, dep_libdrm],
>  )

I believe this could be correct, but I don't see this in autotools or scons,
what is the error you're seeing?

>  
>  driver_radeonsi = declare_dependency(
> diff --git a/src/mesa/meson.build b/src/mesa/meson.build
> index ab6bc27312..74b8d97231 100644
> --- a/src/mesa/meson.build
> +++ b/src/mesa/meson.build
> @@ -721,6 +721,7 @@ libmesa_gallium = static_library(
>cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
>include_directories : [inc_common, include_directories('main')],
>link_with : [libglsl, libmesa_sse41],
> +  dependencies : [dep_vdpau],
>build_by_default : false,
>  )

This is wrong, there is no way that core mesa needs to link against vdpau, what
error are you fixing?

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


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


Re: [Mesa-dev] [PATCH v3 3/4] meson: build clover

2018-01-05 Thread Dylan Baker
Quoting Jan Vesely (2018-01-05 14:16:41)
> Hi,
> 
> 
> sorry for the delay. I was mostly traveling during the holidays.

No worries, I was also away over the holidays and didn't look at this until
today.

> 
> On Fri, 2017-12-15 at 10:54 -0800, Dylan Baker wrote:
> > This has only been compile tested.
> > 
> > v2: - Have a single option for opencl (Eric E)
> > - fix typo "tgis" -> "tgsi" (Curro)
> > - Don't add "lib" to pipe loader libraries, which matches the
> >   autotools behavior
> > v3: - Remove trailing whitespace
> > - Make PIPE_SEARCH_DIR an absolute path
> > 
> > cc: Curro Jerez <curroje...@riseup.net>
> > cc: Jan Vesely <jan.ves...@rutgers.edu>
> > cc: Aaron Watry <awa...@gmail.com>
> > Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
> > ---
> >  include/meson.build   |  19 
> >  meson.build   |  29 +-
> >  meson_options.txt |   7 ++
> >  src/gallium/auxiliary/pipe-loader/meson.build |   3 +-
> >  src/gallium/meson.build   |  12 ++-
> >  src/gallium/state_trackers/clover/meson.build | 122 
> > ++
> >  src/gallium/targets/opencl/meson.build|  73 +++
> >  src/gallium/targets/pipe-loader/meson.build   |  77 
> >  8 files changed, 336 insertions(+), 6 deletions(-)
> >  create mode 100644 src/gallium/state_trackers/clover/meson.build
> >  create mode 100644 src/gallium/targets/opencl/meson.build
> >  create mode 100644 src/gallium/targets/pipe-loader/meson.build
> > 
> > diff --git a/include/meson.build b/include/meson.build
> > index e4dae91cede..a2e7ce6580e 100644
> > --- a/include/meson.build
> > +++ b/include/meson.build
> > @@ -78,3 +78,22 @@ if with_gallium_st_nine
> >  subdir : 'd3dadapter',
> >)
> >  endif
> > +
> > +# Only install the headers if we are building a stand alone implementation 
> > and
> > +# not an ICD enabled implementation
> > +if with_gallium_opencl and not with_opencl_icd
> > +  install_headers(
> > +'CL/cl.h',
> > +'CL/cl.hpp',
> > +'CL/cl_d3d10.h',
> > +'CL/cl_d3d11.h',
> > +'CL/cl_dx9_media_sharing.h',
> > +'CL/cl_egl.h',
> > +'CL/cl_ext.h',
> > +'CL/cl_gl.h',
> > +'CL/cl_gl_ext.h',
> > +'CL/cl_platform.h',
> > +'CL/opencl.h',
> > +subdir: 'CL'
> > +  )
> > +endif
> > diff --git a/meson.build b/meson.build
> > index 842d441199e..74b2d5c49dc 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -583,6 +583,22 @@ if with_gallium_st_nine
> >endif
> >  endif
> >  
> > +_opencl = get_option('gallium-opencl')
> > +if _opencl !=' disabled'
> > +  if not with_gallium
> > +error('OpenCL Clover implementation requires at least one gallium 
> > driver.')
> > +  endif
> > +
> > +  # TODO: alitvec?
> > +  dep_clc = dependency('libclc')
> > +  with_gallium_opencl = true
> > +  with_opencl_icd = _opencl == 'icd'
> > +else
> > +  dep_clc = []
> > +  with_gallium_opencl = false
> > +  with_gallium_icd = false
> > +endif
> > +
> >  gl_pkgconfig_c_flags = []
> >  if with_platform_x11
> >if with_any_vk or (with_glx == 'dri' and with_dri_platform == 'drm')
> > @@ -930,7 +946,7 @@ dep_thread = dependency('threads')
> >  if dep_thread.found() and host_machine.system() != 'windows'
> >pre_args += '-DHAVE_PTHREAD'
> >  endif
> > -if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 # TODO: clover
> > +if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 or 
> > with_gallium_opencl
> >dep_elf = dependency('libelf', required : false)
> >if not dep_elf.found()
> >  dep_elf = cc.find_library('elf')
> > @@ -972,12 +988,19 @@ if with_amd_vk or with_gallium_radeonsi or 
> > with_gallium_r600
> >  llvm_modules += 'asmparser'
> >endif
> >  endif
> > +if with_gallium_opencl
> > +  llvm_modules += [
> > +'all-targets', 'linker', 'coverage', 'instrumentation', 'ipo', 
> > 'irreader',
> > +'lto', 'option', 'objcarcopts', 'profiledata',
> > +  ]
> > +  # TODO: optional modules
> > +endif
> >  
> >  _llvm = get_option('llvm')
> >  if _llvm == 'auto'
> >dep_llvm = dependency(
> >  'llvm', version : '>= 3.9.0', modules : llvm_modules,
> > -  

[Mesa-dev] [PATCH 0/3] Meson build system

2018-01-05 Thread Dylan Baker
This is a fifth iteration of the meson build system for libdrm. This
version is significantly cleaned up from the last version and uses a
style more like the build system in mesa.

It builds all of the drivers and tests, and the tests can be run via
`ninja test`.

It has support for being used as a wrapped dependency with ext_foo
variables (I have a branch of mesa that will build this code as a wrap,
which has also been useful for testing). This means it can be used to
build a mesa that requires a newer libdrm than the system provides
(which can be especially useful if you can't install packages on that
system), or to build libdrm support that your distro doesn't ship (like
arm only drivers on x86), cross compiling, and for testing.

This has been build tested and mesa has been compiled against it, but
only minimal functional testing has been done, since I only have i965
machines, and i965 only uses libdrm lightly.

Some reviewers of the previous versions have done some additional
testing.

Changes since v3:
  - Fix freedreno kgsl check
  - Fix kgls -> kgsl typo
  - standardize meson options to use only `-` and not `_`
  - fix typo radoen -> radeon
  - add help messages to options
  - fix typo in kms-universal-planes binary
  - build and install modetest (this was missed in the first version for
some reason)
  - install amdgpu.ids as 644 instead of 444

Changes since v4:
  - Fix minor nits in options descriptions (Igor)
  - Fix editorconfig settings
  - Fix amdgpu.ids searh path
  - Style nits for Eric E.
  - Remove more tabs
  - Ensure that 1/0 defines are always defined, instead of only when
their value is 1
  - Don't add header files into file lists. (Meson figures out header
dependencies automatically using graphs that the compiler generates
during compilation)
  - Don't assign file lists to variables when possible. In a few cases
files need to be conditionally added, but if we're not in one of
those cases just put the lists directly in the exectuable or library
declaration.

Dylan Baker (3):
  Add meson build system
  autotools: Include meson.build files in tarball
  README: Add note about meson

 .editorconfig   |   4 +-
 Makefile.am |  30 ++-
 README  |  24 +-
 amdgpu/.editorconfig|   4 +-
 amdgpu/meson.build  |  65 +++-
 data/meson.build|  27 +++-
 etnaviv/meson.build |  59 ++-
 exynos/meson.build  |  53 +-
 freedreno/meson.build   |  76 -
 intel/meson.build   | 105 +++-
 libkms/meson.build  |  74 -
 man/meson.build |  67 +++-
 meson.build | 364 +-
 meson_options.txt   | 143 +++-
 nouveau/meson.build |  58 ++-
 omap/meson.build|  53 +-
 radeon/meson.build  |  63 ++-
 tegra/meson.build   |  52 +-
 tests/amdgpu/meson.build|  34 +++-
 tests/etnaviv/meson.build   |  45 +-
 tests/exynos/meson.build|  54 +-
 tests/kms/meson.build   |  49 +-
 tests/kmstest/meson.build   |  30 +++-
 tests/meson.build   |  86 +-
 tests/modeprint/meson.build |  29 +++-
 tests/modetest/meson.build  |  29 +++-
 tests/nouveau/meson.build   |  30 +++-
 tests/proptest/meson.build  |  28 +++-
 tests/radeon/meson.build|  27 +++-
 tests/tegra/meson.build |  27 +++-
 tests/util/meson.build  |  28 +++-
 tests/vbltest/meson.build   |  28 +++-
 vc4/meson.build |  28 +++-
 33 files changed, 1869 insertions(+), 4 deletions(-)
 create mode 100644 amdgpu/meson.build
 create mode 100644 data/meson.build
 create mode 100644 etnaviv/meson.build
 create mode 100644 exynos/meson.build
 create mode 100644 freedreno/meson.build
 create mode 100644 intel/meson.build
 create mode 100644 libkms/meson.build
 create mode 100644 man/meson.build
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 nouveau/meson.build
 create mode 100644 omap/meson.build
 create mode 100644 radeon/meson.build
 create mode 100644 tegra/meson.build
 create mode 100644 tests/amdgpu/meson.build
 create mode 100644 tests/etnaviv/meson.build
 create mode 100644 tests/exynos/meson.build
 create mode 100644 tests/kms/meson.build
 create mode 100644 tests/kmstest/meson.build
 create mode 100644 tests/meson.build
 create mode 100644 tests/modeprint/meson.build
 create mode 100644 tests/modetest/meson.build
 create mode 100644 tests/nouveau/meson.build
 create mode 100644 tests/proptest/meson.build
 create mode 100644 tests/radeon/meson.build
 create mode 100644 tests/tegra/meson.build
 create mode 100644 tests/util/meson.build
 create mode 100644 tests/vbltest/meson.build
 create mode 100644 vc4/meson.build

base-commit: 831036a6f62005da9fb4a75fe043bd96ce672d27
-- 
git-series 0.9.1
___
mesa-dev mailing list
me

Re: [Mesa-dev] [PATCH 1/3] Add meson build system

2018-01-05 Thread Dylan Baker
Quoting Eric Engestrom (2018-01-05 05:34:53)
> On Wednesday, 2018-01-03 13:31:28 -0800, Dylan Baker wrote:
> > This patch adds a complete meson build system, including tests and
> > install. It has the necessary hooks to allow it be used as a subproject
> > for other meson based builds such as mesa.
> > 
> > Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
> > ---
> >  .editorconfig   |   4 +-
> >  amdgpu/.editorconfig|   5 +-
> >  amdgpu/meson.build  |  70 +++-
> >  data/meson.build|  27 +++-
> >  etnaviv/meson.build |  64 ++-
> >  exynos/meson.build  |  53 +-
> >  freedreno/meson.build   |  82 -
> >  intel/meson.build   | 111 +++-
> >  libkms/meson.build  |  75 +++-
> >  man/meson.build |  66 ++-
> >  meson.build | 378 +-
> >  meson_options.txt   |  38 -
> >  nouveau/meson.build |  65 ++-
> >  omap/meson.build|  53 +-
> >  radeon/meson.build  |  65 ++-
> >  tegra/meson.build   |  52 +-
> >  tests/amdgpu/meson.build|  40 -
> >  tests/etnaviv/meson.build   |  54 +-
> >  tests/exynos/meson.build|  54 +-
> >  tests/kms/meson.build   |  54 +-
> >  tests/kmstest/meson.build   |  28 +++-
> >  tests/meson.build   |  85 -
> >  tests/modeprint/meson.build |  29 +++-
> >  tests/nouveau/meson.build   |  30 +++-
> >  tests/proptest/meson.build  |  30 +++-
> >  tests/radeon/meson.build|  27 +++-
> >  tests/tegra/meson.build |  27 +++-
> >  tests/util/meson.build  |  37 -
> >  tests/vbltest/meson.build   |  28 +++-
> >  vc4/meson.build |  28 +++-
> >  30 files changed, 1759 insertions(+)
> >  create mode 100644 amdgpu/meson.build
> >  create mode 100644 data/meson.build
> >  create mode 100644 etnaviv/meson.build
> >  create mode 100644 exynos/meson.build
> >  create mode 100644 freedreno/meson.build
> >  create mode 100644 intel/meson.build
> >  create mode 100644 libkms/meson.build
> >  create mode 100644 man/meson.build
> >  create mode 100644 meson.build
> >  create mode 100644 meson_options.txt
> >  create mode 100644 nouveau/meson.build
> >  create mode 100644 omap/meson.build
> >  create mode 100644 radeon/meson.build
> >  create mode 100644 tegra/meson.build
> >  create mode 100644 tests/amdgpu/meson.build
> >  create mode 100644 tests/etnaviv/meson.build
> >  create mode 100644 tests/exynos/meson.build
> >  create mode 100644 tests/kms/meson.build
> >  create mode 100644 tests/kmstest/meson.build
> >  create mode 100644 tests/meson.build
> >  create mode 100644 tests/modeprint/meson.build
> >  create mode 100644 tests/nouveau/meson.build
> >  create mode 100644 tests/proptest/meson.build
> >  create mode 100644 tests/radeon/meson.build
> >  create mode 100644 tests/tegra/meson.build
> >  create mode 100644 tests/util/meson.build
> >  create mode 100644 tests/vbltest/meson.build
> >  create mode 100644 vc4/meson.build
> > 
> > diff --git a/.editorconfig b/.editorconfig
> > index 893b7be..bbad3e6 100644
> > --- a/.editorconfig
> > +++ b/.editorconfig
> > @@ -17,3 +17,7 @@ indent_style = tab
> >  [*.m4]
> >  indent_style = space
> >  indent_size = 2
> > +
> > +[meson.build,meson_options.txt]
> 
> I think this needs to be
>   [{meson.build,meson_options.txt}]

You might be right.

> 
> > +indent_style = space
> > +indent_size = 2
> > diff --git a/amdgpu/.editorconfig b/amdgpu/.editorconfig
> > index 2528d67..0c758d6 100644
> > --- a/amdgpu/.editorconfig
> > +++ b/amdgpu/.editorconfig
> > @@ -7,3 +7,8 @@ indent_style = tab
> >  indent_size = 8
> >  tab_width = 8
> >  insert_final_newline = true
> > +
> > +[meson.build]
> > +indent_style = space
> > +indent_size = 2
> 
> These two should be inherited from the .editorconfig one level above

Nope, because the group right above this is [*], which overrides everything
above it.

> 
> > +insert_final_newline = false
> 
> That's weird; why?

I'll drop it

> 
> > diff --git a/amdgpu/meson.build b/amdgpu/meson.build
> > new file mode 100644
> > index 000..13bf88b
> > --- /dev/null
> > +++ b/amdgpu/meson.build
> > @@ -0,0 +1,70 @@
> > +# Copyright © 2017 Intel Corporation
> > +
> > +# Permission is hereby granted, fre

Re: [Mesa-dev] [PATCH 08/14] meson: fix BSD build

2018-01-05 Thread Dylan Baker
Quoting Greg V (2017-12-31 08:55:22)
> ---
>  meson.build | 43 ++-
>  1 file changed, 22 insertions(+), 21 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index d9f7ea9b2c..af62baf437 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -199,12 +199,13 @@ if with_dri_i915 or with_gallium_i915
>dep_libdrm_intel = dependency('libdrm_intel', version : '>= 2.4.75')
>  endif
>  
> +is_like_linux = host_machine.system() == 'linux' or 
> host_machine.system().contains('bsd') # FIXME: illumos?

This won't cover dragonflybsd, which is just 'dragonfly'

I think something like this would be better:
is_like_linux = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 
'linux'].contains(host_machine.system())

I'd like to know what illumos returns, but I can't get it to run in VM. If you
have access to an illumos machine, getting the result of:
`python3 -c "import platform; print(platform.system().lower())"` so we can add
that to meson's support os values.

As a nit, I'd prefer "system_is_linux_like" to just "is_like_linux" but I'm not
set on that like the first change.

I'd kinda like to add a meson.system_family() for covering these kind of cases,
but I'm not sure I'm going to get to it any time soon :)

Dylan


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


Re: [Mesa-dev] [PATCH 10/14] meson: handle LLVM 'x.x.xgit-revision' versions

2018-01-05 Thread Dylan Baker
Please add a comment that svn suffixes are stripped by meson as of 0.43, and git
suffixes are strippped as of 0.44. With that,

Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Quoting Greg V (2017-12-31 08:55:24)
> When LLVM is built inside of a git repo (even way below, e.g. /usr/ports/.git
> exists, and LLVM is built in /usr/ports/devel/llvm50/work), its version
> becomes something like 5.0.0git-f8ab206b2176.
> 
> Don't blow up on these versions.
> ---
>  meson.build | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index 23faad0a71..0e8e695965 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -994,9 +994,12 @@ if with_llvm
>_llvm_version = dep_llvm.version().split('.')
># Development versions of LLVM have an 'svn' suffix, we don't want that for
># our version checks.
> +  # Also LLVM can end up with a 'git-$revision' suffix if built inside a git 
> repo.
>_llvm_patch = _llvm_version[2]
>if _llvm_patch.endswith('svn')
>  _llvm_patch = _llvm_patch.split('s')[0]
> +  elif _llvm_patch.contains('git')
> +_llvm_patch = _llvm_patch.split('g')[0]
>endif
>pre_args += [
>  '-DHAVE_LLVM=0x0@0@@1@@2@'.format(_llvm_version[0], _llvm_version[1], 
> _llvm_patch),
> -- 
> 2.15.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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


Re: [Mesa-dev] [PATCH 10/14] meson: handle LLVM 'x.x.xgit-revision' versions

2018-01-05 Thread Dylan Baker
Quoting Juan A. Suarez Romero (2018-01-05 04:42:05)
> On Fri, 2018-01-05 at 10:35 +0100, Gert Wollny wrote:
> > On Sun, 2017-12-31 at 19:55 +0300, Greg V wrote:
> > > > When LLVM is built inside of a git repo (even way below, e.g. 
> > > > /usr/ports/.git
> > > > exists, and LLVM is built in /usr/ports/devel/llvm50/work), its version
> > > > becomes something like 5.0.0git-f8ab206b2176.
> > > > 
> > > > Don't blow up on these versions.
> > > > 
> > 
> > This has actually been addressed by meson upstream:
> > 
> >   https://github.com/mesonbuild/meson/pull/2787
> > 
> 
> In this case, probably we want to remove also the "svn" strip in
> meson.build, as this is also covered by meson upstream.
> 
> J.A.

Only for versions 0.43 (for svn) and 0.44 (for git). Since we currently support
versions down to 0.42 I think we need to have this for now.

> 
> > Best,
> > Gert
> > 
> > ___
> > 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


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


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-05 Thread Dylan Baker
Thanks so much for working on this, especially the meson bits!

Quoting Greg V (2017-12-31 08:55:14)
> Hello everyone and happy new year! :)
> 
> This set of patches makes the Meson build work on FreeBSD, including 
> RADV, ANV, wayland-egl, VAAPI, VDPAU.
> 
> I also managed to get SWR working, but I haven't included the CPU 
> topology detection code in here. CPU topology is exposed as XML on 
> FreeBSD, so my implementation uses TinyXML2, which is a new dependency.
> And I couldn't even figure out how to link to it with all the libtool
> stuff. Had to test it with LD_PRELOAD :D
> This will be much easier to do with Meson.
> 
> Greg V (14):
>   util: fix ElfW macro
>   vc4, vc5: add ETIME fallback define
>   radv: add ETIME fallback define
>   anv: add ETIME fallback define
>   anv: use POSIX sysconf to get memory info on non-glibc systems
>   anv: remove unused Linux-specific include
>   anv: FreeBSD support in the allocator
>   meson: fix BSD build
>   meson: do not redeclare pkg-config dependencies (yet)
>   meson: handle LLVM 'x.x.xgit-revision' versions
>   meson: fix missing dependencies
>   swr: build on FreeBSD/DragonFlyBSD
>   swr: fix clang 5 null cast warning
>   meson: glsl: add missing nir header dependency
> 
>  meson.build| 74 
> --
>  src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c  |  3 +
>  src/compiler/glsl/meson.build  |  2 +-
>  src/gallium/drivers/radeonsi/meson.build   |  2 +-
>  src/gallium/drivers/swr/rasterizer/common/os.h |  3 +-
>  .../drivers/swr/rasterizer/core/threads.cpp|  4 +-
>  .../swr/rasterizer/memory/TilingFunctions.h|  6 +-
>  src/gallium/drivers/swr/swr_fence.cpp  |  2 +
>  src/gallium/drivers/vc4/vc4_bufmgr.c   |  4 ++
>  src/gallium/drivers/vc5/vc5_bufmgr.c   |  4 ++
>  src/intel/vulkan/anv_allocator.c   | 56 
>  src/intel/vulkan/anv_device.c  | 11 
>  src/intel/vulkan/anv_gem.c |  4 ++
>  src/intel/vulkan/anv_queue.c   |  5 +-
>  src/mesa/meson.build   |  1 +
>  src/util/build_id.c|  6 +-
>  16 files changed, 144 insertions(+), 43 deletions(-)
> 
> -- 
> 2.15.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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


[Mesa-dev] [PATCH 4/8] meson: don't use intermediate variables that are immediately discarded

2018-01-05 Thread Dylan Baker
For things like:
loop
x = func()
list += x
end

just do:
loop
list += func()
end

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 src/broadcom/cle/meson.build  | 3 +--
 src/intel/genxml/meson.build  | 3 +--
 src/intel/isl/meson.build | 6 ++
 src/intel/vulkan/meson.build  | 6 ++
 src/mesa/drivers/dri/i965/meson.build | 3 +--
 5 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/broadcom/cle/meson.build b/src/broadcom/cle/meson.build
index 32510ce..1534fc9 100644
--- a/src/broadcom/cle/meson.build
+++ b/src/broadcom/cle/meson.build
@@ -39,14 +39,13 @@ v3d_xml_h = custom_target(
 v3d_xml_pack = []
 foreach f : v3d_xml_files
   _name = '@0@_pack.h'.format(f.split('.')[0])
-  _xml = custom_target(
+  v3d_xml_pack += custom_target(
 _name,
 input : ['gen_pack_header.py', f],
 output : _name,
 command : [prog_python2, '@INPUT@'],
 capture : true,
   )
-  v3d_xml_pack += _xml
 endforeach
 
 libbroadcom_cle = static_library(
diff --git a/src/intel/genxml/meson.build b/src/intel/genxml/meson.build
index 30c0d8b..371f853 100644
--- a/src/intel/genxml/meson.build
+++ b/src/intel/genxml/meson.build
@@ -48,12 +48,11 @@ genX_bits_h = custom_target(
 gen_xml_pack = []
 foreach f : gen_xml_files
   _name = '@0@_pack.h'.format(f.split('.')[0])
-  _xml = custom_target(
+  gen_xml_pack += custom_target(
 _name,
 input : ['gen_pack_header.py', f],
 output : _name,
 command : [prog_python2, '@INPUT@'],
 capture : true,
   )
-  gen_xml_pack += _xml
 endforeach
diff --git a/src/intel/isl/meson.build b/src/intel/isl/meson.build
index 116750d..0838c32 100644
--- a/src/intel/isl/meson.build
+++ b/src/intel/isl/meson.build
@@ -53,15 +53,13 @@ foreach g : [['40', isl_gen4_files], ['50', []], ['60', 
isl_gen6_files],
  ['70', isl_gen7_files], ['75', []], ['80', isl_gen8_files],
  ['90', isl_gen9_files], ['100', []]]
   _gen = g[0]
-  _sources = g[1]
-  _lib = static_library(
+  isl_gen_libs += static_library(
 'libisl_gen@0@'.format(_gen),
-[_sources, isl_gen_files, gen_xml_pack],
+[g[1], isl_gen_files, gen_xml_pack],
 include_directories : [inc_common, inc_intel],
 c_args : [c_vis_args, no_override_init_args,
   '-DGEN_VERSIONx10=@0@'.format(_gen)],
   )
-  isl_gen_libs += _lib
 endforeach
 
 isl_format_layout_c = custom_target(
diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build
index 66266a0..4cd7a02 100644
--- a/src/intel/vulkan/meson.build
+++ b/src/intel/vulkan/meson.build
@@ -89,10 +89,9 @@ foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', 
['gen7_cmd_buffer.c']],
  ['80', ['gen8_cmd_buffer.c']], ['90', ['gen8_cmd_buffer.c']],
  ['100', ['gen8_cmd_buffer.c']]]
   _gen = g[0]
-  _files = g[1]
-  _lib = static_library(
+  libanv_gen_libs += static_library(
 'libanv_gen@0@'.format(_gen),
-[anv_gen_files, _files, block_entrypoints],
+[anv_gen_files, g[1], block_entrypoints],
 include_directories : [
   inc_common, inc_compiler, inc_drm_uapi, inc_intel, inc_vulkan_util,
   inc_vulkan_wsi,
@@ -103,7 +102,6 @@ foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', 
['gen7_cmd_buffer.c']],
 ],
 dependencies : [dep_libdrm, dep_valgrind],
   )
-  libanv_gen_libs += _lib
 endforeach
 
 libanv_files = files(
diff --git a/src/mesa/drivers/dri/i965/meson.build 
b/src/mesa/drivers/dri/i965/meson.build
index e3bf9cc..1183978 100644
--- a/src/mesa/drivers/dri/i965/meson.build
+++ b/src/mesa/drivers/dri/i965/meson.build
@@ -136,7 +136,7 @@ files_i965 = files(
 
 i965_gen_libs = []
 foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100']
-  _lib = static_library(
+  i965_gen_libs += static_library(
 'libi965_gen@0@'.format(v),
 ['genX_blorp_exec.c', 'genX_state_upload.c', nir_opcodes_h, gen_xml_pack],
 include_directories : [inc_common, inc_intel, inc_dri_common],
@@ -146,7 +146,6 @@ foreach v : ['40', '45', '50', '60', '70', '75', '80', 
'90', '100']
 ],
 dependencies : [dep_libdrm],
   )
-  i965_gen_libs += _lib
 endforeach
 
 oa_generator = generator(
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 8/8] meson: add variable for including include/GL/internal

2018-01-05 Thread Dylan Baker
Signed-off-by: 
---
 include/meson.build   |  1 +
 src/glx/meson.build   | 10 ++
 src/glx/tests/meson.build |  4 ++--
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/include/meson.build b/include/meson.build
index e4dae91..9b34490 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -21,6 +21,7 @@
 inc_drm_uapi = include_directories('drm-uapi')
 inc_vulkan = include_directories('vulkan')
 inc_d3d9 = include_directories('D3D9')
+inc_gl_internal = include_directories('GL/internal')
 
 if with_gles1
   install_headers(
diff --git a/src/glx/meson.build b/src/glx/meson.build
index 7757eee..04cd647 100644
--- a/src/glx/meson.build
+++ b/src/glx/meson.build
@@ -138,10 +138,7 @@ endif
 libglx = static_library(
   'glx',
   [files_libglx, glx_generated],
-  include_directories : [
-inc_common, inc_glapi, inc_loader,
-include_directories('../../include/GL/internal'),
-  ],
+  include_directories : [inc_common, inc_glapi, inc_loader, inc_gl_internal],
   c_args : [
 c_vis_args, gl_lib_cargs,
 '-DGL_LIB_NAME="lib@0@.so.@1@"'.format(gl_lib_name, 
gl_lib_version.split('.')[0]),
@@ -165,10 +162,7 @@ if with_glx == 'dri'
   libgl = shared_library(
 gl_lib_name,
 dummy_c,  # workaround for bug #2180
-include_directories : [
-  inc_common, inc_glapi, inc_loader,
-  include_directories('../../include/GL/internal'),
-],
+include_directories : [inc_common, inc_glapi, inc_loader, inc_gl_internal],
 link_with : [libglapi_static, libglapi],
 link_whole : libglx,
 link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],
diff --git a/src/glx/tests/meson.build b/src/glx/tests/meson.build
index fe0075a..fd9d4d4 100644
--- a/src/glx/tests/meson.build
+++ b/src/glx/tests/meson.build
@@ -40,8 +40,8 @@ if with_shared_glapi
   [files_glx_test, glx_indirect_size_h, main_dispatch_h],
   link_with : [libglx, libglapi],
   include_directories : [
-include_directories('..', '../../../include/GL/internal'),
-inc_src, inc_include, inc_mesa, inc_mapi,
+inc_src, inc_include, inc_mesa, inc_mapi, inc_gl_internal,
+include_directories('..'),
   ],
   dependencies : [dep_libdrm, dep_thread, idep_gtest]
 )
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 6/8] meson: move libsensors dependency to libgallium

2018-01-05 Thread Dylan Baker
This simplifies the build by removing the need to link targets against
libsensors.

Suggested-by: Emil Velikov <emil.veli...@collabora.com>
Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 src/gallium/auxiliary/meson.build   | 2 +-
 src/gallium/drivers/etnaviv/meson.build | 2 +-
 src/gallium/drivers/freedreno/meson.build   | 1 -
 src/gallium/drivers/nouveau/meson.build | 2 +-
 src/gallium/drivers/r300/meson.build| 4 +---
 src/gallium/targets/d3dadapter9/meson.build | 2 +-
 src/gallium/targets/dri/meson.build | 2 +-
 src/gallium/targets/libgl-xlib/meson.build  | 4 +---
 8 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/gallium/auxiliary/meson.build 
b/src/gallium/auxiliary/meson.build
index acef71b..6f1542d 100644
--- a/src/gallium/auxiliary/meson.build
+++ b/src/gallium/auxiliary/meson.build
@@ -497,7 +497,7 @@ libgallium = static_library(
   c_args : [c_vis_args, c_msvc_compat_args],
   cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
   dependencies : [
-dep_libdrm, dep_llvm, dep_unwind, dep_dl, dep_m, dep_thread,
+dep_libdrm, dep_llvm, dep_unwind, dep_dl, dep_m, dep_thread, dep_lmsensors,
 idep_nir_headers,
   ],
   build_by_default : false,
diff --git a/src/gallium/drivers/etnaviv/meson.build 
b/src/gallium/drivers/etnaviv/meson.build
index 0c7dbe2..2d091fb 100644
--- a/src/gallium/drivers/etnaviv/meson.build
+++ b/src/gallium/drivers/etnaviv/meson.build
@@ -97,7 +97,7 @@ etnaviv_compiler = executable(
   'etnaviv_compiler_cmdline.c',
   include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux],
   link_with : [libmesa_util, libgallium, libetnaviv],
-  dependencies : [dep_libdrm_etnaviv, dep_lmsensors],
+  dependencies : [dep_libdrm_etnaviv],
   build_by_default : false,
 )
 
diff --git a/src/gallium/drivers/freedreno/meson.build 
b/src/gallium/drivers/freedreno/meson.build
index 23c85cf..33a64d7 100644
--- a/src/gallium/drivers/freedreno/meson.build
+++ b/src/gallium/drivers/freedreno/meson.build
@@ -239,7 +239,6 @@ ir3_compiler = executable(
 dep_libdrm,
 dep_libdrm_freedreno,
 dep_thread,
-dep_lmsensors,
 idep_nir,
   ],
   link_with : [
diff --git a/src/gallium/drivers/nouveau/meson.build 
b/src/gallium/drivers/nouveau/meson.build
index 5d679e1..8ddd865 100644
--- a/src/gallium/drivers/nouveau/meson.build
+++ b/src/gallium/drivers/nouveau/meson.build
@@ -217,7 +217,7 @@ nouveau_compiler = executable(
   'nouveau_compiler',
   'nouveau_compiler.c',
   include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux],
-  dependencies : [dep_libdrm, dep_libdrm_nouveau, dep_lmsensors],
+  dependencies : [dep_libdrm, dep_libdrm_nouveau],
   link_with : [libnouveau, libgallium, libmesa_util],
   build_by_default : false,
 )
diff --git a/src/gallium/drivers/r300/meson.build 
b/src/gallium/drivers/r300/meson.build
index 698e460..d181048 100644
--- a/src/gallium/drivers/r300/meson.build
+++ b/src/gallium/drivers/r300/meson.build
@@ -157,9 +157,7 @@ if with_tests
 include_directories('compiler'),
   ],
   link_with : [libr300, libgallium, libmesa_util],
-  dependencies : [
-dep_m, dep_clock, dep_dl, dep_thread, dep_unwind, dep_lmsensors,
-  ],
+  dependencies : [dep_m, dep_clock, dep_dl, dep_thread, dep_unwind],
 )
   )
 endif
diff --git a/src/gallium/targets/d3dadapter9/meson.build 
b/src/gallium/targets/d3dadapter9/meson.build
index a04177c..27a8797 100644
--- a/src/gallium/targets/d3dadapter9/meson.build
+++ b/src/gallium/targets/d3dadapter9/meson.build
@@ -64,7 +64,7 @@ libgallium_nine = shared_library(
 gallium_nine_link_with,
   ],
   dependencies : [
-dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_lmsensors,
+dep_selinux, dep_expat, dep_libdrm, dep_llvm,
 driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
 driver_i915, driver_svga,
   ],
diff --git a/src/gallium/targets/dri/meson.build 
b/src/gallium/targets/dri/meson.build
index 5ca7b01..42033a1 100644
--- a/src/gallium/targets/dri/meson.build
+++ b/src/gallium/targets/dri/meson.build
@@ -66,7 +66,7 @@ libgallium_dri = shared_library(
 libpipe_loader_static, libws_null, libwsw,  gallium_dri_link_with,
   ],
   dependencies : [
-dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_lmsensors, dep_thread,
+dep_selinux, dep_expat, dep_libdrm, dep_llvm, dep_thread,
 driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
 driver_pl111, driver_vc4, driver_vc5, driver_freedreno, driver_etnaviv,
 driver_imx, driver_i915, driver_svga, driver_virgl,
diff --git a/src/gallium/targets/libgl-xlib/meson.build 
b/src/gallium/targets/libgl-xlib/meson.build
index c413a25..c7587d3 100644
--- a/src/gallium/targets/libgl-xlib/meson.build
+++ b/src/gallium/targets/libgl-xlib/meson.build
@@ -54,9 +54,7 @@ libgl = shared_library(
 libxlib, libws_xlib, libtrace, librbug, libglapi_static,
 libgallium, 

[Mesa-dev] [PATCH 2/8] meson: Use include variables

2018-01-05 Thread Dylan Baker
These were added after adderlib was mesonified, but it still good to use
them instead of open coding them.

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 src/amd/addrlib/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/addrlib/meson.build b/src/amd/addrlib/meson.build
index 1d16ba8..a7e9dc8 100644
--- a/src/amd/addrlib/meson.build
+++ b/src/amd/addrlib/meson.build
@@ -56,8 +56,8 @@ libamdgpu_addrlib = static_library(
   include_directories : [
 include_directories(
   'core', 'inc/chip/gfx9', 'inc/chip/r800', 'gfx9/chip', 'r800/chip',
-  '../common', '../../',
 ),
+inc_amd_common, inc_src,
   ],
   cpp_args : cpp_vis_args,
 )
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 08/14] meson: fix BSD build

2018-01-05 Thread Dylan Baker


On January 5, 2018 5:12:15 PM PST, Greg V <greg@unrelenting.technology> wrote:
>
>On 01/06/2018 01:06, Dylan Baker wrote:
>> Quoting Greg V (2017-12-31 08:55:22)
>>> +is_like_linux = host_machine.system() == 'linux' or
>host_machine.system().contains('bsd') # FIXME: illumos?
>> This won't cover dragonflybsd, which is just 'dragonfly'
>>
>> I think something like this would be better:
>> is_like_linux = ['openbsd', 'netbsd', 'freebsd', 'dragonfly',
>'linux'].contains(host_machine.system())
>Yeah, looks good to me.
>> I'd like to know what illumos returns, but I can't get it to run in
>VM. If you
>> have access to an illumos machine, getting the result of:
>> `python3 -c "import platform; print(platform.system().lower())"` so
>we can add
>> that to meson's support os values.
>I don't have a machine set up yet, but it's probably "sunos".
>There was some discussion in Meson about converting that to "solaris": 
>https://github.com/mesonbuild/meson/issues/1578

I'll follow up in that bug for Solaris, so let's just leave the Todo for now.

>> As a nit, I'd prefer "system_is_linux_like" to just "is_like_linux"
>but I'm not
>> set on that like the first change.
>This can be bikeshedded for a long long time :) Maybe something like 
>"system_has_kms_drm"?

I like that, it's more accurate.

With those changes you can put my rb on this.

Also, if you're interested I have a pull request again meson itself to fix a 
bunch of BSD related issues.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 3/8] meson: Use consistent style for tests

2018-01-05 Thread Dylan Baker
Don't use intermediate variables, use consistent whitespace.

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 src/broadcom/qpu/meson.build| 12 ++-
 src/compiler/glsl/tests/meson.build | 90 --
 src/compiler/nir/meson.build| 19 ++---
 src/egl/wayland/wayland-egl/meson.build |  5 +-
 src/gallium/drivers/llvmpipe/meson.build|  4 +-
 src/gallium/drivers/r300/meson.build|  4 +-
 src/gallium/state_trackers/xvmc/meson.build |  8 +-
 src/gbm/meson.build |  3 +-
 src/glx/tests/meson.build   | 22 ++---
 src/intel/compiler/meson.build  | 19 ++---
 src/intel/isl/meson.build   | 17 ++--
 src/intel/vulkan/meson.build| 23 +++---
 src/mapi/es1api/meson.build |  3 +-
 src/mapi/es2api/meson.build |  3 +-
 src/mapi/glapi/meson.build  | 13 +--
 src/mapi/shared-glapi/meson.build   | 19 ++---
 src/mesa/main/tests/meson.build |  4 +-
 src/util/meson.build| 49 ++--
 src/util/tests/hash_table/meson.build   | 16 ++--
 src/util/tests/string_buffer/meson.build| 17 ++--
 20 files changed, 199 insertions(+), 151 deletions(-)

diff --git a/src/broadcom/qpu/meson.build b/src/broadcom/qpu/meson.build
index 8178ddb..5521a80 100644
--- a/src/broadcom/qpu/meson.build
+++ b/src/broadcom/qpu/meson.build
@@ -33,7 +33,11 @@ libbroadcom_qpu = static_library(
   build_by_default : false,
 )
 
-test('qpu_disasm',
-  executable('qpu_disasm', 'tests/qpu_disasm.c',
-  link_with: [libbroadcom_qpu, libmesa_util],
-  include_directories: inc_common))
+test(
+  'qpu_disasm',
+  executable(
+'qpu_disasm', 'tests/qpu_disasm.c',
+link_with: [libbroadcom_qpu, libmesa_util],
+include_directories: inc_common
+  )
+)
diff --git a/src/compiler/glsl/tests/meson.build 
b/src/compiler/glsl/tests/meson.build
index 27f3407..146647a 100644
--- a/src/compiler/glsl/tests/meson.build
+++ b/src/compiler/glsl/tests/meson.build
@@ -18,59 +18,69 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-glsl_blob_test = executable(
+test(
   'blob_test',
-  'blob_test.c',
-  c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
-  include_directories : [inc_common, inc_compiler],
-  link_with : [libglsl],
+  executable(
+'blob_test',
+'blob_test.c',
+c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
+include_directories : [inc_common, inc_compiler],
+link_with : [libglsl],
+  )
 )
 
-glsl_cache_test = executable(
+test(
   'cache_test',
-  'cache_test.c',
-  c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
-  include_directories : [inc_common, inc_glsl],
-  link_with : [libglsl],
-  dependencies : [dep_clock, dep_thread],
+  executable(
+'cache_test',
+'cache_test.c',
+c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
+include_directories : [inc_common, inc_glsl],
+link_with : [libglsl],
+dependencies : [dep_clock, dep_thread],
+  )
 )
 
-glsl_general_ir_test = executable(
+
+test(
   'general_ir_test',
-  ['array_refcount_test.cpp', 'builtin_variable_test.cpp',
-   'invalidate_locations_test.cpp', 'general_ir_test.cpp',
-   'lower_int64_test.cpp', 'opt_add_neg_to_sub_test.cpp', 'varyings_test.cpp',
-   ir_expression_operation_h],
-  cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
-  include_directories : [inc_common, inc_glsl],
-  link_with : [libglsl, libglsl_standalone, libglsl_util],
-  dependencies : [dep_clock, dep_thread, idep_gtest],
+  executable(
+'general_ir_test',
+['array_refcount_test.cpp', 'builtin_variable_test.cpp',
+ 'invalidate_locations_test.cpp', 'general_ir_test.cpp',
+ 'lower_int64_test.cpp', 'opt_add_neg_to_sub_test.cpp',
+ 'varyings_test.cpp', ir_expression_operation_h],
+cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
+include_directories : [inc_common, inc_glsl],
+link_with : [libglsl, libglsl_standalone, libglsl_util],
+dependencies : [dep_clock, dep_thread, idep_gtest],
+  )
 )
 
-glsl_uniform_initializer_test = executable(
+test(
   'uniform_initializer_test',
-  ['copy_constant_to_storage_tests.cpp', 'set_uniform_initializer_tests.cpp',
-   'uniform_initializer_utils.cpp', 'uniform_initializer_utils.h',
-   ir_expression_operation_h],
-  cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
-  include_directories : [inc_common, inc_glsl],
-  link_with : [libglsl, libglsl_util],
-  dependencies : [dep_thread, idep_gtest],
+  executable(
+'uniform_initializer_test',
+['copy_constant_to_storage_tests.cpp', 'set_uniform_initializer_tests.cpp',
+ 'uniform_initializer_utils.cpp', 'uniform_initializer_utils.h',
+ ir_expression_operation_h],
+cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
+include_directories : [inc_common, inc_glsl],
+link_with : [l

[Mesa-dev] [PATCH 7/8] meson: define inc_gbm as empty if not otherwise assigned

2018-01-05 Thread Dylan Baker
Otherwise this could be undefined in the egl directory.

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 src/meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/meson.build b/src/meson.build
index 5fc14ac..730b2ff 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -67,6 +67,8 @@ subdir('loader')
 subdir('glx')
 if with_gbm
   subdir('gbm')
+else
+  inc_gbm = []
 endif
 if with_egl
   subdir('egl')
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 0/8] Meson cleanups, style fixes, and race hardening

2018-01-05 Thread Dylan Baker
This series is a collection of style cleanups, maintainability fixes,
and suggestions from reviewers of previous patches.

Other than the style changes (which are mostly about using consistent
whitespace and removing temporary variables that are useless), this adds
a new internal dependency for nir and nir's generated headers. This
should make the code easier to maintain going forward.

Dylan Baker (8):
  meson: Use consistent style
  meson: Use include variables
  meson: Use consistent style for tests
  meson: don't use intermediate variables that are immediately discarded
  meson: Use dependencies for nir
  meson: move libsensors dependency to libgallium
  meson: define inc_gbm as empty if not otherwise assigned
  meson: add variable for including include/GL/internal

 include/meson.build |   1 +-
 src/amd/addrlib/meson.build |   9 +-
 src/amd/common/meson.build  |  13 +-
 src/amd/vulkan/meson.build  |  32 +++---
 src/broadcom/cle/meson.build|   3 +-
 src/broadcom/compiler/meson.build   |   4 +-
 src/broadcom/meson.build|   5 +-
 src/broadcom/qpu/meson.build|  12 +-
 src/compiler/glsl/glcpp/meson.build |   6 +-
 src/compiler/glsl/meson.build   |   9 +-
 src/compiler/glsl/tests/meson.build |  90 +
 src/compiler/meson.build|   4 +-
 src/compiler/nir/meson.build|  31 --
 src/egl/wayland/wayland-egl/meson.build |   5 +-
 src/gallium/auxiliary/meson.build   |   8 +-
 src/gallium/drivers/etnaviv/meson.build |   2 +-
 src/gallium/drivers/freedreno/meson.build   |  15 +--
 src/gallium/drivers/llvmpipe/meson.build|   4 +-
 src/gallium/drivers/nouveau/meson.build |   2 +-
 src/gallium/drivers/r300/meson.build|   8 +-
 src/gallium/drivers/radeonsi/meson.build|   6 +-
 src/gallium/drivers/vc4/meson.build |   7 +-
 src/gallium/drivers/vc5/meson.build |   7 +-
 src/gallium/state_trackers/xvmc/meson.build |   8 +-
 src/gallium/targets/d3dadapter9/meson.build |   2 +-
 src/gallium/targets/dri/meson.build |   2 +-
 src/gallium/targets/libgl-xlib/meson.build  |   4 +-
 src/gallium/targets/xa/meson.build  |   2 +-
 src/gbm/meson.build |   3 +-
 src/glx/meson.build |  15 +--
 src/glx/tests/meson.build   |  22 ++--
 src/intel/blorp/meson.build |   3 +-
 src/intel/compiler/meson.build  |  31 +++---
 src/intel/genxml/meson.build|   3 +-
 src/intel/isl/meson.build   |  23 +---
 src/intel/vulkan/meson.build| 111 -
 src/mapi/es1api/meson.build |   9 +-
 src/mapi/es2api/meson.build |   9 +-
 src/mapi/glapi/meson.build  |  13 +-
 src/mapi/shared-glapi/meson.build   |  25 ++---
 src/mesa/drivers/dri/i965/meson.build   |  34 +++---
 src/mesa/drivers/dri/meson.build|  11 +-
 src/mesa/main/tests/meson.build |   4 +-
 src/mesa/meson.build|   3 +-
 src/meson.build |  10 +-
 src/util/meson.build|  49 -
 src/util/tests/hash_table/meson.build   |  16 +--
 src/util/tests/string_buffer/meson.build|  17 +--
 src/vulkan/util/meson.build |   6 +-
 49 files changed, 418 insertions(+), 300 deletions(-)

base-commit: 87efa71001d9a597304a2e8d7d63aaf1fa519056
-- 
git-series 0.9.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 5/8] meson: Use dependencies for nir

2018-01-05 Thread Dylan Baker
This creates two new internal dependencies, idep_nir_headers and
idep_nir. The former encapsulates the generation of nir_opcodes.h and
nir_builder_opcodes.h and adding src/compiler/nir as an include path.
This ensures that any target that needs nir headers will have the
includes and that the generated headers will be generated before the
target is build. The second, idep_nir, includes the first and
additionally links to libnir.

This is intended to make it easier to avoid race conditions in the build
when using nir, since the number of consumers for libnir and it's
headers are quite high.

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 src/amd/common/meson.build|  5 +++--
 src/amd/vulkan/meson.build|  6 +++---
 src/broadcom/compiler/meson.build |  4 ++--
 src/compiler/glsl/meson.build |  3 ++-
 src/compiler/meson.build  |  4 ++--
 src/compiler/nir/meson.build  | 18 +++---
 src/gallium/auxiliary/meson.build |  8 +---
 src/gallium/drivers/freedreno/meson.build |  8 
 src/gallium/drivers/radeonsi/meson.build  |  6 +++---
 src/gallium/drivers/vc4/meson.build   |  7 ---
 src/gallium/drivers/vc5/meson.build   |  7 ---
 src/gallium/targets/xa/meson.build|  2 +-
 src/intel/blorp/meson.build   |  3 ++-
 src/intel/compiler/meson.build| 12 ++--
 src/intel/vulkan/meson.build  | 12 +++-
 src/mesa/drivers/dri/i965/meson.build | 10 +-
 src/mesa/drivers/dri/meson.build  |  4 ++--
 src/mesa/meson.build  |  3 ++-
 18 files changed, 72 insertions(+), 50 deletions(-)

diff --git a/src/amd/common/meson.build b/src/amd/common/meson.build
index 43a633a..22c13b9 100644
--- a/src/amd/common/meson.build
+++ b/src/amd/common/meson.build
@@ -52,12 +52,13 @@ amd_common_files = files(
 
 libamd_common = static_library(
   'amd_common',
-  [amd_common_files, sid_tables_h, nir_opcodes_h],
+  [amd_common_files, sid_tables_h],
   include_directories : [
-inc_common, inc_compiler, inc_nir, inc_mesa, inc_mapi, inc_amd,
+inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd,
   ],
   dependencies : [
 dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
+idep_nir_headers,
   ],
   c_args : [c_vis_args],
   cpp_args : [cpp_vis_args],
diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
index 054ee5e..74f6399 100644
--- a/src/amd/vulkan/meson.build
+++ b/src/amd/vulkan/meson.build
@@ -114,19 +114,19 @@ endif
 
 libvulkan_radeon = shared_library(
   'vulkan_radeon',
-  [libradv_files, radv_entrypoints, radv_extensions_c, nir_opcodes_h,
-   vk_format_table_c],
+  [libradv_files, radv_entrypoints, radv_extensions_c, vk_format_table_c],
   include_directories : [
 inc_common, inc_amd, inc_amd_common, inc_compiler, inc_vulkan_util,
 inc_vulkan_wsi,
   ],
   link_with : [
-libamd_common, libamdgpu_addrlib, libvulkan_util, libvulkan_wsi, libnir,
+libamd_common, libamdgpu_addrlib, libvulkan_util, libvulkan_wsi,
 libmesa_util,
   ],
   dependencies : [
 dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl, dep_m,
 dep_valgrind,
+idep_nir,
   ],
   c_args : [c_vis_args, no_override_init_args, radv_flags],
   link_args : [ld_args_bsymbolic, ld_args_gc_sections],
diff --git a/src/broadcom/compiler/meson.build 
b/src/broadcom/compiler/meson.build
index fd4d05f..8f2ee75 100644
--- a/src/broadcom/compiler/meson.build
+++ b/src/broadcom/compiler/meson.build
@@ -36,10 +36,10 @@ libbroadcom_compiler_files = files(
 )
 
 libbroadcom_compiler = static_library(
-  ['broadcom_compiler', v3d_xml_pack, nir_opcodes_h, nir_builder_opcodes_h],
+  ['broadcom_compiler', v3d_xml_pack],
   libbroadcom_compiler_files,
   include_directories : [inc_common, inc_broadcom],
   c_args : [c_vis_args, no_override_init_args],
-  dependencies : [dep_libdrm, dep_valgrind],
+  dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers],
   build_by_default : false,
 )
diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
index 2a6bddf..b0c0de8 100644
--- a/src/compiler/glsl/meson.build
+++ b/src/compiler/glsl/meson.build
@@ -205,8 +205,9 @@ libglsl = static_library(
ir_expression_operation_strings_h, ir_expression_operation_constant_h],
   c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
   cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
-  link_with : [libnir, libglcpp],
+  link_with : libglcpp,
   include_directories : [inc_common, inc_compiler, inc_nir],
+  dependencies : idep_nir,
   build_by_default : false,
 )
 
diff --git a/src/compiler/meson.build b/src/compiler/meson.build
index 783be11..d86bdde 100644
--- a/src/compiler/meson.build
+++ b/src/compiler/meson.build
@@ -58,9 +58,9 @@ subdir('nir')
 spirv2nir = executable(
   'spirv2nir',
   [files('spirv/spirv2nir.c'), dummy_cpp],
-  dependencies : [dep_m, dep_

[Mesa-dev] [PATCH 1/8] meson: Use consistent style

2018-01-05 Thread Dylan Baker
Currently the meosn build has a mix of two styles:
arg : [foo, ...
   bar],

and
arg :[
  foo, ...,
  bar,
]

For consistency let's pick one. I've picked the later style, which I
think is more readable, and is more common in the mesa code base.

Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 src/amd/addrlib/meson.build   |  9 ++-
 src/amd/common/meson.build| 10 +--
 src/amd/vulkan/meson.build| 32 +
 src/broadcom/meson.build  |  5 +-
 src/compiler/glsl/glcpp/meson.build   |  6 +-
 src/compiler/glsl/meson.build |  6 +-
 src/gallium/drivers/freedreno/meson.build |  6 +-
 src/glx/meson.build   |  5 +-
 src/intel/compiler/meson.build|  6 +-
 src/intel/vulkan/meson.build  | 82 +++-
 src/mapi/es1api/meson.build   |  6 +-
 src/mapi/es2api/meson.build   |  6 +-
 src/mapi/shared-glapi/meson.build |  6 +-
 src/mesa/drivers/dri/i965/meson.build | 23 ---
 src/mesa/drivers/dri/meson.build  | 11 +--
 src/meson.build   |  8 +-
 src/vulkan/util/meson.build   |  6 +-
 17 files changed, 148 insertions(+), 85 deletions(-)

diff --git a/src/amd/addrlib/meson.build b/src/amd/addrlib/meson.build
index ed0dde6..1d16ba8 100644
--- a/src/amd/addrlib/meson.build
+++ b/src/amd/addrlib/meson.build
@@ -53,8 +53,11 @@ files_addrlib = files(
 libamdgpu_addrlib = static_library(
   'addrlib',
   files_addrlib,
-  include_directories : include_directories(
-'core', 'inc/chip/gfx9', 'inc/chip/r800', 'gfx9/chip', 'r800/chip',
-'../common', '../../'),
+  include_directories : [
+include_directories(
+  'core', 'inc/chip/gfx9', 'inc/chip/r800', 'gfx9/chip', 'r800/chip',
+  '../common', '../../',
+),
+  ],
   cpp_args : cpp_vis_args,
 )
diff --git a/src/amd/common/meson.build b/src/amd/common/meson.build
index 63c1517..43a633a 100644
--- a/src/amd/common/meson.build
+++ b/src/amd/common/meson.build
@@ -53,10 +53,12 @@ amd_common_files = files(
 libamd_common = static_library(
   'amd_common',
   [amd_common_files, sid_tables_h, nir_opcodes_h],
-  include_directories : [inc_common, inc_compiler, inc_nir, inc_mesa, inc_mapi,
- inc_amd],
-  dependencies : [dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu,
-  dep_valgrind],
+  include_directories : [
+inc_common, inc_compiler, inc_nir, inc_mesa, inc_mapi, inc_amd,
+  ],
+  dependencies : [
+dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
+  ],
   c_args : [c_vis_args],
   cpp_args : [cpp_vis_args],
 )
diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
index 9399735..054ee5e 100644
--- a/src/amd/vulkan/meson.build
+++ b/src/amd/vulkan/meson.build
@@ -22,8 +22,10 @@ radv_entrypoints = custom_target(
   'radv_entrypoints.[ch]',
   input : ['radv_entrypoints_gen.py', vk_api_xml],
   output : ['radv_entrypoints.h', 'radv_entrypoints.c'],
-  command : [prog_python2, '@INPUT0@', '--xml', '@INPUT1@',
- '--outdir', meson.current_build_dir()],
+  command : [
+prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
+meson.current_build_dir()
+  ],
   depend_files : files('radv_extensions.py'),
 )
 
@@ -31,8 +33,9 @@ radv_extensions_c = custom_target(
   'radv_extensions.c',
   input : ['radv_extensions.py', vk_api_xml],
   output : ['radv_extensions.c'],
-  command : [prog_python2, '@INPUT0@', '--xml', '@INPUT1@',
- '--out', '@OUTPUT@'],
+  command : [
+prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--out', '@OUTPUT@',
+  ],
 )
 
 vk_format_table_c = custom_target(
@@ -111,13 +114,20 @@ endif
 
 libvulkan_radeon = shared_library(
   'vulkan_radeon',
-  [libradv_files, radv_entrypoints, radv_extensions_c, nir_opcodes_h, 
vk_format_table_c],
-  include_directories : [inc_common, inc_amd, inc_amd_common, inc_compiler,
- inc_vulkan_util, inc_vulkan_wsi],
-  link_with : [libamd_common, libamdgpu_addrlib, libvulkan_util,
-   libvulkan_wsi, libnir, libmesa_util],
-  dependencies : [dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl,
-  dep_m, dep_valgrind],
+  [libradv_files, radv_entrypoints, radv_extensions_c, nir_opcodes_h,
+   vk_format_table_c],
+  include_directories : [
+inc_common, inc_amd, inc_amd_common, inc_compiler, inc_vulkan_util,
+inc_vulkan_wsi,
+  ],
+  link_with : [
+libamd_common, libamdgpu_addrlib, libvulkan_util, libvulkan_wsi, libnir,
+libmesa_util,
+  ],
+  dependencies : [
+dep_llvm, dep_libdrm_amdgpu, dep_thread, dep_elf, dep_dl, dep_m,
+dep_valgrind,
+  ],
   c_args : [c_vis_args, no_override_init_args, radv_flags],
   link_args : [ld_args_bsymbolic, ld_args_gc_sections],
   install : true,
diff --git a/src/broadcom/meson.build b/src/broadcom/meson.build
index 6072fd1..f2a5e53 100644
--- a/src/broadcom/meson.build

Re: [Mesa-dev] [PATCH 11/14] meson: fix missing dependencies

2018-01-05 Thread Dylan Baker


On January 5, 2018 5:00:59 PM PST, Greg V <greg@unrelenting.technology> wrote:
>On 01/06/2018 01:36, Dylan Baker wrote:
>> Quoting Greg V (2017-12-31 08:55:25)
>>> ---
>>>   src/gallium/drivers/radeonsi/meson.build | 2 +-
>>>   src/mesa/meson.build | 1 +
>>>   2 files changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/gallium/drivers/radeonsi/meson.build
>b/src/gallium/drivers/radeonsi/meson.build
>>> index 58132bf072..8a7045de0d 100644
>>> --- a/src/gallium/drivers/radeonsi/meson.build
>>> +++ b/src/gallium/drivers/radeonsi/meson.build
>>> @@ -77,7 +77,7 @@ libradeonsi = static_library(
>>> ],
>>> c_args : [c_vis_args],
>>> cpp_args : [cpp_vis_args],
>>> -  dependencies : dep_llvm,
>>> +  dependencies : [dep_llvm, dep_libdrm],
>>>   )
>> I believe this could be correct, but I don't see this in autotools or
>scons,
>> what is the error you're seeing?
>../src/gallium/drivers/radeonsi/si_fence.c:25:10: fatal error: 
>'libsync.h' file not found
>>>   driver_radeonsi = declare_dependency(
>>> diff --git a/src/mesa/meson.build b/src/mesa/meson.build
>>> index ab6bc27312..74b8d97231 100644
>>> --- a/src/mesa/meson.build
>>> +++ b/src/mesa/meson.build
>>> @@ -721,6 +721,7 @@ libmesa_gallium = static_library(
>>> cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
>>> include_directories : [inc_common, include_directories('main')],
>>> link_with : [libglsl, libmesa_sse41],
>>> +  dependencies : [dep_vdpau],
>>> build_by_default : false,
>>>   )
>> This is wrong, there is no way that core mesa needs to link against
>vdpau, what
>> error are you fixing?
>../src/gallium/include/state_tracker/vdpau_dmabuf.h:37:10: fatal error:
>
>'vdpau/vdpau.h' file not found
>
>I'm not sure how to mark a dependency as "only for headers"…

There currently isn't a way to do that, I'm writing a patch to add one, as a 
workaround, you can use the run command with pkg-config I suggested on the 
other patch.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/7] gallium: Refactor out vl_put_screen and vl_get_screen

2018-01-11 Thread Dylan Baker
Please make sure the new .c file is added in the meson build as well before
pushing.

Dylan

Quoting Christian König (2018-01-10 05:03:44)
> My last status was that Leo wanted to commit this.
> 
> Leo are you still waiting for something?
> 
> Christian.
> 
> Am 10.01.2018 um 10:29 schrieb Julien Isorce:
> 
> Hi Christian,
> 
> >> Otherwise I'm going to give it a few more days on the list and push it
> if nobody objects.
> 
> Gentle ping ? So far the series are:
> 
> Acked-by: Leo Liu 
> Reviewed-by: Julien Isorce 
> 
> Thx
> Julien
> 
> On 30 November 2017 at 14:05, Leo Liu  wrote:
> 
>
> 
> 
> On 11/30/2017 06:22 AM, Julien Isorce wrote:
> 
> Hi Gurkirpal,
> 
> > Before refactoring process both the state trackers were in
> independent directories.
> > During earlier refactoring effort we decided to keep that
> directory structure so it made
> > sense to move them to auxiliary code. After that I moved them
> both under st/omx.
> > Since there could be a chance of it being useful out of st/omx, 
> I
> left the decision to
> > keep it or move it back to st/omx to the mailing list.
> 
> Yes please move it back to st/omx for the reasons you said, i.e.
> there will now 2
> sub directories, st/omx/bellagio and st/omx/tizonia and common 
> code
> in st/omx.
> 
> Yes. Please move them back to st/omx.
> 
> With that fixed, the series are:
> 
> Acked-by: Leo Liu 
> 
> Thanks for the work!
> 
> Leo
> 
> 
> 
> 
> 
> Another reason is that the env var "OMX_RENDER_NODE" mentions OMX.
> 
> Thx!
> Julien
> 
> 
> On 29 November 2017 at 04:02, Gurkirpal Singh <
> gurkirpal...@gmail.com> wrote:
> 
> ---
>  src/gallium/auxiliary/Makefile.sources             |   2 +
>  src/gallium/auxiliary/vl/vl_screen.c               | 107
> +
>  src/gallium/auxiliary/vl/vl_screen.h               |  33
> +++
>  .../state_trackers/omx_bellagio/entrypoint.c       |  83
> 
>  .../state_trackers/omx_bellagio/entrypoint.h       |   3 -
>  src/gallium/state_trackers/omx_bellagio/vid_dec.c  |   5 +-
>  src/gallium/state_trackers/omx_bellagio/vid_enc.c  |   5 +-
>  7 files changed, 148 insertions(+), 90 deletions(-)
>  create mode 100644 src/gallium/auxiliary/vl/vl_screen.c
>  create mode 100644 src/gallium/auxiliary/vl/vl_screen.h
> 
> diff --git a/src/gallium/auxiliary/Makefile.sources b/src/
> gallium/auxiliary/Makefile.sources
> index f40c472..35e89f9 100644
> --- a/src/gallium/auxiliary/Makefile.sources
> +++ b/src/gallium/auxiliary/Makefile.sources
> @@ -343,6 +343,8 @@ VL_SOURCES := \
>         vl/vl_mpeg12_decoder.c \
>         vl/vl_mpeg12_decoder.h \
>         vl/vl_rbsp.h \
> +       vl/vl_screen.c \
> +       vl/vl_screen.h \
>         vl/vl_types.h \
>         vl/vl_vertex_buffers.c \
>         vl/vl_vertex_buffers.h \
> diff --git a/src/gallium/auxiliary/vl/vl_screen.c 
> b/src/gallium
> /auxiliary/vl/vl_screen.c
> new file mode 100644
> index 000..7192802
> --- /dev/null
> +++ b/src/gallium/auxiliary/vl/vl_screen.c
> @@ -0,0 +1,107 @@
> +/**
> 
> + *
> + * Permission is hereby granted, free of charge, to any 
> person
> obtaining a
> + * copy of this software and associated documentation files
> (the
> + * "Software"), to deal in the Software without restriction,
> including
> + * without limitation the rights to use, copy, modify, merge,
> publish,
> + * distribute, sub license, and/or sell copies of the
> Software, and to
> + * permit persons to whom the Software is furnished to do so,
> subject to
> + * the following conditions:
> + *
> + * The above copyright notice and this permission notice
> (including the
> + * next paragraph) shall be included in all copies or

Re: [Mesa-dev] [PATCH] anv: Import mako templates only during execution of anv_extensions

2018-01-11 Thread Dylan Baker
I also prefer Jason's approach of moving just the creation of the mako Template
inside the if __main__ block, but leaving the actual string at the top level.

Alternatively we could split anv_extensions.py into two files: one that has the
constant data, and one that generates anv_extensions.c. I think either way that
would be a nice cleanup, since it would help separate concerns.

Dylan

Quoting Jason Ekstrand (2018-01-10 09:16:31)
> On Wed, Jan 10, 2018 at 4:09 AM, Andres Gomez  wrote:
> 
> anv_extensions usage from anv_icd was bringing the unwanted dependency
> of mako templates for the latter. We don't want that since it will
> force the dependency even for distributable tarballs which was not
> needed until now.
> 
> Jason suggested this approach.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104551
> Fixes: 0ab04ba979b ("anv: Use python to generate ICD json files")
> Cc: Jason Ekstrand 
> Cc: Emil Velikov 
> Signed-off-by: Andres Gomez 
> ---
>  src/intel/vulkan/anv_extensions.py | 50 +++---
> 
>  1 file changed, 25 insertions(+), 25 deletions(-)
> 
> diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_
> extensions.py
> index 16e5582598e..21e28530e9a 100644
> --- a/src/intel/vulkan/anv_extensions.py
> +++ b/src/intel/vulkan/anv_extensions.py
> @@ -29,8 +29,6 @@ import copy
>  import re
>  import xml.etree.cElementTree as et
> 
> -from mako.template import Template
> -
>  MAX_API_VERSION = '1.0.57'
> 
>  class Extension:
> @@ -160,7 +158,31 @@ def _init_exts_from_xml(xml):
>          ext = ext_name_map[ext_name]
>          ext.type = ext_elem.attrib['type']
> 
> -_TEMPLATE = Template(COPYRIGHT + """
> 
> 
> A simpler patch would be to simply do
> 
> _TEMPLATE = COPYRIGHT + """
> /* Stuff */
> """
> 
> And then do f.write(Template(_TEMPLATE)).render(**template_env) in the "if
> __name__ == '__main__'".  That way we don't have to move as much code around.
>  
> 
> +if __name__ == '__main__':
> +    parser = argparse.ArgumentParser()
> +    parser.add_argument('--out', help='Output C file.', required=True)
> +    parser.add_argument('--xml',
> +                        help='Vulkan API XML file.',
> +                        required=True,
> +                        action='append',
> +                        dest='xml_files')
> +    args = parser.parse_args()
> +
> +    for filename in args.xml_files:
> +        _init_exts_from_xml(filename)
> +
> +    for ext in EXTENSIONS:
> +        assert ext.type == 'instance' or ext.type == 'device'
> +
> +    template_env = {
> +        'MAX_API_VERSION': MAX_API_VERSION,
> +        'instance_extensions': [e for e in EXTENSIONS if e.type ==
> 'instance'],
> +        'device_extensions': [e for e in EXTENSIONS if e.type ==
> 'device'],
> +    }
> +
> +    from mako.template import Template
> +
> +    _TEMPLATE = Template(COPYRIGHT + """
>  #include "anv_private.h"
> 
>  #include "vk_util.h"
> @@ -260,27 +282,5 @@ VkResult anv_EnumerateDeviceExtensionProperties(
>  }
>  """)
> 
> -if __name__ == '__main__':
> -    parser = argparse.ArgumentParser()
> -    parser.add_argument('--out', help='Output C file.', required=True)
> -    parser.add_argument('--xml',
> -                        help='Vulkan API XML file.',
> -                        required=True,
> -                        action='append',
> -                        dest='xml_files')
> -    args = parser.parse_args()
> -
> -    for filename in args.xml_files:
> -        _init_exts_from_xml(filename)
> -
> -    for ext in EXTENSIONS:
> -        assert ext.type == 'instance' or ext.type == 'device'
> -
> -    template_env = {
> -        'MAX_API_VERSION': MAX_API_VERSION,
> -        'instance_extensions': [e for e in EXTENSIONS if e.type ==
> 'instance'],
> -        'device_extensions': [e for e in EXTENSIONS if e.type ==
> 'device'],
> -    }
> -
>      with open(args.out, 'w') as f:
>          f.write(_TEMPLATE.render(**template_env))
> --
> 2.15.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
> 


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


Re: [Mesa-dev] [PATCH v2] anv: Import mako templates only during execution of anv_extensions

2018-01-11 Thread Dylan Baker
Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Quoting Andres Gomez (2018-01-10 13:11:51)
> anv_extensions usage from anv_icd was bringing the unwanted dependency
> of mako templates for the latter. We don't want that since it will
> force the dependency even for distributable tarballs which was not
> needed until now.
> 
> Jason suggested this approach.
> 
> v2: Patch simplification (Jason).
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104551
> Fixes: 0ab04ba979b ("anv: Use python to generate ICD json files")
> Cc: Jason Ekstrand <jason.ekstr...@intel.com>
> Cc: Emil Velikov <emil.veli...@collabora.com>
> Signed-off-by: Andres Gomez <ago...@igalia.com>
> ---
>  src/intel/vulkan/anv_extensions.py | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/intel/vulkan/anv_extensions.py 
> b/src/intel/vulkan/anv_extensions.py
> index 16e5582598e..adfebca985c 100644
> --- a/src/intel/vulkan/anv_extensions.py
> +++ b/src/intel/vulkan/anv_extensions.py
> @@ -29,8 +29,6 @@ import copy
>  import re
>  import xml.etree.cElementTree as et
>  
> -from mako.template import Template
> -
>  MAX_API_VERSION = '1.0.57'
>  
>  class Extension:
> @@ -160,7 +158,7 @@ def _init_exts_from_xml(xml):
>  ext = ext_name_map[ext_name]
>  ext.type = ext_elem.attrib['type']
>  
> -_TEMPLATE = Template(COPYRIGHT + """
> +_TEMPLATE = COPYRIGHT + """
>  #include "anv_private.h"
>  
>  #include "vk_util.h"
> @@ -258,7 +256,7 @@ VkResult anv_EnumerateDeviceExtensionProperties(
>  
>  return vk_outarray_status();
>  }
> -""")
> +"""
>  
>  if __name__ == '__main__':
>  parser = argparse.ArgumentParser()
> @@ -282,5 +280,7 @@ if __name__ == '__main__':
>  'device_extensions': [e for e in EXTENSIONS if e.type == 'device'],
>  }
>  
> +from mako.template import Template
> +
>  with open(args.out, 'w') as f:
> -f.write(_TEMPLATE.render(**template_env))
> +f.write(Template(_TEMPLATE).render(**template_env))
> -- 
> 2.15.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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


Re: [Mesa-dev] meson: vdpau broken on r600

2018-01-10 Thread Dylan Baker
I'm not sure off the top of my head. I don't have an r600 anymore, but I have an
SI and a nouveau machine, so I'll see if I can reproduce the problem there and
fix it.

Dylan

Quoting Marc Dietrich (2018-01-09 02:38:33)
> Hi Dylan,
> 
> just found that vdpau does not work on r600 with meson build. Some missing 
> symbol, but I cannot figure out why:
> 
> # vdpauinfo
> display: :0   screen: 0
> /usr/lib64/vdpau/libvdpau_r600.so.1: undefined symbol: 
> vdp_imp_device_create_x11
> Error creating VDPAU device: 1
> 
> The size of the library differs significant:
> autotools: 2417768 libvdpau_r600.so.1.0.0
> meson:  717368 libvdpau_r600.so.1.0.0
> 
> Any idea?
> 
> Marc


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


[Mesa-dev] [PATCH] meson: generate translations for driconf

2018-01-10 Thread Dylan Baker
Currently meson implements the same logic as SCons for translations,
namely it doesn't do them. This patch changes meson to use logic more
like autotools, and generate translations. To do this we have to go
behind meson's back a bit, and wrap the whole thing up in a single
python script.

Meson has a module for gettext translations, but it assumes that one
will have a pot file, and then .mo translations will be generated and
checked into the source repo (or generated by hand using custom ninja
targets before building), mesa assumes that the targets will be
regenerated on each invocation of make or ninja. I think this can be
fixed upstream, but in the mean time this adds support for using
translations.

Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
---
 src/util/xmlpool/gen_translations.py | 91 +-
 src/util/xmlpool/meson.build | 31 +++---
 2 files changed, 114 insertions(+), 8 deletions(-)
 create mode 100644 src/util/xmlpool/gen_translations.py

diff --git a/src/util/xmlpool/gen_translations.py 
b/src/util/xmlpool/gen_translations.py
new file mode 100644
index 000..5d08590
--- /dev/null
+++ b/src/util/xmlpool/gen_translations.py
@@ -0,0 +1,91 @@
+# encoding=utf-8
+# Copyright © 2018 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+"""Wraps gen_xmlpool.py and generates .mo files for use in meson.
+
+Currently meson and mesa have a mismatch in the way that they assume that
+translations should be generated. Meson assumes that translations are generated
+and checked into the tree, mesa assumes that they are generated at compile
+time. This script bridges that difference.
+"""
+
+from __future__ import print_function
+import argparse
+import os
+import subprocess
+import sys
+
+
+def arg_parser():
+parser = argparse.ArgumentParser()
+parser.add_argument('inputfile', help='The template file (t_options.h)')
+parser.add_argument('outputfile', help='The file to write.')
+parser.add_argument('gen_xmlpool', help='The gen_xmlpool.py script')
+parser.add_argument('sourcedir', help='The source directory')
+parser.add_argument('builddir', help='The build directory')
+parser.add_argument('python', help='The python binary to call 
gen_xmlpool.py with')
+parser.add_argument('langs', nargs='+', help='langs to generate.')
+return parser.parse_args()
+
+
+def gen_mo(lang, sourcedir, builddir):
+"""Generate an mo file from each po file using msgfmt."""
+# TODO: Python actually provides a tool that serves the same purpose as
+# msgfmt. It might make sense to fall back to that tool if msgfmt isn't
+# available (or just use it since our po files aren't that complicated) for
+# other oses (like macOS and Windows).
+
+outdir = os.path.join(builddir, lang, 'LC_MESSAGES')
+if not os.path.exists(outdir):
+os.makedirs(outdir)
+
+po_file = os.path.join(sourcedir, '{}.po'.format(lang))
+mo_file = os.path.join(outdir, 'options.mo')
+
+try:
+subprocess.check_call(['msgfmt', '-o', mo_file, po_file])
+except subprocess.CalledProcessError as e:
+print(e.output, file=sys.stderr)
+sys.exit(e.returncode)
+
+
+def main():
+args = arg_parser()
+
+for lang in args.langs:
+gen_mo(lang, args.sourcedir, args.builddir)
+
+try:
+# We need to use subprocess since gen_xmlpool.py prints, and isn't safe
+# to import since it doens't use the if __name__ == '__main__' idiom
+out = subprocess.check_output(
+[args.python, args.gen_xmlpool, args.inputfile, args.builddir] +
+args.langs)
+except subprocess.CalledProcessError as e:
+print(e.output, file=sys.stderr)
+sys.exit(e.returncode)
+
+with open(args.outputfile, 'wb') as f:
+f.write(out)
+
+
+if __name__ == '__main__':
+main()
diff --gi

<    7   8   9   10   11   12   13   14   15   16   >