Commit Graph

11 Commits

Author SHA1 Message Date
Eric Engestrom f1eae2f8bb python: drop python2 support
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
2021-08-14 21:44:32 +00:00
Jesse Natalie 92f1b6bad5 glapi: Undefine MemoryBarrier
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8661>
2021-01-28 18:35:13 +00:00
Mathieu Bridon 0f7b18fa0d python: Use the print function
In Python 2, `print` was a statement, but it became a function in
Python 3.

Using print functions everywhere makes the script compatible with Python
versions >= 2.6, including Python 3.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
2018-07-06 10:04:22 -07:00
Paul Berry ef30ce97a6 mesa: Create pointers for multithread marshalling dispatch table.
This patch splits the context's CurrentDispatch pointer into two
pointers, CurrentClientDispatch, and CurrentServerDispatch, so that
when doing multithread marshalling, we can distinguish between the
dispatch table that's being used by the client (to serialize GL calls
into the marshal buffer) and the dispatch table that's being used by
the server (to execute the GL calls).

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Marek Olšák <maraeo@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
2017-03-16 14:14:18 +11:00
Emil Velikov 68c38b2431 mapi/gen: remove shebang from python scripts
All of those should be executed $PYTHON2/python2 [or equivalent] hence
why they are missing the execute bit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-03-10 14:12:47 +00:00
Dylan Baker 3317cea048 glapi: gl_apitemp.py: Use a main function
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
2015-05-22 11:31:27 -07:00
Dylan Baker 24ec03bd05 glapi: gl_apitemp.py: Convert to argparse instead of getopt
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
2015-05-22 11:31:27 -07:00
Paul Berry 571d5c353a dispatch: properly handle parameter name mismatches in glapitemp.h.
Previously, when code-generating aliased functions in glapitemp.h, we
weren't consistent about which function alias we used to obtain the
parameter names, with the risk that we would generate incorrect code
like this:

  KEYWORD1 void KEYWORD2 NAME(Foo)(GLint x)
  {
    (void) x;
    DISPATCH(Foo, (x), (F, "glFoo(%d);\n", x));
  }
  KEYWORD1 void KEYWORD2 NAME(FooEXT)(GLint y)
  {
    (void) x;
    DISPATCH(Foo, (x), (F, "glFooEXT(%d);\n", x));
  }

At the moment there are no aliased functions with mismatched parameter
names, so this isn't the problem.  But when we introduce GLES1
functions into the dispatch table, there will be
(MapBufferRange/MapBufferRangeEXT).  This patch paves the way for that
by fixing the code generation script to handle the mismatch correctly.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-01 11:22:49 -07:00
Paul Berry 99802519b4 glapi: Reformat python code generation scripts to use 4-space indentation.
This brings us into accordance with the official Python style guide
(http://www.python.org/dev/peps/pep-0008/#indentation).

To preserve the indentation of the c code that is generated by these
scripts, I've avoided re-indenting triple-quoted strings (unless those
strings appear to be docstrings).

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-10-10 11:19:14 -07:00
Ian Romanick f40c291ed6 mapi: Silence many "warning: unused parameter"
When generating dispatch templates, emit the '(void) blah;' magic to
make GCC happy.  This reduces a lot of warning spam if you build with
-Wunused-parameter or -Wextra.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
2011-08-26 23:33:12 -07:00
Chia-I Wu 296adbd545 glapi: Move to src/mapi/.
Move glapi to src/mapi/{glapi,es1api,es2api}.
2010-05-07 10:41:11 +08:00
Renamed from src/mesa/glapi/gen/gl_apitemp.py (Browse further)