John Kessenich
5caf936428
Merge pull request #126 from mgadams/win32_warnings
...
Fix several build warnings/error encountered with VS2013
2016-01-13 19:11:05 -07:00
Jason Ekstrand
a76766a434
getBaseAlignment: Use the rowMajor argument for determining matrix strides
...
The argument version is passed in from above and struct handling ensures
that row-majorness gets propagated correctly from one level to the next.
If we just look at the type itself and it's embedded in a struct that's
declared row-major, we may get the wrong stride.
2016-01-13 17:17:39 -08:00
Jason Ekstrand
79b7046a27
getBaseAlignment: Round up structure sizes to max alignment
2016-01-13 17:17:39 -08:00
Andrew Woloszyn
e602d25f09
Removed strcpy that copied to itself.
...
Found by running glslang with -fsanitize=address in clang.
Also fixes a potential buffer-overrun with return from lReadByte.
2016-01-12 15:48:00 -05:00
Mark Adams
364c21c8c0
Fix several build warnings/error encountered with VS2013
...
This also fixes the newlines for spirv.hpp to be consistent with the rest of the files.
2016-01-06 13:41:02 -05:00
Rex Xu
48edadfd24
Parser & SPV: Implement two extensions regarding GLSL sparse texture.
...
Implement extension "GL_ARB_sparse_texture2".
Implement extension "GL_ARB_sparse_texture_clamp".
2016-01-05 16:07:02 +08:00
John Kessenich
4998789d4e
SPV: Fix array strides by explicitly computing them in the getBaseAlignment() algorithm.
2015-12-29 19:20:55 -07:00
John Kessenich
e0b6cad44f
SPV: Generalize multiple struct-type instances for interpolation/invariant qualifiers.
2015-12-24 10:30:13 -07:00
John Kessenich
69d01eadd6
Semantics: Catch nested types containing 'int' with non-'flat' interpolation.
2015-12-22 16:39:07 -07:00
John Kessenich
50e57560a1
SPV: Don't make MissingFunctionality() exit anymore.
2015-12-21 21:21:11 -07:00
John Kessenich
2211835b4d
SPV: Implement composite comparisons (reductions across hierchical compare).
2015-12-21 20:54:09 -07:00
John Kessenich
59420fd356
SPV: Move to deterministic results for OpEntryPoint, for test stability across platforms.
2015-12-21 11:45:34 -07:00
John Kessenich
3ac051e41d
SPV: recursively propagate row/col majorness through nested structures.
...
This includes doing structure uniqueness modulo majorness, for shared nested structures.
2015-12-20 12:25:21 -07:00
John Kessenich
f85e806e44
SPV: Nested layouts: Recursively send around the top-level std140 or std430 packing.
...
This also distinguishes between the same struct included in multiple parent packings.
2015-12-19 15:21:38 -07:00
John Kessenich
a3211bfe72
Merge pull request #120 from amdrexu/bugfix2
...
Parser: Correct the storage qualifier of gl_HelperInvocation.
2015-12-19 11:14:32 -07:00
John Kessenich
297bb3f2d0
Tests for PR: Fix results for 4f68b83ea1b34923a71e699125a9e867003864f6.
2015-12-19 11:05:44 -07:00
John Kessenich
61c47a951b
Constant folding: Correct result type of non-square matrix folding.
...
This also made the function easier to read by identifying
left and right operands more clearly.
2015-12-16 15:50:25 -07:00
Rex Xu
1934506555
Parser: Correct the storage qualifier of gl_HelperInvocation.
2015-12-16 14:41:39 +08:00
Mark Adams
22badee09a
Fix compile warning/error due to assignment in while() loop
...
This causes build failures with -Werror=parentheses
2015-12-14 10:48:04 -05:00
John Kessenich
e7c83cfb8c
SPV GLSL.std.450: Add needed smear operations for min, max, clamp, mix, step, and smoothstep.
2015-12-13 13:34:37 -07:00
John Kessenich
6feb4989fe
SPV texturing: Use comp. 2 as the 3rd comp. for Dref in ImageSampleProjDrefImplicitLod.
2015-12-13 12:23:33 -07:00
John Kessenich
f5ce646546
Fix crash: when no #version for compute shader in es mode.
...
An extra line of error recovery code set a non-sense combination of
es version and core profile.
2015-12-13 11:20:12 -07:00
John Kessenich
61d9fb9048
Semantics: 'invocations' defaults to 1, not 0.
...
'invocations' was using 0 as the "shader never set" flag and as the
default. Formalize this and explicit set to 1 and link time.
2015-12-13 10:59:17 -07:00
John Kessenich
04bb8a01d6
SPV: Implement all matrix operators {+,-,*,/} for {matrix,scalar,vector}.
2015-12-12 12:28:14 -07:00
John Kessenich
494a02a2b0
Semantics: Geometry stage can support max_vertices = 0.
...
To do this, more generally use a named -1 as a not set value.
2015-12-11 17:54:35 -07:00
John Kessenich
3c24a06c8c
SPV tests: Turn on some more tests related to currently pending issues.
2015-12-11 15:08:26 -07:00
John Kessenich
76f7139789
SPV: Modify last merge: Have promoteScalar() generate the correct vectorType.
2015-12-09 19:08:42 -07:00
Rex Xu
e553ace049
Parser: Extension requirement of gl_PrimitiveID and gl_Layer should be checked only for ESSL instead of GLSL.
2015-12-09 15:03:41 +08:00
John Kessenich
e00e72ded1
SPV: Protect getStorageClass() with a test that the thing is pointer.
2015-12-08 20:48:49 -07:00
John Kessenich
33661450c7
SPV: Implement OpImage functionality (emit before query).
2015-12-08 19:32:47 -07:00
John Kessenich
8c1c2ca0d7
Built-ins: fix mapping of packDouble2x32 and unpackDouble2x32.
2015-12-06 19:33:07 -07:00
John Kessenich
2359bd0a1d
SPV: Fix extra operands when using the "struct" form of a built-in taking an 'out' param.
2015-12-06 19:29:11 -07:00
John Kessenich
e721f49dbd
SPV: Distinguish between std140 and std430 layouts, and correctly use alignments as the base for strides.
2015-12-06 19:17:49 -07:00
John Kessenich
dd6ca17845
Semantics: Correct that std430 is universally disallowed with 'uniform'.
2015-12-06 18:10:27 -07:00
John Kessenich
71e04d62a4
Merge pull request #100 from mawww/scanner-optim
...
Scanner optimisations
2015-12-06 17:12:53 -07:00
Aaron Hamilton
af5a123652
In addUnaryMath, check for 'child' being null before dereferencing it.
2015-12-06 01:10:54 +00:00
John Kessenich
c9d6477ee2
Merge pull request #108 from mgadams/extensions_compile_fix
...
Fix ordered pointer comparison build warning/error
2015-12-03 17:56:53 -07:00
John Kessenich
bd0726be34
Build: Fix CMake files to find osinclude.h
2015-12-03 17:46:03 -07:00
Mark Adams
a3f53e54d2
Fix ordered pointer comparison build warning/error
2015-12-03 15:31:58 -05: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
John Kessenich
1be8063e01
Require l-value patch-out indexing to be gl_InvocationID.
...
Also, generally allow ES variable indexing of in/out blocks.
2015-11-28 16:52:25 -07:00
John Kessenich
989df85dcd
Array-sizing bug fix: multiple array initializers of different size in the same declaration.
...
Handles the case of
float[] x = float[] (1.0, 2.0, 3.0),
y = float[] (1.0, 2.0, 3.0, 4.0);
where a shallow copy of the type arrayness from the left-most float[]
was getting used twice.
2015-11-28 12:52:29 -07: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
085371d9d4
SPV testing: Add missing test case.
2015-11-16 09:31:26 -07: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
Maxime Coste
6998987ecf
Avoid costly indirect calls of tStringInput::(un)?getch through TPpContext
...
There is no calls to the TPpContext that could change the current input,
so every calls to pp->getChar and pp->ungetChar ultimately call this->getch
and this->ungetch while adding overhead of virtual calls and vector::back.
2015-11-11 18:24:37 +00:00
Maxime Coste
29051bd148
Avoid creation of temporary std::string when looking up keywords and reserved words
2015-11-11 18:24:37 +00:00
Mark Adams
ea9112e0a5
Remove obsolete unistd.h file
...
The presence of this file can cause build issues when integrating glslang
into other projects.
2015-10-27 14:27:18 -04:00