John Kessenich
7a41f96d10
HLSL: Implement 'this' keyword.
2017-03-22 11:38:22 -06:00
John Kessenich
3778979cd4
HLSL: non-static member functions: track and find active anonymous 'this' scopes and members.
...
Thanks to @steve-lunarg for his input and discussions on handling member functions.
2017-03-21 23:56:40 -06:00
John Kessenich
f4ba25e009
HLSL: Non-functional: the symbol field of a token was in practice unused; remove it.
...
Another precurser to getting member non-static functions working.
2017-03-21 18:36:04 -06:00
John Kessenich
4960baaf66
HLSL: Basic turn on of non-static member functions.
...
Still need: pass by reference in SPIR-V and symbol-table level
for accessing 'this' members from member functions.
2017-03-19 18:09:59 -06:00
John Kessenich
f3d88bd498
HLSL non-functional: Generalize namespace nesting.
...
Also use this to move deferred member-function-body parsing to a better
place.
This should also be well poised for implementing the 'namespace' keyword.
2017-03-19 13:01:58 -06:00
John Kessenich
e751bca75c
Fix #777 : don't parse .suffix if <stage> is provided.
...
Adding a test for this also uncovered an extraneous \r in the runtests script,
fixed now.
2017-03-16 11:30:20 -06:00
John Kessenich
36b218de91
HLSL: Fix #771 : add inline keyword.
2017-03-15 09:05:14 -06:00
John Kessenich
2dd643ff03
Merge branch 'TiemoJung-semantic_handling'
2017-03-14 22:44:24 -06:00
John Kessenich
71c100d7c0
GLSL output: Removed fixed-size buffer; fixes #769 .
...
Makes some white-space differences in most output, plus a few cases
where more could have been put out but was cut short by the previous
fix-sized buffer.
2017-03-14 19:51:29 -06:00
John Kessenich
c08fb8ab9c
Full stack: properly implement GL_EXT_device_group and GL_EXT_multiview.
2017-03-14 16:45:30 -06:00
John Kessenich
78cfba97e1
Fix location of #defines for core and compatibility profile.
...
These were recently added for all profiles, versus just desktop.
2017-03-14 15:19:32 -06:00
John Kessenich
601b7fa4b9
Revert previous check-in, until knowing what the spec. is and whether the test failure is related.
2017-03-13 22:49:36 -06:00
John Kessenich
7a44a31dee
SPV: Address #759 : make ViewIndex and DeviceIndex by 'in', not 'uniform'.
2017-03-13 15:43:26 -06:00
John Kessenich
b16f7e6819
HLSL: Member-functions: capture body token stream for deferred syntax/semantics.
...
This is needed for accessing types/variables within a member function body that are
not known until after the struct is finished being declared. However, that funtionality
is not yet present, this is just the deferred processing, which is working for
static member functions.
2017-03-11 19:37:29 -07:00
John Kessenich
088d52bac2
HLSL: Non-functional: consolidate function declarator information.
2017-03-11 19:37:29 -07:00
John Kessenich
5f12d2f752
HLSL: non-functional: simplify handleBuiltInMethod() to isBuiltInMethod().
2017-03-11 10:15:47 -07:00
John Kessenich
523e20dc02
PP: Recognize the '::' token, and translate appropriately to GLSL/HLSL token.
2017-03-10 18:03:43 -07:00
John Kessenich
6e1d50a7a2
HLSL: Accept SV_Cull/ClipDistanceN, by refactoring the way semantics are mapped.
2017-03-09 14:37:32 -07:00
John Kessenich
88e88e59cb
HLSL: Non-functional: Remove dead .length() code.
2017-03-08 21:16:35 -07:00
John Kessenich
516d92d3c5
HLSL: Non-functional: Drive existing method recognition by syntax, not by name.
...
This (and previous commit) is a better foundation to build real methods on.
2017-03-08 20:09:03 -07:00
John Kessenich
78388726eb
HLSL: Non-functional: Don't process function name/parameters before expected a function declaration.
2017-03-08 18:53:51 -07:00
John Kessenich
ca71d946d7
HLSL: Grammar: Generalize accepting a declaration to accept an aggregate of subtrees.
...
This is slightly cleaner today for entry-point wrapping, which sometimes made
two subtrees for a function definition instead of just one subtree. It will be
critical though for recognizing a struct with multiple member functions.
2017-03-07 20:44:09 -07:00
John Kessenich
057df2935a
HLSL: Fix #754 : recognize type casts in if-statements separately from declarations.
2017-03-06 18:18:37 -07:00
John Kessenich
33f85b6e59
SPV: Allow push constant buffers to not have an instance name.
2017-03-06 08:51:35 -07:00
John Kessenich
789086a820
HLSL: Test for issue #699 .
2017-03-03 18:19:03 -07:00
John Kessenich
27ffb29908
HLSL: Add 'class' keyword as (so far) synonym for 'struct'.
2017-03-03 17:01:01 -07:00
John Kessenich
854fe24786
HLSL: Fix #747 : accept 'struct' in front of previously user-defined type name.
2017-03-02 14:30:59 -07:00
John Kessenich
0479437a5c
SPV: Fix #739 : OpSelect can only operate on scalars and vectors.
2017-03-01 13:49:11 -07:00
John Kessenich
efeefd9833
Build: Another fix for issue #718 : implement the hidden methods of tFinalize.
2017-03-01 13:12:26 -07:00
John Kessenich
3494d71cfa
PP: Fix issue #738 : don't assert on characters within a string.
2017-02-28 19:39:51 -07:00
John Kessenich
fb22b69fc6
PP: Partially address issue #738 : handle premature end of argument when token pasting.
2017-02-28 18:06:39 -07:00
John Kessenich
b67b4a7072
PP: Address #737 : accept 'h'/'H' floating-point suffix more broadly.
2017-02-28 12:58:11 -07:00
John Kessenich
42e33c9bec
SPV: Update SPV header to official Rev. 10 of 1.0, and fix the consequences of doing so.
2017-02-27 01:50:28 -07:00
John Kessenich
6c8aaacd28
SPV: Implement new extensions GL_KHX_device_group and GL_KHX_multiview.
...
These correspond to SPV_KHR_device_group and SPV_KHR_multiview.
Also, bring tests up to date with Khronos internals, and some misc. related changes.
2017-02-27 01:20:51 -07:00
John Kessenich
4a57dced66
SPV: Handle nested opaque types as function parameters.
2017-02-24 19:22:54 -07:00
John Kessenich
8f674e821e
Fix issue #676 : emit error message on failure to open spv file.
2017-02-18 09:45:40 -07:00
John Kessenich
0302bdf04a
SPV: Fix #723 : construct vectors from matrices.
2017-02-17 19:06:21 -07:00
John Kessenich
7225a1cb1e
Support align/offset for all versions GLSL/ESSL targeting SPIR-V.
2017-02-13 09:09:04 -07:00
John Kessenich
b49bb2ca5c
PP, nonfunctional: Remove crufty bit-twiddling of tokens.
2017-02-10 13:03:40 -07:00
John Kessenich
8e711b84bd
Fix issue #708 : token pasting within macro argument expansion.
2017-02-10 10:07:03 -07:00
John Kessenich
f8d0d8c2b8
Address issue #718 . Should change which warning is generated, hopefully to a better one.
2017-02-08 17:31:03 -07:00
John Kessenich
dd40260b63
HLSL: don't do a deepCopy() for typedef, as we still want to share the type graph.
...
This enables the IO type mapping to work transparently for typedefs.
2017-02-08 13:59:30 -07:00
John Kessenich
65ee230f1c
HLSL: Add tests and refine what decorations are passed through per stage/in/out.
2017-02-06 23:13:16 -07:00
John Kessenich
bf47286fe7
HLSL: Move to fine-grained control for defining input/output/uniform IO types.
2017-02-06 23:13:16 -07:00
John Kessenich
727b374fd3
HLSL: Build IO types bottom up, as parsed, and cache the original (IO).
...
Previously, this was done recursively, per object, and the nonIO version
was cached. This reverses both those approaches.
2017-02-06 23:00:51 -07:00
John Kessenich
88c4464df5
HLSL: Have loose uniforms also go through the makeTypeNonIo() path.
2017-02-06 23:00:51 -07:00
John Kessenich
fbb58a4e0b
Build: Fix Linux for older compiler: Use TMap instead of TUndorderedMap.
2017-02-06 23:00:51 -07:00
John Kessenich
abd8dca86d
HLSL: Make the entry-point shadow function have non-IO params and return.
...
This also removes an no longer needed makeTemporary() and rationalizes
makeTypeNonIo()'s interface.
2017-02-06 22:58:32 -07:00
John Kessenich
0fe106afd2
AST: Have type deepCopy() preserve type graphs as graphs.
...
Previously, a type graph would turn into a type tree. That is,
a deep node that is shared would have multiple copies made.
This is important when creating IO and non-IO versions of deep types.
2017-02-06 22:58:32 -07:00
John Kessenich
02467d8d94
HLSL: Wrap the entry-point; need to write 'in' args, and support 'inout' args.
...
This needs some render testing, but is destined to be part of master.
This also leads to a variety of other simplifications.
- IO are global symbols, so only need one list of linkage nodes (deferred)
- no longer need parse-context-wide 'inEntryPoint' state, entry-point is localized
- several parts of splitting/flattening are now localized
2017-02-06 22:58:32 -07:00