Commit Graph

305 Commits

Author SHA1 Message Date
Andrew Woloszyn
b891c2b827 Freed up some memory when no longer needed in glslangValidator. 2016-01-18 09:26:25 -05:00
John Kessenich
c57b2a97fa Memory/Perf: For link-mode, isolate file I/O so API can be looped over.
Separating file I/O from compile/link lets the compile/link be done
repeatedly in a loop for testing and measuring of performance and
memory footprint, including seeing memory growth over time for
functional-level memory-leak testing.

While the older compile-only mode already had this functionality,
and typically showed no memory leaks, SPIR-V uses the link path,
has pending "TODO" for memory freeing, and this shows several
kilobytes of leaking per compile-link. Most likely, pending
merge request 131 will address much of this.
2016-01-16 15:30:03 -07:00
Kenneth Perry
b07e6beb8a Display the filename if we have output, even if validating a single file. 2015-12-15 10:52:34 -06:00
Pyry Haulos
5f6892e23c Use generic osinclude.h
Using platform-neutral osinclude.h makes it easier to substitute
implementation when necessary and eliminates some variability between
build configurations.
2015-12-01 13:01:34 -08:00
baldurk
5100d5603f Remove legacy build system 2015-11-16 23:51:35 +01:00
baldurk
876a0e392e Add an osinclude.h below each OS directory, redirects by platform macro
* Linux folder has been renamed to Unix, to match defines and so that it
  compiles on OS X.
* This removes the need for a per-platform include search path for the
  right OS folder
2015-11-16 18:05:18 +01:00
baldurk
08dee03d18 Remove include_directories from CMakeLists, to enforce relative includes
* This also moves bison generated files into the source tree, so that
  include of glslang_tab.cpp.h and includes from glslang_tab.cpp work
  the same way.
2015-11-16 18:05:18 +01:00
John Kessenich
55e7d11ce8 SPIR-V: Move from Version .99 Rev 31 to Version 1.0, Rev 2. 2015-11-15 22:31:41 -07:00
Andrew Woloszyn
8b64fa5474 Fixes for compiling glslang on Android.
Primarily fix is due to Android not supporting std::to_string().
2015-08-17 11:39:38 -04:00
John Kessenich
5e4b1242bf Move to revision 31 of SPIR-V. 2015-08-06 22:55:01 -06:00
John Kessenich
d618070ab0 Merge pull request #46 from google/include-directive
#include directive support
2015-08-05 10:29:23 -06:00
John Kessenich
61d7d7ad73 Revisioning: Include GLSL.std.450 version. Also, the revision.h script now includes redirection to revision.h. 2015-08-03 12:04:56 -06:00
John Kessenich
0da9eaabe8 Version reporting: Restart active use of revision.h, now based on a git tag.
The new make-revision script regenerates glslang/Include/revision.h,
used as it always has been, but made with a git-tag version and the
the number of commits on master.

I have a pre-commit hook that will automatically do this on master,
likely often enough to work in practice, without needing pull requests
to include it.
2015-08-02 10:21:10 -06:00
Dejan Mircevski
7be4b8282d Add #include processing to glslang (though turned off by default).
When an include directive is recognized by the preprocessor, it
executes a callback on the filepath argument to obtain the file
contents.  That way the compilation client can deal with the file
system, include paths, etc.

