steve-lunarg
27309f6848
Refactor TType::contains* methods (nonfunctional)
...
There were many (~8) different places in TType which all knew how to traverse
the struct/type hierarchy. There's a need to add another, but I didn't
want to duplicate the traversal code again. This is a small refactoring
which passes a predicate to a single traverse-and-test method. That also
shortens all the containsSomething() methods from 9 lines of body to 1.
There are no test differences: it's nonfunctional.
2017-04-02 17:38:18 -06:00
John Kessenich
f36542f46d
Revert "Merge pull request #779 from steve-lunarg/buffer-unsampled-fix"
...
This reverts commit 1dd65ca3983d3c361e66fbf788f050177f596d3a, reversing
changes made to 4960baaf663b18a6e0a58edb9073158ef7331930.
2017-03-31 14:39:30 -06:00
John Kessenich
84a30c8bae
Merge pull request #774 from steve-lunarg/tess-ctrlpt-pcf
...
HLSL: support per control point patch const fn invocation
2017-03-31 13:37:52 -06:00
steve-lunarg
e741249b72
HLSL: pass tessellation execution modes through to SPIR-V
...
The SPIR-V generator had assumed tessellation modes such as
primitive type and vertex order would only appear in tess eval
(domain) shaders. SPIR-V allows either, and HLSL allows and
possibly requires them to be in the hull shader.
This change:
1. Passes them through for either tessellation stage, and,
2. Does not set up defaults in the domain stage for HLSl compilation,
to avoid conflicting definitions.
2017-03-31 11:47:18 -06:00
John Kessenich
18958f6cd2
HLSL: Fix #802 : Preserve promoted child under ! operator.
2017-03-30 23:32:21 -06:00
John Kessenich
7e997e2612
HLSL: Implicit bool conversions for conditional expressions and related.
...
Covers if(cond), while(cond), do-while(cond), for(;cond;), and (cond ? :).
Fixes #778 .
2017-03-30 22:52:33 -06:00
John Kessenich
8f9fdc986a
HLSL: Add namespace grammar and some basic semantics.
...
Unknown how extensive the semantics need to be yet. Need real
feedback from workloads. This is just done as part of unifying it
with the class/struct namespaces and grammar productions.
2017-03-30 16:30:17 -06:00
John Kessenich
e434ad923e
Fix #809 : smear scalar condition in OpSelect for selecting vector operands.
2017-03-30 10:16:22 -06:00
John Kessenich
4dc835c369
Non-functional: Round of adding 'const', related to more efficient getFullNamespaceName().
2017-03-30 10:16:22 -06:00
John Kessenich
aa3c64c214
Fix #800 (mostly): set of Linux warnings.
2017-03-28 09:52:38 -06:00
John Kessenich
9fb31ce8ec
Tests: strengthen the value of test for NV members.
2017-03-24 18:58:48 -06:00
John Kessenich
0e7378446b
Fix #790 : Don't emit NV-specific interface members unless enabled by extension.
2017-03-24 18:40:40 -06:00
John Kessenich
19ea56899c
Tests: Update test results.
2017-03-23 14:52:38 -06:00
John Kessenich
000c818efb
HLSL: Allow use of $Global members in between function calls.
...
This allows global initializers to use $Global members.
2017-03-22 23:21:34 -06:00
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
dfbdd9eb20
HLSL: Add implicit-this tracking to TFunction.
2017-03-19 13:10:28 -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
2dc50ff372
Merge branch 'semantic_handling' of https://github.com/TiemoJung/glslang into TiemoJung-semantic_handling
2017-03-14 21:49:42 -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
c04c6a4067
Merge pull request #762 from LukasBanana/master
...
Added 'GL_core_profile' and 'GL_compatibility_profile' to macro expansion
2017-03-11 14:16:58 -07:00
John Kessenich
54ee28f4d0
HLSL: Add scoping operator, accept static member functions, and support calling them.
2017-03-11 14:13:00 -07:00
John Kessenich
5f12d2f752
HLSL: non-functional: simplify handleBuiltInMethod() to isBuiltInMethod().
2017-03-11 10:15:47 -07:00
Lukas Hermanns
1fbc6e6ca1
Added 'GL_core_profile' and 'GL_compatibility_profile' macro definition to preamble.
...
Added version check (version >= 150) for GL_(core/compatibility)_profile macros.
Added GL_core_profile standard macro check to "150.vert" test file.
Fixed version check for GL_core_profile macros, and removed bad token character from 150.vert test.
Updated 150.vert.out test base-result with google-test suite.
2017-03-11 12:34:46 +01: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
322cb1922e
Merge pull request #750 from dgkoch/rename_KHX_to_EXT
...
Rename KHX_multiview/device_group to EXT_multiview/device to match the released specs
2017-03-03 17:23:53 -07:00
John Kessenich
27ffb29908
HLSL: Add 'class' keyword as (so far) synonym for 'struct'.
2017-03-03 17:01:01 -07:00
Daniel Koch
efc972799d
Rename KHX to EXT to match the released specs
...
GL_KHX_multiview and GL_KHX_device_group don't exist,
they were released as GL_EXT_multiview and GL_EXT_device_group.
2017-03-03 18:40:48 -05: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
173c0c01a6
Merge pull request #744 from realitix/sanitize_sh_link
...
Sanitize ShaderLang.h
2017-03-01 13:17:24 -07:00