John Kessenich
62aa5bdfca
AST -> SPV testing: Update test for using new TbdFunctionality() that is non-fatal and uniquifies printed TBDs.
2015-07-23 10:25:20 -06:00
John Kessenich
426394d0c8
AST -> SPV: Add basic atomic_uint and atomic*() built-in function functionality.
2015-07-23 10:22:48 -06:00
John Kessenich
917ec4ac8c
Front-end atomics: Finish adding atomic built-in functions (non-image) into the AST.
2015-07-22 19:58:15 -06:00
John Kessenich
96d8042a64
Merge pull request #31 from google/explicit-extension-directive
...
Only output explicit extension directives in preprocessing.
2015-07-22 15:20:54 -06:00
John Kessenich
12a383379c
Issue 32: Guard against constructors consuming unsized arrays.
2015-07-22 11:44:59 -06:00
John Kessenich
f498400945
Merge pull request #33 from google/spv-builder-loop-ctor-inits-all-members
...
spv::Builder::Loop constructor inits all members.
2015-07-22 11:39:29 -06:00
David Neto
3e6a33cedf
spv::Builder::Loop constructor inits all members.
...
After construction, the Loop is effectively const.
This perturbs the IDs in SPIR-V tests because the body block
is created before generating any of the loop code, rather than
only when the body is first referenced.
2015-07-22 12:24:21 -04:00
John Kessenich
8ba301c7c2
Issue #28 : Correctly handle a single input argument conversion when the input argument is an aggregate.
2015-07-21 16:00:34 -06:00
Lei Zhang
1d2996db68
Only output explicit extension directives in preprocessing.
...
Preprocessing output shouldn't contain extensions enabled as
dependencies.
2015-07-21 17:47:47 -04:00
John Kessenich
efb8461722
Issue #26 : Detect empty array constructors, require at least on operand.
2015-07-21 14:35:39 -06:00
John Kessenich
37e8337958
Merge pull request #22 from google/structured-do-while
...
Generate correctly structured do-while loops.
2015-07-20 22:14:38 -06:00
John Kessenich
d2762564dc
Preprocessor: Prevent (and give an error on) expression division by 0.
2015-07-20 12:29:41 -06:00
John Kessenich
e9022e1ffe
Tests: Increase testing around incorrect use of block names and instances.
2015-07-20 12:03:04 -06:00
John Kessenich
2b4b9bd65b
Front-end: Add error-recovery code for a switch statement that ends with a case/default that has no statements.
2015-07-18 11:13:14 -06:00
David Neto
c22f37cfb4
Generate correctly structured do-while loops.
...
The loop test is always emitted before the loop body.
For do-while loops, use a phi node to track whether we're
on the first loop iteration, and only check the loop test
on the second and subsequent iterations.
For do-while loops, the loop test branch no longer occurs
at the top of the loop, so it must get its own selection
merge instruction.
A block can't be the target of more than one merge instruction.
So when the loop test executes after the body (as in do-while in GLSL)
we need to introduce a dummy block to be the target of the selection
merge just before the loop test conditional branch.
The other arm of the branch exits the loop and hence is the
"break block" exception in the structured control flow rules.
2015-07-17 17:51:51 -04:00
John Kessenich
e3933d684d
Front-end: Implement GL_OES_gpu_shader5.
2015-07-15 19:42:59 -06:00
John Kessenich
279012d8c4
Merge pull request #16 from google/pp-directive
...
Preprocessing directive handling
2015-07-14 19:36:29 -06:00
John Kessenich
fdfa6bbdfe
Front-end: enforce qualifiers that cannot appear on block declarations.
...
Also seems to pick up some white-space (line-ending) test differences with a
prevoius checkin.
2015-07-14 19:30:11 -06:00
Andrew Woloszyn
aae1ad8296
Added error output to the preprocessor.
...
This patch distinguishes preprocessing errors with normal parsing
errors and gives glslangValidator the ability to output preprocessing
errors.
2015-07-14 16:02:25 -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
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
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
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
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
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
John Kessenich
453bb26ef5
glslang AEP: The extension scheme, extension-enabled stage-existence testing, and compute-shader interface. Still needs in/out blocks, unsized arrays, etc. before real testing can be done.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31479 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-12 05:01:25 +00:00
John Kessenich
92993c5e2f
glslang tests: Update test result from test-file change.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31288 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-25 22:14:41 +00:00
John Kessenich
06e1d0b434
glslang -> SPV: Improvements in swizzles on access chains: Bug 14007 (wrong type), simplications, tests, support mixed swizzle with dynamic component selection.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31277 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-22 21:57:58 +00:00
John Kessenich
6b3fd19d89
glslang -> SPV: add decorations for built-ins that are inside blocks.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31266 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-22 01:53:15 +00:00
John Kessenich
ea543986f9
glslang -> SPV: translate the source profile to the SPV source language.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31265 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-22 01:21:31 +00:00
John Kessenich
e61ed59726
glsl -> SPV: fix OpVectorInsertDynamic result type bug.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31262 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-22 00:58:41 +00:00
John Kessenich
40e391184c
glslang -> SPV: Use the new TBuiltInVariable instead of string compares to get the type of SPV built in. Also fixed gl_FragData and gl_PrimitiveIDIn.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31226 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-18 23:25:32 +00:00
John Kessenich
dff18a2be0
glslang: Formally track all built-in variables, right from the beginning, to enable avoiding all textual compares at any subsequent stage in the stack. (To be used in future check ins.)
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31224 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-18 16:45:49 +00:00
John Kessenich
b06127c513
glslang PP: make decimal number parser clearer and add boundary tests. Also, disable the warning for "do {} while (true);"
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31215 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-16 01:15:41 +00:00
John Kessenich
84ea15f444
glslang tests: Add Success/Failed message to summarize results.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31214 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-15 21:54:24 +00:00