Currently only accepts quoted filepaths -- no angle brackets yet.
2015-07-31 19:41:18 -04:00
Andrew Woloszyn
e837f99afb Removed the single usage of exceptions in all of glslang. 2015-07-17 13:31:25 -04:00
Andrew Woloszyn
aae1ad8296 Added error output to the preprocessor.
This patch distinguishes preprocessing errors with normal parsing
errors and gives glslangValidator the ability to output preprocessing
errors.
2015-07-14 16:02:25 -04:00
John Kessenich
68d78fd31e Updated command-line options, adding -o for saving binaries, -G for OpenGL SPIR-V validation, -v etc.
Old uses should still work as they did before.
Also encapsulated use of these flags during parsing, for the parse context.
Added SPIR-V version to -v.
2015-07-12 19:28:10 -06:00
John Kessenich
b329715caf Fix clang static analyzer issues, as reported by floooh. 2015-07-11 18:01:03 -06:00
John Kessenich
140f3df134 Final round for line endings. 2015-06-26 16:58:36 -06:00
John Kessenich
6626cadbad glslang front-end: Don't emit blank lines for empty info logs. From Andrew Woloszyn <awoloszyn@google.com>.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31531 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-19 05:14:19 +00:00
John Kessenich
c555dddd53 glslang preprocessing: Add -E option to print out preprocessed GLSL, and do the work needed to generate a preprocessed stream. From Andrew Woloszyn <awoloszyn@google.com>.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31508 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-17 02:38:44 +00:00
John Kessenich
fae38ee277 glslang portability: Fixed a slew of OSX compilation warnings (but not all).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31469 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-10 23:23:12 +00:00
John Kessenich
79eaa91e6f glslang portability: Resolve OSX errors, some other OS warnings.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31468 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-10 22:05:48 +00:00
John Kessenich
01685c3ff8 SPV compression: Final check-in enabling this on MSVC 2012. All compression submissions from Steve (spvremapper@lunarg.com).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31236 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-20 16:04:17 +00:00
John Kessenich
3c4a276282 SPIR-V compression: Requires rerunning CMake. Adds a standalone tool for running the SPV compression.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31232 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-19 21:07:04 +00:00
John Kessenich
ca3457f1a7 glslang: Fix a few more warnings, and see it using nullptr causes anyone problems (testing c++11 portability).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31218 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-18 01:59:45 +00:00
John Kessenich
93dfbe1309 glslang: Fix over 100 warnings from MSVC warning level 4.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31202 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-15 17:30:55 +00:00
John Kessenich
2aa7f3a671 SPV compression: Remove file/path manipulation stuff, setting up for that to be a separate tool. Added copyright messages as well.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31201 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-15 16:02:07 +00:00
John Kessenich
ccc7acc969 SPIR-V compression: restore a line of code deleted by the previous submission.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31181 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-13 20:53:52 +00:00
John Kessenich
4217d2ea22 SPIR-V compression: Add stripping and remapping tools for compressibility of generated SPIR-V.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31180 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-13 20:38:44 +00:00
John Kessenich
acba77200b glslang: Add SPIR-V human readable form. (Use -H.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30038 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-04 03:48:38 +00:00
John Kessenich
0df0cdeeeb glslangValidator: Add straightforward SPIR-V support (non-optimizing, ~3.x functionality).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30032 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-03 17:09:43 +00:00
John Kessenich
3ce4e59090 Increase portability. (Submission from Nikita Kindt, as were some recent related submissions.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@28444 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-10-06 19:57:34 +00:00
John Kessenich
167b6d1b30 Remove dead call.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@28368 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-10-01 01:08:21 +00:00
John Kessenich
fccfb5a90e Remove unneeded skeletal work.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@28345 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-09-28 18:43:52 +00:00
John Kessenich
cf74ae1b2d Have memory counters normally turned off, to avoid cross-windows-platform linking problems.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@28078 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-09-12 17:25:16 +00:00
John Kessenich
01fd50e4f2 Add option for printing documentation (empty).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27966 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-09-08 21:01:09 +00:00
John Kessenich
d78e3512ac Minor change in command-line options.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27840 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-25 20:07:55 +00:00
John Kessenich
a7a68a9b32 Non-functional misc. changes. Slight increase in performance from moving two performance path methods into a header.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27835 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-24 18:21:00 +00:00
John Kessenich
da66bc7d29 Implement write-only semantic checking, the non-r32f/i/u readonly/writeonly check, and ES 3.1 support of volatile. Also, fix a typo in MaxComputeGroupY.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27765 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-19 20:32:48 +00:00
John Kessenich
d6c72a44ab A patch submitted for MinGW building.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27757 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-18 19:42:35 +00:00
John Kessenich
26ad268037 Add -d option for desktop default for missing #version.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27729 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-13 20:17:19 +00:00
John Kessenich
cd77f8e922 Implement GL_ARB_shader_texture_image_samples. Also add in gl_MaxSamples and the float imageAtomicExchange.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27721 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-13 16:54:02 +00:00
John Kessenich
699684180f Implement cull distances for GLSL 4.5 (but not as an extension yet, just a 4.5 feature).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27714 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-13 06:37:59 +00:00
John Kessenich
ddea678e3e Implement GL_ARB_shader_image_load_store. Partly done (format layout qualifiers) from a submission.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27670 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-10 18:19:36 +00:00
John Kessenich
92f9038388 Create dummy side project.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27519 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-07-28 04:21:04 +00:00
John Kessenich
fd30542a0f Non-functional trivial clean up.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26972 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-06-05 16:30:53 +00:00
John Kessenich
fde703438f CMake: Collapse into a single library all the libraries under the glslang directory, and represent the proper hierarchy in MSVS. There are still a total of 3 libraries to link against: glslang, OGLCompiler, and OSDependent.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26137 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-31 00:06:32 +00:00
John Kessenich
585982e32a Add getStage() and getIntermediate() methods for consumers. Also removed dead options and update test file.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26126 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-28 17:49:10 +00:00
John Kessenich
0af1e7c608 Allow selection of the "Platform Toolset", so that XP binaries can be built.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25952 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-17 23:56:45 +00:00
John Kessenich
3ce1058dbe update Linux build for latest CMake changes from Windows
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25793 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-11 06:35:42 +00:00
John Kessenich
d18e2d8adc Add CMake support for Visual Studio and installation, with an expected "install" for CMAKE_INSTALL_PREFIX, and updated test scripts to consume the CMake installation.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25791 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-11 02:10:26 +00:00
John Kessenich
35f04bde8a Make 64-bit VS compile clean. Mostly size_t vs. int tweaks.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25411 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-02-19 02:47:20 +00:00
John Kessenich
8922da24a4 Check in a much improved submitted set of makefiles for Linux builds. This eliminates dependencies on system headers, and generally simplifies the makefiles.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25408 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-02-19 01:00:58 +00:00
John Kessenich
0547c2a6bb Add submitted CMake files for Linux builds. All existing ways of building remain in tact.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25403 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-02-19 00:18:25 +00:00
John Kessenich
6494baf371 Check-in a couple submitted char* string portability bug fixes: correct sizing of buffers and stop overwriting preprocessor token names with themselves.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25402 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-02-19 00:08:59 +00:00
John Kessenich
51cdd90fa8 Fix the few non-portable uses of "char" (where a -1 might be relevant): All uses of char are now either "int", "unsigned char" or char arrays for storing strings. Also, went to consistent "char* foo" coding convention. (There were only a few ambiguous uses.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25400 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-02-18 23:37:57 +00:00
John Kessenich
c7776ec3fd GL_ARB_enhanced_layouts, part 4: Numerical side of xfb_*: offset computation, size computation, alias detection, paddings, overflow, implicit strides, gl_Max* checks, etc.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25014 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-01-26 01:37:13 +00:00
John Kessenich
623833fabc Tessellation partial implementation (not ready for use yet), including:
- the built-in constants
 - built-in variable declarations, some dependent on gl_MaxPatchVertices
 - layout qualifier for vertices (shared with geometry shader max_vertices)
 - layout qualifiers for vertex spacing, vertex order, point mode, and primitive type
 - link semantics for layout qualifiers

Still TBD:
 - patch qualifier and arrayed input handling
 - sizing of gl_out[]
 - additional semantic checking
 - supporting the extension on version 150

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24468 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-11 18:57:40 +00:00
John Kessenich
319de233dc Add a versioning system and tie it to the -v command-line option. System is described in glslang/Include/revision.template.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24314 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-04 04:43:40 +00:00
John Kessenich
bf63ef05d9 Add GetEsslVersionString() and GetGlslVersionString().
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24054 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-14 00:16:43 +00:00
John Kessenich
c999ba2816 Complete hook up all the compile/link errors to the command-line exit status. (Also, an updated test left from the last check-in.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23961 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-07 23:33:24 +00:00
John Kessenich
b0a7eb599b Stop emitting the "#version missing" warning, and hook up the existing "suppress warnings" to a command-line option (-w).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23952 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-07 17:44:20 +00:00
John Kessenich
11f9fc7247 Add and partially implement an interface for doing uniform reflection. It includes an AST traversal to identify live accesses.
It does not yet correctly compute block offsets, give correct GL-API-style type values, or handle arrays.

This is tied to the new -q flag.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23938 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-07 01:06:34 +00:00
John Kessenich
c36e1d8e51 Interface and naming improvements:
- the new C++ style interface now stands on its own, with the addition of glslang::InitializeProcess() and glslang::FinalizeProcess()
 - more "global" pool names from a decade ago are fixed to be thread names
 - StandAlone.cpp fully uses one of the old-style interface or new C++ style interface


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23851 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-01 17:41:52 +00:00
John Kessenich
5b0f13acbc Include per-shader and per-program pools in the new C++ interface to glslang. (And picked up missing test result from previous check in.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23844 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-01 03:08:40 +00:00
John Kessenich
ea869fb403 Improve preprocessor by using GLSL scanner, allowing read-only strings to be compiled, unifying of line # tracking, and correct detection that ES #version appeared after a comment.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23721 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-28 18:12:06 +00:00
John Kessenich
284231c9c5 Add built-in constants through version 440. Some still need to be consumed when initializing the symbol table.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23634 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-22 01:50:39 +00:00
John Kessenich
e7c59c187c Add all built-in variables for all versions/profiles/stages of GLSL. Also, made more readable; declarations are cut and paste from the specs, with quotes around them. This does not include built-in constants yet (other than MaxClipDistances), just the non-constants.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23551 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-16 22:28:35 +00:00
John Kessenich
4c70685382 Memory management hygiene: Use compare() instead of substr(), and put a few more things intrinsically in the memory pool.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23467 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-11 16:28:43 +00:00
John Kessenich
a5830dfc0e Add the following ESSL 2.0 (#version 100) limitations to the configuration file, internal infrastructure, and test cases. Still need to implement the actual detection of non-inductive loops and array accesses. While and do-while loop detection is done.
nonInductiveForLoops
whileLoops
doWhileLoops
generalUniformIndexing
generalAttributeMatrixVectorIndexing
generalVaryingIndexing
generalSamplerIndexing
generalVariableIndexing
generalConstantMatrixVectorIndexing


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23323 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-02 05:10:48 +00:00
John Kessenich
05a7063007 Add optional configuration file for specifying (existing) limits. Details explained by usage statement. More limits to be added in the future.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23105 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-17 19:26:08 +00:00
John Kessenich
38f3b890de Ensure the shared symbol table levels are read-only to make multi-threading safe. Also removed inadvertent extra copies of the symbol table shared across all stages.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22939 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-06 19:52:57 +00:00
John Kessenich
69f4b517c2 Add link validation infrastructure for multiple compilation units per stage. Includes a new, straightforward, C++ interface to the front end.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22927 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-04 21:19:27 +00:00
John Kessenich
94a81fbd31 Option rationalization and minor clean up.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22907 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-31 02:41:30 +00:00
John Kessenich
b603f918a4 Put all glslang internals (but not the external interface) into the glslang namespace.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22882 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-29 00:39:25 +00:00
John Kessenich
c027579631 Put in infrastructure for tessellation, geometry, and compute stages, and partially flesh out with built-in functions.
Added the built-in functions EmitVertex(), EndPrimitive(), barrier(), memoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(), memoryBarrierImage(), memoryBarrierShared(), and groupMemoryBarrier().

Have not added any new built-in variables.

Also changed the linear performance relateToOperator() to a high-performance version.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22659 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-09 17:14:49 +00:00
John Kessenich
4586dbdc1b Track expected test results and add more README information.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22602 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-05 15:52:03 +00:00
John Kessenich
54f6e5661d Set up infrastructure for installing an executable. Changes the standalone name to glslangValidator.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22593 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-03 00:04:10 +00:00
John Kessenich
ee6a9c8ba8 Make previous check in compile correctly on linux.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22568 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-31 23:19:17 +00:00
John Kessenich
2b07c7e70a Improve multi-threading and move Standalone to a multi-threading model (currently off though).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22565 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-31 18:44:13 +00:00
John Kessenich
e0ab8db923 Final linux tweak.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22294 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-08 21:50:31 +00:00
John Kessenich
3a05b78826 A few linux improvements/fixes for the previous check in.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22292 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-08 20:51:29 +00:00
John Kessenich
db4cd54dac Handle bad input file.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22194 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-26 22:42:55 +00:00
John Kessenich
e5f80b8054 Remove the -a option, it doesn't belong here.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22166 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-25 18:31:47 +00:00
John Kessenich
41cf6b540b Add scanner that can find '#version' across an array of non-null terminated, length-based, strings. Handle the ES error where #version is not the first thing found, while still supporting desktop behavior, and more generally support length-based multiple strings for a single shader.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22165 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-25 18:10:05 +00:00
John Kessenich
52ac67e913 Make the PP report an error on undefined macro in "#if ..." for ES profiles, unless relaxed error checking is requested. Still works as normal CPP on non-ES.
Also, improved error reporting in general for the PP.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21417 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-05-05 23:46:22 +00:00
John Kessenich
09da79e190 Put memory counter stuff in #ifdef _WIN32.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21181 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-17 19:34:23 +00:00
John Kessenich
8df53cc057 Rationalize command-line options: controlling memory leak testing, AST output, and info log output.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21141 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-14 19:23:50 +00:00
John Kessenich
0108aa1183 Minor changes: remove use of 'auto', plug obscure memory leak, update copyright.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21136 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-12 16:50:28 +00:00
John Kessenich
b51f62c573 Add the GL_ES macro for ES personalities, along with a general mechanism for adding preambles in front of shaders without effecting line numbers, etc.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21122 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-04-11 16:31:09 +00:00
John Kessenich
d7c120f16f A few trivial things, including removing '/' as a command line option indicator so absolute paths work naturally.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20839 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-12 17:52:59 +00:00
John Kessenich
cfd643e447 Another round of gcc/g++ fixes.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20819 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-08 23:14:42 +00:00
John Kessenich
37827023c4 Add warning-suppression flag. Combined with relaxed errors, so an enum can be used instead of many bools.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20818 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-08 19:26:11 +00:00
John Kessenich
4055816bc9 Add compilation mode flags for forward-compatible contexts and relaxed error checking. These initiate as arguments to ShCompile() and both default to being off.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20817 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-08 18:49:22 +00:00
John Kessenich
1f2a36bd6b Add ES 300 matrix operations: outerProduct, determinant, inverse, and transpose, and missing ES 300 limit gl_MaxFragmentInputVectors.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20643 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-20 04:42:42 +00:00
John Kessenich
bd0747d6f0 Built-in symbol tables now lazily evaluated, and driven by per version, per profile input. Got all ES 100 and ES 300 built-in symbols correct.
This includes
 - doing prescan of shader to know version/profile before parsing it
 - putting precision qualifiers on built-in ES symbols
 - getting most built-in state correct for core/compatibility/missing profile
 - adding gl_VertexID and gl_InstanceID, among other ES 300 built-in symbols
 - adding the ES 300 gl_Max/Min constants
 - accepting shaders that contain nothing but whitespace without generating an error


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20627 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-17 06:01:50 +00:00
John Kessenich
54d8cda95e Pass 1 at building on linux: remove compile errors from machine independent.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20536 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-11 22:36:01 +00:00
John Kessenich
dadf945fd7 Simultaneously fix only known memory leak and take the next step in supporting arrays of arrays. Improved several minor things along the way.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20514 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-11 00:54:44 +00:00
John Kessenich
38c507e75a Make the default version be 100.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20509 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-08 18:56:56 +00:00
John Kessenich
9fd55bd338 Add a new shader-versioning infrastructure capable of handling multiple profiles, desktop/ES, many versions, features coming and going in different versions across different profiles, and extensions.
NB: *Use* of this infrastructure is so far only skeletal.

Fixed a few typos and minor issues along the way.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19951 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-13 00:05:26 +00:00
John Kessenich
e95ecc54fa 1) Improve error recovery from arrays sized with a non constant. 2) Add double vectors to the lexer. 3) Default to vertex shaders for unrecognized file name suffixes.
Also fix issue where the keyword "shared" conflicts with the layout qualifier identifier "shared" by allowing the keyword in the layout qualifier identifier list.



git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19948 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:34:14 +00:00
John Kessenich
e320a1854b Remove the pack/unpack languages and bring grammar up from 1.1 to 4.2 and fix the affected 1.1 productions and semantics to still work correctly for 1.1 shaders.
For 4.2, largely, it is only the grammar that is working.  Productions and semantics are mostly missing.  Lexical analysis is mostly done, but not in the preprocessor, which still can't handle uint and double literals.

The grammar and token names are reorganized to match the specification, to allow easier comparison between the specification and the working grammar.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19946 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:23:55 +00:00
John Kessenich
200b2734d7 Bring up to date with VS 10 express.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19945 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:21:23 +00:00
John Kessenich
a0af473a8b Create a base GLSL front-end from the 3Dlabs glslang front-end from 20-Sep-2005.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19944 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:15:54 +00:00