1072 Commits

Author SHA1 Message Date
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
John Kessenich
2765749856 Merge pull request #109 from xorgy/add-unary-math-check-for-null-before-dereferencing
In addUnaryMath, check for 'child' being null before dereferencing it.
2015-12-06 10:29:06 -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
8481679f4d Merge pull request #107 from xorgy/fail-init-process-on-init-thread-fail
Fail InitProcess() when InitThread() fails.
2015-12-03 17:57:35 -07: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
John Kessenich
e54dd2330a Merge pull request #105 from phaulos/generic-osinclude
Use generic osinclude.h.
2015-12-03 17:20:24 -07:00
Mark Adams
a3f53e54d2 Fix ordered pointer comparison build warning/error 2015-12-03 15:31:58 -05:00
Aaron Hamilton
ebde046ca4 InitProcess() should fail if InitThread() does. 2015-12-02 07:42:20 +00: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
John Kessenich
dad6408542 Merge pull request #98 from amdrexu/myfix
SPV: Fix an issue related with using CubeArrayShadow for texture()
2015-11-22 23:36:49 -07:00
Rex Xu
71519fe70b SPV: Fix an issue related with using CubeArrayShadow for texture() 2015-11-22 21:43:05 +08:00
John Kessenich
2c03478442 Merge pull request #10 from baldurk/osinclude-common-header
Build: Use common osinclude.h header file that redirects per-platform, remove obsolete build files, enforce relative includes.
2015-11-20 15:49:09 -07:00
baldurk
bc83e64e51 Exclude bison generated files in .gitignore 2015-11-16 23:53:46 +01: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
baldurk
e915da4aee Remove unnecessary include path relative to root 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
John Kessenich
1c77f3a8d2 Merge pull request #88 from mgadams/unistd_removal
Remove obsolete unistd.h file
2015-10-28 17:29:13 -06: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
John Kessenich
40f6f688cd Merge pull request #85 from mgadams/gcc_build_fixes
Various build fixes when using newer GCC versions with warnings enabled
2015-10-26 15:29:10 -06:00
Mark Adams
c11e95f6e5 Various build fixes when using newer GCC versions with warnings enabled
Encountered with GCC-4.7.3 in a build environment where warnings are enabled
and treated as errors.
2015-10-26 12:38:46 -04:00
John Kessenich
fac0d1c72b Merge pull request #82 from mgadams/remove_sprintf
Replace sprintf() usage with snprintf()
2015-10-15 18:30:34 -06:00
Mark Adams
4123a04ca9 Replace sprintf() usage with snprintf()
This fixes compilation in build environments with stricter warnings enabled
2015-10-15 16:16:52 -04:00
John Kessenich
fa540d1414 SPV: Remove accidental inclusion of a test. 2015-10-15 13:55:18 -06:00
John Kessenich
7c1aa1026e SPV: Implement short circuiting of && and || when emitting SPIR-V. 2015-10-15 13:50:48 -06:00
John Kessenich
da581a2b95 GL_ARB_shader_draw_parameters: From @amdrexu, implement extension. 2015-10-14 14:10:30 -06:00
John Kessenich
b5c046e58b Front-end: Fix missing tessellation shader built-in qualifiers.
The gl_in array has a special path due to context-specific
gl_MaxPatchVertices, making the code out of order for tagging built-ins.
This commit moves the tagging to the correct location.
This also fixes issue #80.
2015-10-13 17:23:10 -06:00
John Kessenich
e690332c3c SPV: Add modes for spacing, depth, depth replacing, winding, and point mode. 2015-10-13 16:29:02 -06:00
John Kessenich
f685df8c16 Add comment that was missed in previous commit. 2015-10-13 10:55:08 -06:00
John Kessenich
716312771c SPV constants and constOffsets completion: isConstant() and disassembler to see results.
Expand to full isConstant() implementation.
Fix disassembler to generate texture look-up masks.
2015-10-13 10:45:22 -06:00
John Kessenich
d4a7a8e721 Merge pull request #81 from amdrexu/myfix
Generate correct image operand mask for Offset and ConstOffset(#77) and correct arg # for rect. texelFetchOffset.
2015-10-13 10:04:26 -06:00
Rex Xu
19c6e5919f Fix an issue related with texelFetchOffset 2015-10-12 17:02:21 +08:00
Rex Xu
86e608133c Generate correct image operand mask for Offset and ConstOffset(#77) 2015-10-11 19:37:48 +08:00
John Kessenich
820a22fcc8 Give error for calling a user-defined function at global scope. 2015-10-06 13:11:38 -06:00
John Kessenich
894c1c109f Add another frexp() test. 2015-10-05 10:00:27 -06:00
John Kessenich
eb505e4262 Allow future keywords to be accessed as members in a struct.
This fixes a bug where a token that could be a keyword in one version
is not a keyword in another version, but treated like a non-member after
a "." dereference.
2015-10-02 15:01:53 -06:00
John Kessenich
6373574b13 Front-end: Fix: Cubemap arrays only use 3-component coord when accessed as an image.
4 components are needed when used a texture, but not an image, which multiplies
layers and faces into the same coordinate.  This fixes it from using 4 everywhere,
to only using 4 for textures and 3 for images.
2015-10-01 12:40:48 -06:00
John Kessenich
3cd0024ea8 GLSL front-end: Check recursively for opaque types in a block; these are all illegal. 2015-09-30 18:57:47 -06:00
John Kessenich
ee21fc9081 SPV: Fix missing 'Member' operand to OpArrayLength. 2015-09-21 21:50:29 -06:00
John Kessenich
142d7780a4 SPV 31: Remove obsolete and unused ../SPIRV/GLSL450Lib.h. 2015-09-21 10:39:20 -06:00
John Kessenich
ff4f04dd0e Merge pull request #75 from google/fix-vs2013-debug
SPV non-determinism: Fixed subtle issue that causes tests to fail in VS2013 in some configs.
2015-09-21 10:00:42 -06:00
John Kessenich
f82c661462 SPV: Remove old Rev. 30 header spirv.h (glslang has been using Rev. 31 spirv.hpp). 2015-09-21 08:59:47 -06:00