glslang-zig/glslang/MachineIndependent
Ben Clayton fbe9a23baf Generate build information from CHANGES.md
This PR significantly reworks the way glslang is versioned.

Instead of committing changes to the `GLSLANG_MINOR_VERSION` define in
`glslang/Public/ShaderLang.h`, and using `make-revision` to generate
`GLSLANG_PATCH_LEVEL` in `glslang/Include/revision.h`, all version
information is now derived from the new `CHANGES.md` file.

`CHANGES.md` acts as the single source of truth for glslang version
information, along with a convenient place to put all release notes for
each notable change made.

`CHANGES.md` is parsed using the new `build_info.py` python script.
This script can read basic template files to produce new source files,
which it does to read the new `build_info.h.tmpl` to generate (at build
time) a glslang private header at
`<build-dir>/include/glslang/build_info.h`.
I've written generators for each of the CMake, Bazel, gn, and
`Android.mk` build scripts.

The new version code conforms to the Semantic Versioning 2.0 spec.

This new version is also used by the CMake rules to produce versioned
shared objects, including a major-versioned SONAME.

New APIs:
---------

* `glslang::GetVersion()` returns a `Version` struct with the version
  major, minor, patch and flavor.

Breaking API changes:
---------------------

* The public defines `GLSLANG_MINOR_VERSION` and `GLSLANG_PATCH_LEVEL`
  have been entirely removed.
* `glslang/Public/ShaderLang.h` and `glslang/Include/revision.h` have
  been deleted.
* Instead, `<build-dir>/include/glslang/build_info.h` is created in
  the build directory, and `<build-dir>/include` is a CMake `PUBLIC`
  (dependee-inherited) include directory for the glslang targets.
* `<build-dir>/include/glslang/build_info.h` contains the following
   new #defines:
   `GLSLANG_VERSION_MAJOR`, `GLSLANG_VERSION_MINOR`,
   `GLSLANG_VERSION_PATCH`, `GLSLANG_VERSION_FLAVOR`,
   `GLSLANG_VERSION_GREATER_THAN(major, minor, patch)`,
   `GLSLANG_VERSION_GREATER_OR_EQUAL_TO(major, minor, patch)`,
   `GLSLANG_VERSION_LESS_THAN(major, minor, patch)`,
   `GLSLANG_VERSION_LESS_OR_EQUAL_TO(major, minor, patch)`
*  The CMake install output directory contains a copy of
   `build_info.h` at: `include/glslang/build_info.h`
*  Python3 is now always required to build glslang (likely always
   required for transitive dependency builds).
2020-07-09 12:34:02 +01:00
..
preprocessor TPpToken: Fix compiling on clang-10 (#2189) 2020-04-22 08:19:43 -06:00
attribute.cpp Web: Turn off bracket-style attributes, reflection, and IO mapping. 2019-08-20 23:21:55 -06:00
attribute.h HLSL: Fix #1912: add attribute syntax for nonreadable/nonwritable 2019-09-29 19:16:25 -06:00
Constant.cpp Copyright update, mostly to trigger bots again. 2020-03-01 04:51:40 -07:00
gl_types.h Web: Generalize _EXTENSIONS* in SPIR-V back-end. 2019-08-20 23:21:55 -06:00
glslang.m4 GL_EXT_ray_query updates 2020-03-19 16:46:30 -04:00
glslang.y GL_EXT_ray_query updates 2020-03-19 16:46:30 -04:00
glslang_tab.cpp GL_EXT_ray_query updates 2020-03-19 16:46:30 -04:00
glslang_tab.cpp.h GL_EXT_ray_query updates 2020-03-19 16:46:30 -04:00
InfoSink.cpp Non-functional: White space after "//", mostly for copyrights. 2017-01-06 12:34:14 -07:00
Initialize.cpp Fix Web build 2020-05-11 22:06:21 +02:00
Initialize.h Comment out params instead of removing 2019-09-11 08:59:47 -04:00
Intermediate.cpp Add check for DOUBLE in low versions (#2223) 2020-05-18 03:41:52 -06:00
intermOut.cpp Add support for extension GL_EXT_shader_implicit_conversions 2020-04-30 08:41:23 -07:00
IntermTraverse.cpp Non-functional: White space after "//", mostly for copyrights. 2017-01-06 12:34:14 -07:00
iomapper.cpp Add Shared/Std140 SSBO process & top-level array elements related (#2231) 2020-06-04 01:47:18 -06:00
iomapper.h Fix #2227, which was coded incorrectly, to be simpler/safer. 2020-05-20 01:56:11 -06:00
limits.cpp Web: Turn off includes, independent preprocessing path, fine tune all. 2019-08-20 23:21:56 -06:00
linkValidate.cpp Fix xfb stride limit issue (#2088) 2020-06-09 02:30:14 -06:00
LiveTraverser.h [lumped builds] Add include guards (#pragma once) to header files that did not have any. 2017-05-10 16:58:38 +03:00
localintermediate.h fix warning unused parameter in release build (#2251) 2020-05-28 06:12:01 -06:00
parseConst.cpp Fix MSVC build issue - remove invalid character 2020-03-19 15:31:31 -06:00
ParseContextBase.cpp Error assigns to objects of rayQueryEXT type. 2020-03-30 10:24:30 -07:00
ParseHelper.cpp SPV: RelaxedPrecision: use the result precision for texture sampling. 2020-06-30 07:52:05 -06:00
ParseHelper.h Reserve unused std140 uniform block in reflection, and fix uniform block matrix layout (#2041) 2020-05-15 02:26:48 -06:00
parseVersions.h EXT_ray_tracing requires spv1.4 (#2237) 2020-05-28 09:18:07 -06:00
pch.h Use precompiled headers for some glslang projects 2018-10-31 15:38:08 -05:00
PoolAlloc.cpp Memory: Mak full explicit destructor functionality, techincally correctly. 2017-11-21 14:32:39 -07:00
propagateNoContraction.cpp Make file formatting comply with POSIX and Unix standards 2020-03-21 03:20:25 -04:00
propagateNoContraction.h [lumped builds] Add include guards (#pragma once) to header files that did not have any. 2017-05-10 16:58:38 +03:00
reflection.cpp Use correct type for var storing returned value (#2263) 2020-06-09 10:01:43 -06:00
reflection.h Make file formatting comply with POSIX and Unix standards 2020-03-21 03:20:25 -04:00
RemoveTree.cpp Non-functional: White space after "//", mostly for copyrights. 2017-01-06 12:34:14 -07:00
RemoveTree.h [lumped builds] Add include guards (#pragma once) to header files that did not have any. 2017-05-10 16:58:38 +03:00
Scan.cpp Add support for extension GL_ARB_vertex_attrib_64bit (#2193) 2020-04-29 06:58:49 -06:00
Scan.h SPV: Fix #1575, fix #1593: Support HLSL #line 2018-12-07 17:36:33 -07:00
ScanContext.h GL_EXT_buffer_reference 2019-01-07 12:36:13 -06:00
ShaderLang.cpp Generate build information from CHANGES.md 2020-07-09 12:34:02 +01:00
SymbolTable.cpp printf format 2020-03-30 01:48:15 +03:00
SymbolTable.h HLSL: Fix #1912: add attribute syntax for overriding image formats. 2019-09-28 11:39:15 -06:00
Versions.cpp Fix signed / unsigned mismatch warning (#2266) 2020-06-10 21:41:47 -06:00
Versions.h EXT_ray_tracing requires spv1.4 (#2237) 2020-05-28 09:18:07 -06:00