John Kessenich
64285c9e69
Non-functional: Very minor clean up.
2017-01-05 10:45:32 -07:00
John Kessenich
085b833490
HLSL: Fix issue #658 : Don't adopt initializer constness from declaration.
...
This also makes it match how GLSL handles the same thing.
2017-01-05 10:28:26 -07:00
John Kessenich
affc26674d
PP: Recognize <> style #include header names. I.e., #include <header-name>.
...
Also correctly test and handle missing newline.
2017-01-03 11:05:16 -07:00
John Kessenich
faa720f14c
PP: Fix issue #426 , recover from bad-source macro expansion.
2017-01-02 17:56:08 -07:00
John Kessenich
bc5196c003
SPV: Fix issue #369 , don't support gl_NumSamples -> SPIR-V.
2017-01-02 17:01:21 -07:00
John Kessenich
f37f4d23fc
HLSL: Fix issue #646 : map SV_DispatchThreadID -> GlobalInvocationID.
2017-01-02 14:59:19 -07:00
John Kessenich
53864846a9
HLSL: Support empty {} initializers for arrays and scalars.
2016-12-30 16:39:18 -07:00
John Kessenich
f48faec3ee
PP: Non-functional: Make a proper class out of the atom <-> string mapping.
2016-12-21 13:49:16 -07:00
John Kessenich
224b1f733b
PP: Support operator creation with token pasting.
2016-12-21 12:32:56 -07:00
John Kessenich
0c4b7c931a
PP: Rationalize names of tokens.
2016-12-21 11:55:53 -07:00
John Kessenich
907aabb6b0
PP: Non-functional: Only use string <-> atom mapping when needed.
...
Also, eliminate the 'atom' field of TPpToken.
Parsing a real 300 line shader, through to making the AST, is about 10% faster.
Memory is slightly reduced (< 1%).
The whole google-test suite, inclusive of all testing overhead, SPIR-V generation,
etc., runs 3% faster.
Since this is a code *simplification* that leads to perf. improvement, I'm not
going to invest too much more in measuring the perf. than this. The PP code is
simply now in a better state to see how to further rationalize/improve it.
2016-12-20 23:36:05 -07:00
John Kessenich
1fbb9c1430
PP: Non-functional: clean up, simplify, completely identical operation.
2016-12-20 18:36:49 -07:00
John Kessenich
bfff871dad
PP: Add missing i64val code.
...
Also, checking both 'atom' and 'name' is redundant, and I'm hoping to
eliminate more atom stuff.
2016-12-19 17:46:20 -07:00
John Kessenich
432576fdce
Build: Fix #633 , add missing overrides.
2016-12-19 14:43:42 -07:00
John Kessenich
d485e0b710
PP: Implement token pasting for PP identifiers.
...
Implement token pasting as per the C++ specification, within the current
style of the PP code.
Non-identifiers (turning 12 ## 10 into the numeral 1210) is not yet covered;
they should be a simple incremental change built on this one.
Addresses issue #255 .
2016-12-19 09:19:43 -07:00
John Kessenich
abf5057948
Fix comment typo.
2016-12-16 17:11:18 -07:00
John Kessenich
1e275c8486
HLSL: More robust handling of bad shader input, catching a few more things.
2016-12-14 17:02:32 -07:00
John Kessenich
20f01e7fd0
Fix last commit; EOptionKeepUncalled incorrect enum bug.
2016-12-12 11:41:43 -07:00
John Kessenich
906cc21816
Linker: Eliminate uncalled functions, because they can be ill-defined.
...
Fixes issue #610 . Also provides a testing option to keep uncalled functions.
2016-12-09 19:22:20 -07:00
John Kessenich
bf6d7f43fd
Linker: Track the mangled entry-point name along with the non-mangled one.
2016-12-09 17:29:07 -07:00
John Kessenich
4b6ce415ef
GLSL Linker: Track entry point across compilation units.
...
This wasn't needed until the recent generalization of "main" to "entry point",
so makes some HLSL-specific code be generic now, for GLSL functional correctness.
2016-12-09 17:14:27 -07:00
John Kessenich
6a60c2f9ea
Linker: Walk the call graph to report an error on missing bodies.
2016-12-08 23:22:21 -07:00
John Kessenich
9df6aa5361
GLSL: Allow desktop shaders to call functions from outside main().
...
Fixes issue #239 .
2016-12-05 21:36:48 -07:00
John Kessenich
fb06e9552e
Don't print the "Linked stage" message unless the AST is being dumped.
2016-12-03 13:59:51 -07:00
John Kessenich
21b11f4cc1
Merge branch 'intrinsic-promotion' of https://github.com/steve-lunarg/glslang into steve-lunarg-intrinsic-promotion
2016-12-03 13:27:22 -07:00
John Kessenich
8ce6e2ba49
Fix non-Windows build error.
2016-11-27 23:00:14 -07:00
John Kessenich
f97f2ce603
HLSL: Support the constructor idiom "(struct type)0".
...
This highly leverages the previous commit to handle partial initializers.
2016-11-27 22:51:36 -07:00
John Kessenich
98ad485321
HLSL: Support {...} initializer lists that are too short.
2016-11-27 17:39:07 -07:00
John Kessenich
1c98904014
Fix crash by returning early from finalCheck() if there is no tree to process.
2016-11-27 17:32:19 -07:00
John Kessenich
5307eb2d1b
Non-functional: Change a bunch of 0 to nullptr.
2016-11-27 17:30:14 -07:00
John Kessenich
509c4216e6
Non-functional: Fix typos.
2016-11-27 17:26:21 -07:00
John Kessenich
e50dc536ff
Warn on HLSL not finding entry point. Issue #588 .
2016-11-26 13:45:18 -07:00
John Kessenich
517fe7a6ad
Non-functional: Rename some entry-point variables to entryPoint, not main.
2016-11-26 13:31:47 -07:00
John Kessenich
fca826212c
Always correctly terminate main. Issue #588 , PR #600 .
2016-11-26 13:23:20 -07:00
John Kessenich
fabe7d6a61
Test results: Fix incorrect test result caused by parallel development. Issue #594 .
2016-11-14 21:22:05 -07:00
John Kessenich
5d45eadedc
HLSL: Turn on tests for groupshared.
2016-10-16 12:22:20 -06:00
John Kessenich
b50fd17acb
HLSL: Support SV_Coverage and SV_DispatchThreadId; catch SV_GroupIndex.
2016-10-16 12:12:11 -06:00
John Kessenich
4a3467933e
Build: Fix unsigned/signed warning.
2016-10-16 11:50:46 -06:00
John Kessenich
19bdf90eba
SPV: Distinguish between SPV and non-SPV rules for member overlap.
2016-10-07 11:50:25 -06:00
John Kessenich
087a454af2
HLSL: Add shape conversions for return values.
2016-10-06 16:56:54 -06:00
John Kessenich
ed33e05762
HLSL: Do structure conversion for return type struct-punning on non-entry-point functions.
2016-10-06 13:06:13 -06:00
John Kessenich
c056adcddd
Allow for larger binding numbers. 65K instead of 255.
2016-10-05 12:31:24 -06:00
John Kessenich
de97fe0ad4
Non-functional: Rationalizing parse helper hierarchy, step 3 (effected editable symbols and IO resize).
2016-10-01 18:44:38 -06:00
John Kessenich
a2a5dd474e
Non-functional: Rationalizing parse helper hierarchy, step 2 (effected error messaging and cascading errors).
2016-10-01 18:07:57 -06:00
John Kessenich
273060c2d3
Non-functional: Rationalizing parse helper hierarchy, step 1 (effected memory of HLSL keyword map).
2016-10-01 17:47:40 -06:00
John Kessenich
a08c929d8e
HLSL: Line numbers only: Set locations (line numbers) on synthesized flattening code.
2016-10-01 17:17:55 -06:00
John Kessenich
d8fe2ca8e5
HLSL: Handle flattened I/O structs passed to function *out* parameters.
2016-10-01 17:11:21 -06:00
John Kessenich
c86d38bb2b
Non-functional: Better use of .isParamOutput() and some other methods.
2016-10-01 13:30:37 -06:00
John Kessenich
ba56e23e8a
Fix typo in error message.
2016-10-01 12:36:19 -06:00
John Kessenich
f571d0c037
Non-functional: Use isOpaque() instead of compare against EbtSampler.
2016-10-01 12:35:01 -06:00