Граф коммитов

3151 Коммитов

Автор SHA1 Сообщение Дата
John Kessenich 8d2fe45334 Linux abs() needs to be fabs(); a few other minor Linux tweaks.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22603 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-05 16:36: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 41a5918eaa Allow unsigned int in the "location = " grammar, and generally improve recognition of numeric literals to be up to spec.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22597 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-04 23:51:37 +00:00
John Kessenich 161d482312 Add windows executable.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22595 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-03 00:27:08 +00:00
John Kessenich b849c1de5c Add Linux executables
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22594 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-03 00:16:49 +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 53f3cc977d Fix bison file naming issues from upgrading to version 2.7 of bison.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22578 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-01 18:04:50 +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 b40a488e89 Update index.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22513 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-22 22:31:08 +00:00
John Kessenich d7c0c3f49e Push index page now that SVN access is setup.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22512 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-22 22:29:42 +00:00
John Kessenich c4cc787e71 Put on hold pending configuring glslang for public access.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22491 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-22 07:53:37 +00:00
John Kessenich e2c091bdd6 Link glslang project into site nav.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22487 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-22 07:40:27 +00:00
John Kessenich fb4a0b60bf Fix warning in release build. Update to-do list.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22315 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-09 23:57:13 +00:00
John Kessenich d9d5f93da8 Tie missing default-precision error checks to EShMsgRelaxedErrors.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22304 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-09 17:23:39 +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 7213324259 Reframe the preprocessor as a C++ class, with instances, removing all C code, removing all global variables. Upgrade bison version to pass a parse context on through to the preprocessor. All the basic things to make something thread safe.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22291 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-08 19:39:16 +00:00
John Kessenich 5f1a0b7998 Eliminate flex as the GLSL lexical analyzer, going from two nested lexical analyzers down to one, leaving just the preprocessor's lexical analysis. A new layer replaces it, to translate from the preprocessor's view of tokenization to glslang's view of tokenization.
Also:
 - change source locations from an int to TSourceLoc (shader number, line number) throughout
 - various improvements to the preprocessor


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22277 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-06 19:54:21 +00:00
John Kessenich 73ed17a87b Rationalize naming/access to current thread-local-storage scheme. However, the preprocessor tokenizer is not thread-safe, so this may all change.
Also adding missing test.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22249 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-02 20:18:59 +00:00
John Kessenich 1fde51d3fb 1) Don't propagate precision of built-in function arguments to return type when return type is bool (e.g., isnan).
2) Check an additional path for missing default precision qualification, except allow built-in declarations to pass the check.  

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22241 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-01 17:56:24 +00:00
John Kessenich 6c0928d924 Fix bug dropping some qualifiers when merging with block member default qualification.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22240 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-01 04:54:28 +00:00
John Kessenich 69c3d8c1a0 Use the default of "smooth" for interpolation qualification for vertex outs and fragment ins (rather than all fragment IO).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22222 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-28 05:32:15 +00:00
John Kessenich 554c854143 Fix preprocessor memory leak.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22195 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-26 23:41:30 +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 e369bfccfe Semantic checks for .length(), switch/case/default, and multidimensional arrays.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22175 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-26 05:54:40 +00:00
John Kessenich ef84d10e4c Add semantic check for precision qualifier on wrong kind of type. Added a few more tests.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22170 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-25 21:53:59 +00:00
John Kessenich d3f85891a7 Support line-continuation (backslash before newline) for tokens and one-line comments in the preprocessor.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22168 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-25 21:09:47 +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 ebf0825ec4 Add the 6 hyperbolic trig functions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22149 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-24 22:40:19 +00:00
John Kessenich eebed6f60b Disallow variable indexing into sampler array for ES and desktop before version 400.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22148 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-24 21:52:41 +00:00
John Kessenich 01fc0645cb Add semantic checks for order of qualification and repetition within a class of qualifiers.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22145 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-24 21:22:03 +00:00
John Kessenich f5c1075031 Address a g++ complaint.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22143 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-24 18:24:23 +00:00
John Kessenich 06f8464fb5 Create linkage symbol nodes in the AST so a linker has access to all global objects that were declared, for error checking, etc. Use it now for all ins/outs/uniforms as well as gl_VertexID and gl_InstanceID.
Also fixed a confusing name and added more 'const'.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22142 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-24 17:26:56 +00:00
John Kessenich b29ba33089 Fix bug of accidentally overriding initial layout location with 0, which does not mean no location. Added in/out structure tests.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22120 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-21 19:43:44 +00:00
John Kessenich 211cba242b Add grammar productions for the syntax "layout(...) uniform;" for setting global defaults.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22112 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-20 22:54:40 +00:00
John Kessenich 60d9f7a881 Add grammar productions for adding 'invariant' to already declared variables.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22083 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-19 20:44:17 +00:00
John Kessenich 41a36bbb2f Track separate precision defaults for each kind of sampler, give initial defaults as per spec. Also make fragment floats have no default. Modify/add tests to adapt to these changes.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22066 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-19 05:41:25 +00:00
John Kessenich c59d0cd9e6 Encapsulate warnings like errors. Add warning for missing #version.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22041 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-17 21:47:23 +00:00
John Kessenich a622cf2dc5 Fix linux build problem.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22002 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-14 17:32:46 +00:00
John Kessenich f78fff94e9 Implement __VERSION__ macro, make ftransform() non-ES only, add more tests.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22000 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-13 23:56:04 +00:00
John Kessenich fb7044a9a8 Semantic checks: ES doesn't have unsized arrays or noise*().
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21998 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-13 20:16:43 +00:00
John Kessenich 3da5a3267e Add semantic checks for nested blocks/structures.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21960 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-13 00:13:36 +00:00
John Kessenich fd8e101072 Simply compile-time error handling: mostly removed the need to test an error occurred and the need to call recover().
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21959 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-12 22:41:21 +00:00
John Kessenich fbe01520b6 Get all the scoping rules right for ES and non ES, name hiding, built-in overriding, etc.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21948 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-12 06:13:17 +00:00
John Kessenich 3c31bc3289 Fix a linux build issue.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21945 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-11 18:30:26 +00:00
John Kessenich a5cecfc6b6 Add constant folding for the exp*(), log*(), *sqrt(), round*(), floor(), fract(), ceil(), abs(), and sign() built in functions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21927 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-11 00:09:48 +00:00
John Kessenich fddf3ce3a1 Unify constant floats and constant doubles; they can all be constant doubles.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21921 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-10 21:56:23 +00:00
John Kessenich 50a8cabbbb Add constant folding for length(), normalize(), fwidth(), dFdx(), and dFdy().
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21918 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-10 07:37:49 +00:00