[Mesa-dev] [PATCH 1/2] split-to-files.py: fix parsing when #version is not at the beginning

Kenneth Graunke kenneth at whitecape.org
Sat Jan 23 11:02:12 PST 2016


On Saturday, January 23, 2016 12:47:51 PM PST Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  split-to-files.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/split-to-files.py b/split-to-files.py
> index 151681e..14f19a4 100755
> --- a/split-to-files.py
> +++ b/split-to-files.py
> @@ -71,7 +71,7 @@ def write_shader_test(filename, shaders):
>      min_version = 110
>      for stage, num in shaders:
>          shader = shaders[(stage, num)]
> -        m = re.match(r"^#version (\d\d\d)", shader)
> +        m = re.match(r".*#version (\d\d\d)", shader, re.DOTALL)
>          if m:
>              version = int(m.group(1), 10)
>              if version > min_version:
> 

Why not just use my patch?

http://cgit.freedesktop.org/~kwg/mesa/commit/?h=dumptofiles
http://lists.freedesktop.org/archives/mesa-dev/2016-January/105176.html

You get properly formatted .shader_test files directly from Mesa,
without having to worry about inaccurate splitting.  IMHO, we
should just delete split-to-files.py altogether...

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20160123/6f7bb17d/attachment.sig>


More information about the mesa-dev mailing list