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
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
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
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
Rex Xu
19c6e5919f
Fix an issue related with texelFetchOffset
2015-10-12 17:02:21 +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
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
b9cd3996c7
PP: Restore a line of code deleted by commit bb63bd5e3792455b77ce93e471158bed0cc884f0.
2015-09-16 18:23:20 -06:00
Rex Xu
bba5c80957
Merge master branch from upstream
2015-09-16 13:20:37 +08:00
John Kessenich
2398b3a458
Full stack: implement textureQueryLod(*) and textureQueryLevels(*).
2015-09-15 19:38:56 -06:00
Rex Xu
30f9258d5e
Merge master branch from upstream
2015-09-14 10:38:56 +08:00
John Kessenich
9312269d09
Front-end Arrays of arrays: Add ES-specific checks and tests. AoA should be quite close to done now.
2015-09-11 15:25:38 -06:00
John Kessenich
68e1c454da
Merge pull request #60 from xorgy/no-define-defined
...
Preprocessor: 'defined' cannot be used as a macro name in #define or #undef.
2015-09-09 15:45:23 -06:00
Rex Xu
fc6189197d
SPIRV: Add the support of missing image functions #72
2015-09-09 16:42:49 +08:00
Rex Xu
0c81156c2d
SPIRV: Fix a comment issue
2015-09-06 14:55:45 +08:00
John Kessenich
c8b2e36f52
Implement GL_KHR_blend_equation_advanced.
2015-08-30 05:43:51 -06:00
Aaron Hamilton
7d3b73bfff
'defined' cannot be used as a macro name in #define or #undef.
2015-08-29 23:15:13 +00:00
John Kessenich
d6c37b190b
GL_OES_shader_multisample_interpolation: Include scalar swizzles as valid for interpolateAt*.
2015-08-22 16:54:35 -06:00
John Kessenich
0fc4338f3e
Implement GL_OES_shader_multisample_interpolation, as well as core desktop versions of it.
2015-08-22 13:11:12 -06:00
John Kessenich
ba01ebd5ba
Link-check fix: Don't include built-in variables in the fragment output ES rule:
...
"No layout(location=) is required if there is only one output" should not count
built-in variables like gl_SampleMask. This is fixed.
2015-08-21 09:19:52 -06:00
John Kessenich
78258d3d40
Fix misspelled EOpFrexp and EOpLdexp.
2015-08-19 17:30:12 -06:00
John Kessenich
fc51d284aa
Backward incompatible: Turn on PureOperatorBuiltins: use only enum-based built-in functions in the AST.
...
If this breaks your AST consumer, best is to modify it to test
against the enum values instead of doing string comparisons on
built-in function names. This is the reason the change was made.
If you need the old behavior, you should be able to get it back by changing
PureOperatorBuiltins to be false instead of true. This path will work for
a while, but is marked deprecated.
Also, the old behavior is tagged as release 2.4.
2015-08-19 13:43:25 -06:00
John Kessenich
ef676b0a59
Front-end "pure" built-in TOperator: Finish adding full support, but still turned off.
...
This is to avoid all need to do text comparison of built-in function names
when consuming the AST. All built-in functions get enumerants.
Will want to turn on soon. See PureOperatorBuiltins. See issue #8 .
2015-08-18 23:17:15 -06:00
John Kessenich
e88217b7d8
Add more TOperator: fma/frexp/ldexp, AddCarry/SubBorrow/MulExtended/Bit*/Find*, (un)pack4x8/2x32, ftransform.
...
Also corrects some existing ones missing the "Op" part of their name.
2015-08-18 22:27:23 -06:00
John Kessenich
156af43c25
Merge pull request #57 from google/glslang-android
...
Fixes for compiling glslang on Android.
2015-08-17 10:27:11 -06:00
Andrew Woloszyn
8b64fa5474
Fixes for compiling glslang on Android.
...
Primarily fix is due to Android not supporting std::to_string().
2015-08-17 11:39:38 -04:00
John Kessenich
fb5ba510ca
Implement GL_OES_shader_image_atomic.
2015-08-16 23:40:15 -06:00
John Kessenich
556ab3ac96
Implement GL_OES_sample_variables.
2015-08-16 21:55:59 -06:00
John Kessenich
a39159a192
Implement GL_OES_texture_storage_multisample_2d_array.
2015-08-16 21:10:38 -06:00
John Kessenich
2b0a11351f
Fix two multi-sample bugs: 1) include MS in name mangling, 2) add 'sample' argument texelFetch(*MS*,...).
2015-08-16 21:04:07 -06:00
John Kessenich
dc9eff7221
Implement GL_OES_texture_cube_map_array.
2015-08-16 14:21:20 -06:00
John Kessenich
302b46aebc
Implement GL_OES_texture_buffer.
2015-08-16 13:11:01 -06:00
John Kessenich
30314590ff
Implement GL_OES_primitive_bounding_box.
2015-08-16 12:09:15 -06:00
Neil Richardson
c8a96f45f7
Fixed VS2015 build
2015-08-15 08:29:37 -07:00
John Kessenich
65c78a0b62
Array of array: Implement the core functionality: types, constructors, operations.
...
There will be subsequent commits to refine semantics, esp. version-specific semantics,
as well as I/O functionality and restrictions.
Note: I'm getting white-space differences in the preprocessor test results,
which I'm not checking in. I think they need to be tagged as binary or something.
2015-08-10 17:08:55 -06:00
John Kessenich
b35483587f
Array of Array prep: Turn a batch of 0's into nullptr or UnsizedArraySize.
...
Added some const as well. This will remove camouflage of the next commit,
which will add the bulk of Array of Array semantics and functionality.
(Note the basic grammar and data structure is already in place.)
2015-08-09 18:15:25 -06:00
John Kessenich
3473a4b98f
Merge pull request #53 from google/get-string-name-or-num
...
Add getStringNameOrNum() in TSourceLoc.
2015-08-06 22:06:34 -06:00
John Kessenich
306695360d
Fixes to 8f1684b7bb881813365efd013b05bc0900a52a0c, merge pull request 52.
2015-08-06 22:02:24 -06:00
Lei Zhang
bb63bd5e37
Create a new method to return string name or number to DRY code.
2015-08-06 15:24:56 -04:00
baldurk
d7c5ead6a1
Compile fixes for gcc -Wall
2015-08-05 21:04:23 +02:00
David Neto
1ee1f88b40
Remove unused members from TPpContext.
...
The ErrMsg and ifloc members were unused or had no effect.
2015-08-05 13:15:27 -04:00
Lei Zhang
484bb12703
Create a new ppRequireExtensions method for preprocessor.
...
Now extensions required by preprocessor should be checked via
the ppRequireExtensions method. This is more clear and coherent
with the rest of the code.
2015-08-05 11:56:14 -04:00
Lei Zhang
1eed969b2d
Output wrapping #line directives for included content.
...
Also changed the includer interface to let it return the actual
full path of the included file.
2015-07-31 19:41:19 -04:00