Lei Zhang
6aa6d9d3d0
Remove uncessary line break.
...
We output empty lines before processing non-whitespace tokens,
not after done processing them.
2015-07-14 14:39:19 -04:00
Lei Zhang
46ea5396ef
Fix empty line handling in line directive callback.
...
The current line number for the #line directive should be passed
in as parameter to the line directive callback. Without it, we
don't know how many empty lines we should output.
2015-07-14 14:38:14 -04:00
Lei Zhang
5cbc990a0a
Fix line number handling in line directive callback.
...
The line argument passed into the lineCallback function is the
literal value of the first argument of the #line directive.
lastLine in DoPreprocessing() should be updated taking into
consideration the different definitions for #line between specs.
Add a test to reveal the bug.
2015-07-14 14:37:59 -04:00
John Kessenich
3a194f7ba4
Update readme to point to Khronos landing page.
2015-07-13 11:41:06 -06:00
John Kessenich
f98ee23415
Fix incorrect used of snprintf()
2015-07-12 19:39:51 -06:00
John Kessenich
68d78fd31e
Updated command-line options, adding -o for saving binaries, -G for OpenGL SPIR-V validation, -v etc.
...
Old uses should still work as they did before.
Also encapsulated use of these flags during parsing, for the parse context.
Added SPIR-V version to -v.
2015-07-12 19:28:10 -06:00
John Kessenich
b329715caf
Fix clang static analyzer issues, as reported by floooh.
2015-07-11 18:01:03 -06:00
John Kessenich
1f654e1603
Merge pull request #4 from baldurk/relative-include-paths
...
include by relative path, so root doesn't need to be in the search path
2015-07-11 16:41:38 -06:00
John Kessenich
549c2932af
Merge pull request #5 from floooh/fix-clang-warnings
...
Fix for most Xcode/clang warnings on OSX
2015-07-11 16:36:08 -06:00
John Kessenich
73fcdefaac
Add some missing 'const' and texture-op guards, for future change to enum-based texture calls.
...
The infrastructure is in place to not do text comparisons for "texture" ... for deducing type of
texture call. But, it is not yet turned on, as it could break some consumers. Am soliciting
any feedback on that.
See in Initialize.cpp: const bool PureOperatorBuiltins = false; // could break backward compatibility; pending feedback
2015-07-11 13:37:02 -06:00
Andre Weissflog
a5ade51363
Fix most clang warnings
...
- member initializing order in some constructors
- missing default branches in switch-case
- uninitialized variable if switch-case default (uncritical because
program would exit)
- && and || brace warnings in if()
2015-07-11 14:45:57 +02:00
baldurk
42169c5fee
include by relative path, so root doesn't need to be in the search path
2015-07-08 15:27:29 +02:00
John Kessenich
e6f7988ade
Linux build: fix case problem with new file.
2015-07-07 00:53:26 -06:00
John Kessenich
ff5abf34a8
Clear up a C++ compile warning
2015-07-06 21:02:26 -06:00
John Kessenich
e0603a441e
Front-end: move to rational internal array-of-array interfaces and design. (A-of-A is not yet implemented though.)
2015-07-06 21:00:03 -06:00
John Kessenich
dcab977055
docs: Update missing features list
2015-07-06 14:17:11 -06:00
John Kessenich
ec43d0abec
glslang -> SPIR-V: smear scalars for integer (scalar * vector). OpVectorTimesScalar is only for floats.
2015-07-04 17:17:31 -06:00
John Kessenich
9b0d9c8aa4
Use E_ prefix instead of _ for distinguishing extension strings from glext.h
2015-07-03 09:24:46 -06:00
John Kessenich
fd1e048b9c
Merge pull request #2 from nwnk/glext-compatibility
...
Fix incompatibility with <GL/glext.h>
2015-07-03 09:15:03 -06:00
John Kessenich
7867e07631
Merge pull request #3 from fkaa/include-fix
...
Fix SPV include directives depending on root folder name
2015-07-03 09:12:50 -06:00
Felix Kaaman
61deffd92a
Fix include directive depending on root folder name
2015-07-02 15:25:23 +02:00
Adam Jackson
93deac5295
Fix incompatibility with <GL/glext.h>
...
New extensions in glext.h follow the pattern:
#ifndef GL_ARB_texture_rectangle
#define GL_ARB_texture_rectangle 1
#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
#endif /* GL_ARB_texture_rectangle */
Versions.h tries to declare:
const char* const GL_ARB_texture_rectangle = "GL_ARB_texture_rectangle";
Which means, if you've included glext.h before Versions.h, that the
compiler will see "const char* const 1 = ...", and rightly refuse to
continue.
The ham-fisted approach taken here is to rename the variables in
Versions.h with a leading underscore. This does sort of undermine the
comment about "better to have the compiler do spelling checks", but.
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-06-30 10:11:38 -04:00
John Kessenich
1189a7bc4a
Make double underscore "__" an error for ES 300, but a warning for 310.
...
The 310 spec (and desktop specs) have clarified this is a waring, not an
error, but 300 tests still expect an error.
2015-06-29 17:19:17 -06:00
John Kessenich
63cebdb4c2
Building README: Update to CMake information.
2015-06-29 10:42:27 -06:00
John Kessenich
8acc32bd89
Merge pull request #1 from antiagainst/markdown-readme
...
Format README using markdown.
2015-06-29 10:30:13 -06:00
Lei Zhang
65299b9ef0
Format README using markdown.
2015-06-28 18:11:13 -04:00
John Kessenich
140f3df134
Final round for line endings.
2015-06-26 16:58:36 -06:00
John Kessenich
b63263267d
Second round line ending clean up, from fresh round trip.
2015-06-26 16:42:50 -06:00
John Kessenich
d49d524b1c
Add .gitattributes and normalize a few stray file's line endings
2015-06-26 16:29:10 -06:00
John Kessenich
0e7674afa0
Make the "switch-label not followed by statement" warning an error, depending on version.
2015-06-26 12:24:28 -06:00
John Kessenich
add1a4d88d
Add +x to two more scripts.
2015-06-26 10:48:26 -06:00
John Kessenich
2f22291a94
Add +x to two executables.
2015-06-26 00:40:05 -06:00
johnkslang
02ad18a2a6
Make smoother use in GitHub
...
+x bison.exe, remove some extra files in runtests, and ignore more
created files.
2015-06-26 00:12:31 -06:00
John Kessenich
33e075faad
glslang build: force the use of -std=c++11 when building with Clang. David Neto <dneto@google.com>.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31583 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-24 16:05:50 +00:00
John Kessenich
b61b82182f
glslang front-end: Implement AEP *_point_size extensions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31560 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-23 04:14:00 +00:00
John Kessenich
6e76bdc88d
glslang front-end: Full turn-on of AEP tessellation semantics.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31538 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-19 23:03:32 +00:00
John Kessenich
105704eff2
glslang: Finish turn on of AEP geometry shaders for ES 3.1.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31532 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-19 06:28:59 +00:00
John Kessenich
6626cadbad
glslang front-end: Don't emit blank lines for empty info logs. From Andrew Woloszyn <awoloszyn@google.com>.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31531 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-19 05:14:19 +00:00
John Kessenich
2f21fccee9
glslang testing: Remove dependence on testfiles from LunarGLASS.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31512 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-17 16:15:09 +00:00
John Kessenich
ab556eaaea
fix linux ^M issues with previous check-in
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31509 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-17 02:41:51 +00:00
John Kessenich
c555dddd53
glslang preprocessing: Add -E option to print out preprocessed GLSL, and do the work needed to generate a preprocessed stream. From Andrew Woloszyn <awoloszyn@google.com>.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31508 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-17 02:38:44 +00:00
John Kessenich
9288f46b95
glslang front-end: Added a callback mechanism for #line/#pragma/#version/#extension. From Andrew Woloszyn <awoloszyn@google.com>.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31507 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-16 23:08:00 +00:00
John Kessenich
47632b7aaf
glslang front-end: track column numbers (they don't go anywhere yet, just get tracked). Andrew Woloszyn <awoloszyn@google.com>.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31506 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-16 19:49:22 +00:00
John Kessenich
edadf45605
glslang: Add API override of version and profile for testing purposes. From Lei Zhang <antiagainst@google.com>.
...
Add defaultProfile and forceDefaultVersionAndProfile into shader
compilation interface.
forceDefaultVersionAndProfile allows us to force parsing the input
shaders using defaultVersion and defaultProfile, regardless of
the #version directive in input shaders.
These two parameters enables us to programmatically invoke glslang
but specify version and profile from somewhere else like command
line.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31504 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-16 19:01:56 +00:00
John Kessenich
99a3c59fae
glslang tests: Fix error propagation. From David Neto <dneto@google.com>.
...
The problem is that putting the while loop at the end of a pipeline was hiding any errors being generated by those tests. The patch changes the script to use a case statement inside the while loop instead of "grep" on the outside.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31503 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-16 18:40:40 +00:00
John Kessenich
9e41f362a6
glslang AEP: Full semantics for *_shader_io_blocks.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31490 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-15 15:08:41 +00:00
John Kessenich
f6deb6203a
glslang AEP: Geometry shader features nominally working. (Full semantic check and turn on pending.) Also picked up partial tessellation shader interface, shader_io_blocks, and mirrored OES set of extensions functionality.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31487 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-14 21:36:44 +00:00
John Kessenich
e5e0f6e37a
glslang -> SPV: swap arguments as needed for OpVectorTimesScalar and OpMatrixTimesScalar, and check for correct types for those as well as OpMatrixTimesVector, OpVectorTimesMatrix, and OpMatrixTimesMatrix.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31486 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-13 00:48:48 +00:00
John Kessenich
8d64d44c3f
glslang -> SPV: fix degenerate switch topologies (bug 14118).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31485 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-12 22:34:37 +00:00
John Kessenich
93930d6f9a
glslang ES reference: Don't allow std430 on uniform blocks (bug 14095).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31484 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-12 22:09:25 +00:00