[Mesa-dev] [PATCH] mesa: Remove the generated glapi from source control, and just build it.

Ian Romanick idr at freedesktop.org
Wed May 23 13:33:35 PDT 2012


On 05/23/2012 12:45 PM, Eric Anholt wrote:
> Mesa already always depends on python to build.  The checked in
> changes are not reviewed (because any trivial change rewrites the
> world).  We also have been pushing commits between xml change and
> regen where at-build-time xml-generated code disagrees with committed
> xml-generated code.  And worst of all, sometimes we ("I") check in
> *stale* xml-generated code.

<broken_record>
Though the person making the changes will typically review them.  I 
renew my objection that making tiny changes to the generator scripts can 
result in catastrophic changes in the generated code.  We've encountered 
several situations where changing one part of the generator causes sizes 
of broad categories of GLX protocol messages to be miscalculated. 
git-diff makes this easy to notice.  "Wait, why did indirect_size.c 
change at all?  That has nothing to do with the change I intended."

Note also that some of the generated code is platform-specific and gets 
little testing.  How often does anyone test the C-based dispatch code? 
Or the SPARC dispatch code?  Or even the 32-bit x86 dispatch code?

I know Paul asserts people can diff the files by hand.  I assert that, 
while they can, nobody will do that ever.  People will look for changes 
in the files that they expected to change.  Given the size of the 
potential set of changed files, I expect that change in unexpected files 
will go unnoticed.

Nobody runs indirect rendering tests.  Therefore we have no testing of 
code that we might not even notice we were changing.  That seems just 
about as awful as possible.
</broken_record>

I fully agree that the current situation sucks.  However, the new 
situation will also suck.  I reserve the right to say "I informed you 
thusly" the next time one of these kinds of bugs occurs. :p

> ---
>
> I dropped the giant file removals from the diff output to fit on the
> mailing list.
>
> This doesn't fix the make clean requirement in Mesa, because
> makedepend appears to be just plain broken.  However, my upcoming
> automake series does fix it by not using makedepend.  Modifying glapi
> and typing "make", woo!
>
>   configure.ac                    |    2 +-
>   src/glx/.gitignore              |    6 +
>   src/glx/indirect.c              |10736 -----------
>   src/glx/indirect.h              |  722 -
>   src/glx/indirect_init.c         |  789 -
>   src/glx/indirect_size.c         |  382 -
>   src/glx/indirect_size.h         |   85 -
>   src/mapi/glapi/.gitignore       |    9 +
>   src/mapi/glapi/gen/Makefile     |    3 +-
>   src/mapi/glapi/glapi_gentable.c | 9530 ----------
>   src/mapi/glapi/glapi_mapi_tmp.h |14139 ---------------
>   src/mapi/glapi/glapi_sparc.S    | 1613 --
>   src/mapi/glapi/glapi_x86-64.S   |37708 ---------------------------------------
>   src/mapi/glapi/glapi_x86.S      | 1528 --
>   src/mapi/glapi/glapitable.h     | 1023 --
>   src/mapi/glapi/glapitemp.h      | 9742 ----------
>   src/mapi/glapi/glprocs.h        | 2853 ---
>   src/mesa/main/.gitignore        |    3 +
>   src/mesa/main/dispatch.h        |12958 --------------
>   src/mesa/main/enums.c           | 6638 -------
>   src/mesa/main/remap_helper.h    | 5818 ------
>   21 files changed, 21 insertions(+), 116266 deletions(-)
>   delete mode 100644 src/glx/indirect.c
>   delete mode 100644 src/glx/indirect.h
>   delete mode 100644 src/glx/indirect_init.c
>   delete mode 100644 src/glx/indirect_size.c
>   delete mode 100644 src/glx/indirect_size.h
>   delete mode 100644 src/mapi/glapi/glapi_gentable.c
>   delete mode 100644 src/mapi/glapi/glapi_mapi_tmp.h
>   delete mode 100644 src/mapi/glapi/glapi_sparc.S
>   delete mode 100644 src/mapi/glapi/glapi_x86-64.S
>   delete mode 100644 src/mapi/glapi/glapi_x86.S
>   delete mode 100644 src/mapi/glapi/glapitable.h
>   delete mode 100644 src/mapi/glapi/glapitemp.h
>   delete mode 100644 src/mapi/glapi/glprocs.h
>   delete mode 100644 src/mesa/main/dispatch.h
>   delete mode 100644 src/mesa/main/enums.c
>   delete mode 100644 src/mesa/main/remap_helper.h


More information about the mesa-dev mailing list