Commit Graph

9 Commits

Author SHA1 Message Date
U-NVIDIA.COM\rjennings
9cd7ca26a2 PP: Don't report certain error about '#' when #if'd out
Don't report the following error when scanning inactive code (e.g. code inside #if 0):
"error: '#' : (#) can be preceded in its line only by spaces or horizontal tab"
Adds a variable to PpContext to say whether we're currently skipping over an inactive #if/#ifdef/#elif/#else, and don't report the error inside scanToken if true.

fixes 3704
2024-09-02 13:35:09 -04:00
Nathaniel Cesario
b0df68c490 Add support for GL_ARB_shading_language_include
Add support for GL_ARB_shading_language_include. Usage is identical to
the way GL_GOOGLE_include_directive currently works glslang (since
GL_ARB_shading_language_include is inherently a runtime feature and
glslang is an offline compiler).

Users can simulate their runtime environment by using a custom
glslang::TShader::Includer or using filenames that match their GL
runtime names.

Closes #249.
2024-02-27 18:26:46 -05:00
johnkslang
23f3bdfea1 Build/Test: Dropping 2013 allows using the latest googletests.
These have a new spelling: INSTANTIATE_TEST_CASE_P -> INSTANTIATE_TEST_SUITE_P
2020-08-05 11:07:07 -06:00
otakuto
d03da06ac1 Remove execute permissions 2018-08-07 03:16:20 +09:00
John Kessenich
802c62bca4 PP: Rationalize return values of MacroExpand.
This results in better error recovery, including fewer
crashes on badly formed PP input.
2018-07-02 13:47:31 -06: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
Lei Zhang
48e296b18c Remove duplicated tests from the runtests script. 2016-06-28 17:54:07 -04: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