Граф коммитов

717 Коммитов

Автор SHA1 Сообщение Дата
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
John Kessenich cee88e3644 Whitespace in preprocessor results; trying to eliminate differences. 2015-08-16 11:35:30 -06:00
John Kessenich fc9d2708cb Merge pull request #56 from Psybrus/master
Fixed VS2015 build
2015-08-16 11:07:50 -06:00
Neil Richardson c8a96f45f7 Fixed VS2015 build 2015-08-15 08:29:37 -07:00
John Kessenich f99b7dde08 Merge pull request #54 from mknejp/master
SPIR-V: Return undefined values from implicit returns instead of dummy
2015-08-11 14:25:20 -06:00
John Kessenich c54ac79298 Merge pull request #55 from srk-lunarg/v31_type_fixes
Add missing OpTypeSampledImage to prevent unknown type error from SPV…
2015-08-11 14:24:34 -06:00
Steve 3573f2e029 Add missing OpTypeSampledImage to prevent unknown type error from SPVRemapper. 2015-08-11 09:20:14 -06:00
Miro Knejp 28f9b1c28d SPIR-V: Return undefined values from implicit returns instead of dummy
Previously if a non-void function implictly returned, a dummy variable
was created as return value. Now instead it returns the result of the
OpUndef instruction. This better conveys the presence of undefined
behavior to SPIR-V consuming tools (and humans).

It also saves one ID per occurrence...
2015-08-11 03:26:46 +02: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 6726cccc91 Add new SPIR-V 31 files. 2015-08-06 22:59:24 -06:00
John Kessenich 5e4b1242bf Move to revision 31 of SPIR-V. 2015-08-06 22:55:01 -06:00
John Kessenich e24a74c320 Create last version before going to SPIR-V Revision 31. 2015-08-06 22:22:22 -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 8f1684b7bb, merge pull request 52. 2015-08-06 22:02:24 -06:00
John Kessenich 8f1684b7bb Merge pull request #52 from baldurk/gcc-warn-fixes
Compile fixes for gcc -Wall
2015-08-06 21:03:57 -06:00
John Kessenich 50a40f4e21 Merge pull request #51 from baldurk/size-t-int-warning-fixes
Remove unsigned/size_t downcast (warning when building on x64)
2015-08-06 20:43:13 -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
baldurk 36a78b5541 Remove unsigned/size_t downcast (warning when building on x64) 2015-08-05 20:25:55 +02:00
John Kessenich 0718e45c24 Merge pull request #50 from google/remove-unused-code
Remove unused members from TPpContext
2015-08-05 12:07:48 -06: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
John Kessenich d618070ab0 Merge pull request #46 from google/include-directive
#include directive support
2015-08-05 10:29:23 -06: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
John Kessenich 61d7d7ad73 Revisioning: Include GLSL.std.450 version. Also, the revision.h script now includes redirection to revision.h. 2015-08-03 12:04:56 -06:00
John Kessenich 0da9eaabe8 Version reporting: Restart active use of revision.h, now based on a git tag.
The new make-revision script regenerates glslang/Include/revision.h,
used as it always has been, but made with a git-tag version and the
the number of commits on master.

I have a pre-commit hook that will automatically do this on master,
likely often enough to work in practice, without needing pull requests
to include it.
2015-08-02 10:21:10 -06:00
John Kessenich e766fac3ea Merge branch 'master' of https://github.com/KhronosGroup/glslang 2015-07-31 21:22:43 -06:00
John Kessenich 14dec5300c Update Linux binary 2015-07-31 21:20:53 -06:00
John Kessenich 1a08b48866 Update Window's binary 2015-07-31 21:15:54 -06: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
Lei Zhang 2b4ebbb1e1 Update scanner in TParseContext when changing the input stream.
After parsing a #include directive, we push a TokenizableString
which contains the content of the included file into the input
stack. Henceforth, tokens will be read from the newly pushed
TokenizableString. However, the scanner in TParseContext still
points to the previous input stream. We need to update the scanner
to point to the new input stream inside TokenizableString. Thus,
the setCurrent{String|Line|..} method in TParseContext updates
the status of the correct input stream. After finishing the newly
pushed TokenizableString, we need to restore the scanner to the
previous input stream.
2015-07-31 19:41:19 -04:00
Lei Zhang 9c1280b225 Use extension framework to enable #include directive.
This patch introduces a new extension, GL_GOOGLE_include_directive,
to enable support #include directives. It depends on the extension
GL_GOOGLE_cpp_style_line_directive.
2015-07-31 19:41:19 -04:00
Dejan Mircevski 7be4b8282d Add #include processing to glslang (though turned off by default).
When an include directive is recognized by the preprocessor, it
executes a callback on the filepath argument to obtain the file
contents.  That way the compilation client can deal with the file
system, include paths, etc.

