Commit Graph

18 Commits

Author SHA1 Message Date
Aaron Muir Hamilton 9028ed204d Check for hexadecimal literals exceeding MaxTokenLength. 2017-10-22 17:55:14 +00:00
Aaron Muir Hamilton dc756a61c8 Preprocessor: Evaluate INT_MIN / -1 to 0.
This division is undefined behaviour which raises SIGFPE on x86.
  Most C++ preprocessors evaluate this silently to 0.
2017-10-18 19:56:19 +00:00
Aaron Muir Hamilton 5313613dd1 Don't try to swizzle void. 2017-10-17 09:04:38 +00:00
John Kessenich 7d67c6cbc2 PP: Fix #1104: Missing check for #if overflow.
Also, rationalized this to generally make it safer and more readable.
It could use a more modern approach, at some point...
2017-10-16 15:29:07 -06:00
David Srbecký 2c5b3d64af Add support for GL_OES_EGL_image_external_essl3 2017-09-05 14:56:26 +01:00
John Kessenich de16e52b25 GLSL: Initiate version GLSL 460, including accept extraneous semicolons. 2017-07-31 03:00:04 -06:00
John Kessenich 53863a3a90 GLSL: Implement version 320 for ES. 2017-07-23 13:54:15 -06:00
John Kessenich 9353f1afab GLSL: Add version-number checking. 2017-07-23 11:49:42 -06:00
John Kessenich faa720f14c PP: Fix issue #426, recover from bad-source macro expansion. 2017-01-02 17:56:08 -07:00
John Kessenich d485e0b710 PP: Implement token pasting for PP identifiers.
Implement token pasting as per the C++ specification, within the current
style of the PP code.
Non-identifiers (turning 12 ## 10 into the numeral 1210) is not yet covered;
they should be a simple incremental change built on this one.
Addresses issue #255.
2016-12-19 09:19:43 -07:00
David Neto 1d3a966106 Gtests can be run on another source tree
The gtest executable accepts a --test-root option to specify
a root directory for test files.  It defaults to the Test directory
in the source tree from which the executable is built.

For example, this lets us run test exectuables built with MinGW on Linux
on a Windows machine with its own copy of the source tree.
2016-10-05 10:28:32 -04:00
John Kessenich 73d4fb5bc5 PP: Fix issue #408: # as last character in macro.
This would look ahead for a second #, for token pasting, and if not
found, backup one token.  This is fine, unless at the end of line,
which would backup the #, rather than the look ahead.
2016-07-30 12:41:35 -06:00
John Kessenich 2d0cc786f3 SPV: Turn on atomic-storage functionality for SPIR-V.
This is used by OpenGL, but not Vulkan.
Includes:
 - atomicCounter, atomicIncrement, atomicCounterDecrement
 - atomic_uint layout-offset checking
 - AtomicStorage capability
2016-07-07 17:40:35 -06:00
Lei Zhang 48e296b18c Remove duplicated tests from the runtests script. 2016-06-28 17:54:07 -04:00
John Kessenich 80cb324ff6 Front-end: Fix issue #146: which versions allow double in/out. 2016-06-05 18:52:05 -06:00
John Kessenich 0f5e3ad23c Fix issue #313: Catch internal attempts to modify built-in symbols that don't exist.
Also beefed up support for running compute shaders is #version 420, but this
work is only partially done.
2016-05-29 18:24:31 -06:00
Lei Zhang d6f0ed2c81 Add support for testing file-based HLSL source code in GTest. 2016-05-16 12:51:13 -04:00
Lei Zhang 414eb60482 Link in Google Test framework.
The existing test harness is a homemade shell script. All the tests
and the expected results are written in plain text files. The harness
just reads in a test, invoke the glslangValidator binary on it, and
compare the result with the golden file. All tests are kinda
integration tests.

This patch add Google Test as an external project, which provides a
new harness for reading shader source files, compile to SPIR-V, and
then compare with the expected output.
2016-03-31 10:31:30 -04:00