Focus was on the front end (not SPIR-V), minus the grammar.
Reduces #ifdef count by around 320 and makes the web build 270K smaller,
which is about 90% the target size.
The grammar and scanner will be another step, as will the SPIR-V backend.
This makes heavy use of methods #ifdef'd to return false as a global way
of turning off code, relying on C++ DCE to do the rest.
with subgroup touch tests (error and non-error cases)
Currently the subgroup built-ins are NOT giving the correct output.
This is fixed in the next commit.
with subgroup touch testing (error and non-error cases)
Add missing symbolTable.relateToOperator("subgroupMemoryBarrierShared") call for
Mesh/Task shaders so they don't assert in ParseHelper.cpp
(and GL_NV_shader_subgroup_partitioned) based on GL/ES version
instead of predicating it on vulkan SPV generation
Also add AST testing.
The glsl.450.subgroup* files are largely the same as the spv.subgroup*
The glsl.es320.subgroup* files are the same as the 450 versions, but modified to be ES compatible.
This change adds unary conversion folding when the source is a constant.
This fixes an ISV issue whereby:
```
const float16_t f = float16_t(42.0);
```
Wouldn't compile because the conversion operator would always produce an
EvqTemporary when it could have produced an EvqConst.
I've also added a test case that proves out that all basic-type to
basic-type conversions work.
- Adds a pragma to see binary output of double values (not portable)
- Print decimals that show more values, but in a portable way
(lots of portability issues)
- Expand the tests to test more double values
Note: it is quite difficult to have 100% portable tests for floating point.
The current situation works by not printing full precision, and working around
several portability issues.
There a couple functional problems, which when reduced down also led to
some good simplifications and rationalization. So, this commit:
- corrects "mixed" functionality: int[A] f[B] -> f[B][A]
- correct multi-identifier decls: int[A] f[B], g[C] -> f and g are independently sized.
- increases symmetry between different places in the code that do this
- makes fewer ways to do the same thing; several methods are just gone now
- makes more clear when something is copied or shared
Both debug and release clang builds have segfaulted on recent
changes, non deterministically, while doing the single/multi-thread
test all test files. Removing recent test files, to see if it gives
a clue.
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.
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.
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.
This is used by OpenGL, but not Vulkan.
Includes:
- atomicCounter, atomicIncrement, atomicCounterDecrement
- atomic_uint layout-offset checking
- AtomicStorage capability
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.