Currently only accepts quoted filepaths -- no angle brackets yet.
2015-07-31 19:41:18 -04:00
John Kessenich 1363fcd60b Merge pull request #45 from google/source-string-name
Add mechanism for specifying names for source strings.
2015-07-31 17:38:27 -06:00
Lei Zhang 1719fb207a Add mechanism for specifying names for source strings.
Expose a new method setStringsWithLengthsAndNames() in the interface
which allows the caller to set descriptive names for source strings.
These names can be used in error messages.
2015-07-29 09:59:04 -04:00
John Kessenich b9e5424792 Non-functional: Slight change to the Google #include implementation to separate it from AEP. 2015-07-28 19:01:16 -06:00
John Kessenich d9b89d3e9a Merge pull request #43 from google/cpp-style-line-directive
Extend the syntax of #line and __FILE__ to support filename strings.

The implementation is done via introducing a new extension 
GL_GOOGLE_cpp_style_line_directive using the extension framework.

The purpose is to support cpp-style #line directives, which is
required by #include.
2015-07-28 18:55:44 -06:00
Lei Zhang 54e47cc275 Use const reference for TSourceLoc in interfaces. 2015-07-28 12:45:41 -04:00
Lei Zhang 780a2f4426 Use requireExtensions() to check extension and turn on more tests.
Use requireExtensions() to check GL_GOOGLE_cpp_style_line_directive
is turned on. Add register more tests for running.
2015-07-28 12:21:00 -04:00
Lei Zhang 5011fbebc3 Extend the syntax of #line and __FILE__ to support filename strings.
According to the GLSL spec, the second parameter to #line should be
an integer source string number and __FILE__ will be substituted
with the integer source string number currently processed. This
patch extends the syntax of #line and __FILE__. Now #line accepts
as the second parameter a filename string quoted by double quotation
marks. And if such a #line is set, __FILE__ will be substituted with
the currently set filename string. The implementation is done via
introducing a new extension GL_GOOGLE_cpp_style_line_directive using
the extension framework.

The purpose is to support cpp-style #line directives, which is
required by #include.
2015-07-27 13:07:52 -04:00
John Kessenich c777fc2c4c Scanning: 1) rationalize end-of-input everywhere, 2) prevent infinite loop at end-of-input, 3) use positive chars.
Fixes issue #25. (char 255 aliased to -1 and missing tests for end of input).

1) All layers of input scanning now share a single EndOfInput value.
This avoids translation of it across layers of encapsulation.

2) Some places looking for end of line were not stopping on EndOfInput.

3) Use of "char" for the input made char values > 127 be negative numbers.
This allowed for aliasing of 255 to -1, etc.  This is fixed by using
unsigned char.
2015-07-27 09:37:55 -06:00
John Kessenich 91b977e172 Issue #39: Prevent problem of inserting a zero-length symbol after cascading errors. 2015-07-25 18:14:09 -06:00
John Kessenich aead93aafd Preprocessor: Allow '\' as a token, which gets actual use in #error, but should have no other use.
This is just for '\' that's not before a new line.
Note the specification says it has no use other than as line continuation,
but #error is a grey area. (There are no escape sequences.)
2015-07-25 17:34:32 -06:00
John Kessenich f330f08129 Consolidate all token length limits (1024), including one bad one (80) hardcoded on the stack (issue #40, issue #41). 2015-07-25 14:02:53 -06:00
John Kessenich 1070e629a9 Merge pull request #44 from fkaa/osx-const-key-fix
Fix missing const qualifier on TUnorderedMap template type
2015-07-25 12:51:02 -06:00
Felix Kaaman 09d16c3ec1 Fix missing const qualifier on TUnorderedMap template type 2015-07-25 16:31:50 +02:00
John Kessenich 2b3442ada1 Portability: Make previous merge work with MSVS 2012. 2015-07-24 15:15:55 -06:00
John Kessenich b159bd5821 Merge pull request #38 from google/preprocessing-line-number
Preprocessing line number handling
2015-07-24 15:05:17 -06:00