1584 Commits

Author SHA1 Message Date
Brad Davis
880bf36cac Fix Ubuntu 16.10 build 2016-06-07 16:23:44 -07:00
John Kessenich
80cb324ff6 Front-end: Fix issue #146: which versions allow double in/out. 2016-06-05 18:52:05 -06:00
John Kessenich
133253b6ee Front-end: Fix issue #147: ensure layout(index=N) has N in [0,1]. 2016-06-05 17:25:34 -06:00
John Kessenich
119f8f6906 HLSL: Flesh out the loop grammar and productions. 2016-06-05 15:44:07 -06:00
LoopDawg
4b67732c13 Initial implementation of direct-mapped subset of HLSL intrinsics with type subset.
This checkin implements about half of the HLSL intrinsics for a subset of their
entire type support (but a useful subset).  The uncommented lines in
TBuiltInParseablesHlsl::identifyBuiltIns shows which are connected.
2016-06-03 08:28:29 -06:00
John Kessenich
548c3adecd Front-end: Complete GL_ARB_compute_shader, previous commit was missing new barriers.
This amends the previous commit, which ommitted barriers in version 420 for compute shader.
2016-05-30 19:38:39 -06:00
John Kessenich
d94c003fb7 Front-end: Complete GL_ARB_compute_shader implementation.
Core compute shaders were working, but the extension wasn't implemented.
2016-05-30 19:29:40 -06:00
John Kessenich
0f5e3ad23c Fix issue #313: Catch internal attempts to modify built-in symbols that don't exist.
Also beefed up support for running compute shaders is #version 420, but this
work is only partially done.
2016-05-29 18:24:31 -06:00
John Kessenich
5a7f0eff69 Merge pull request #230 from dekimir/incresconst
Make two more IncludeResult members const.
2016-05-25 17:43:54 -06:00
Thomas Perl
7bfd08d21c Check for linking multiple ES shaders to the same stage 2016-05-25 09:26:43 +02:00
Thomas Perl
b40a6d6b40 Use version/profile from first compilation stage
When linking multiple compilation units per shader stage,
the code creates a new intermediate, but fails to set its
version and profile.

This change makes it so that the new intermediate inherits
the version and profile of the first compilation unit, so
that two ES SL compilation units can be combined.
2016-05-24 13:24:24 +02:00
John Kessenich
0c968f9d0e Merge pull request #306 from johnkslang/finish-spec-const-semantics
Vulkan: Finish semantics for what creates spec-const-semantics.
2016-05-23 23:37:39 -06:00
John Kessenich
d82c906378 Vulkan: Finish semantics for what creates spec-const-semantics.
Note: This required adding a new test mode to see the AST for vulkan tests.
This also required reworking some deeper parts of type creation, regarding
when storage qualification and constness is deduced bottom-up or dictated
top-down.
2016-05-23 23:10:18 -06:00
LoopDawg
0ae28ea647 Add base class TParseables for intrinsic / builtin generation.
Add stubbed HLSL derivation.  GLSL derivation is still called TBuiltIns,
for historical compatibility.
2016-05-23 15:44:53 -06:00
John Kessenich
2921e0c54a KHR_vulkan_glsl: name mangle distinguish pure textures.
Fixes issue #252.
2016-05-20 16:59:27 -06:00
John Kessenich
393d74f068 Merge pull request #300 from Qining/fix-slow-down-in-no-contraction-propagation
Fix the slow down in noContraction propagation
2016-05-20 13:44:07 -06:00
qining
507308b26d remove redundant 'return false' 2016-05-20 14:30:38 -04:00
John Kessenich
8d72f1a2c4 Full stack: distinguish between a scalar and a vector of size 1.
There have been GLSL extensions considering this, and HLSL does it.
This is a fully backward compatible change that allows this distinction.
2016-05-20 12:14:39 -06:00
qining
e5712a2549 Fix the slow down in noContraction propagation 2016-05-20 14:11:28 -04:00
Thomas Perl
00852b12d9 Remove declaration for ShGetPhysicalAttributeBindings
The function ShGetPhysicalAttributeBindings() is declared in the
header, but not defined (or referenced) anywhere in the codebase.
2016-05-19 22:19:58 +02:00
John Kessenich
b5cfd79f0a Merge pull request #288 from thp/attribute-reflection
Reflection: Add support for querying vertex attributes in reflection API
2016-05-19 10:13:08 -06:00
Thomas Perl
d6e1a5b1f8 Add support for querying vertex attributes in reflection API 2016-05-19 09:16:19 +02:00
Rex Xu
3d9165fde4 Parser: Redeclaration of gl_CullDistance is disallowed mistakenly. 2016-05-19 12:26:27 +08:00
John Kessenich
9af54c3337 Non-functional: Fix some comments English and brace formatting in recent merges. 2016-05-17 10:24:00 -06:00
baldurk
6b32ae18fa Compile fix - if _MSC_VER is undefined, _MSC_VER < 1700 is true! 2016-05-17 01:38:56 +02:00
baldurk
a8018b8ee5 [VS2010] Define strtoll() and atoll() functions 2016-05-17 01:28:44 +02:00
baldurk
bf2c88b6d1 [VS2010] Locally define std::to_string on VS2010 as well as android 2016-05-17 01:24:04 +02:00
baldurk
786cf4dc48 [VS2010] Change "using X = Y;" to "typedef Y X;" 2016-05-17 01:20:12 +02:00
John Kessenich
7fde8bc2a9 Merge pull request #281 from amdrexu/bugfix
Parser: Add missing vector relational functions for double type.
2016-05-16 16:47:51 -06:00
baldurk
f2d75f76e5 Use DetachThreadLinux wrapper on android
* Fixes a warning - static function being defined but not used.
* Just in case any more code is added to DetachThreadLinux, this will go
  through the same path on both platforms.
2016-05-14 14:57:41 +02:00
Rex Xu
62dda787c7 Parser: Add missing vector relational functions for double type. 2016-05-14 14:21:16 +08:00
John Kessenich
9db3117e38 Merge pull request #278 from greg-lunarg/greg-mr3
Build: fix for -Werror=non-virtual-dtor for Android system builds
2016-05-12 16:51:15 -06:00
John Kessenich
36962c7ab7 Merge pull request #276 from amdrexu/bugfix
Parser: Redeclare gl_ClipDistance/gl_CullDistance should update their array sizes.
2016-05-12 14:22:56 -06:00
GregF
2713ed735d fix for -Werror=non-virtual-dtor for Android system builds 2016-05-11 14:46:48 -06:00
Rex Xu
827b23b8a1 Parser: Redeclare gl_ClipDistance/gl_CullDistance should update their array sizes. 2016-05-11 15:50:41 +08:00
Lei Zhang
20daa7f64a Use strtoul instead of stoul for Android. 2016-05-10 13:38:08 -04:00
John Kessenich
3357d870e4 Merge pull request #222 from Qining/support-precise
Full stack: Support *precise* qualifier
2016-05-09 20:18:33 -06:00
John Kessenich
7b3096a93d Merge pull request #270 from scyganINTEL/bitfield_buildins
Use proper precision qualifiers for bitfield build-in functions on ES
2016-05-09 20:17:40 -06:00
qining
e543cc35e9 remove double underscore 2016-05-09 21:38:42 -04:00
qining
bb0ac54660 Rebase to d3d3ce7160001846ede74978954e67f4f9fd84e4,update comments, rename a member variable name, fix format issue 2016-05-09 21:19:39 -04:00
GregF
5bdf49cdc8 fix check for non-positive array size 2016-05-09 17:07:04 -06:00
scygan
9c56d84b73 Use proper precision qualifiers for bitfield build-in functions on ES
This change causes ES shaders to precision qualifiers for build-in functions as defined in ESSL spec. It especially mattersfor functions that are defined as highp or taking a highp.

Fixes vulkanCTS dEQP-VK.glsl.builtin.function.integer.bitfieldreverse.*, where bitfieldReverse() retval was wrongly marked as RelaxedPrecision.

Note: floatBitsToInt/floatBitsToUInt precision is also broken, but in different way - so it is not addressed here.
2016-05-09 17:51:25 +02:00
qining
5bec2b5619 integer type operation should not be noContraction 2016-05-09 10:46:40 -04:00
qining
34d257184a simplified the symbol definition collector code, add assert() 2016-05-09 10:46:40 -04:00
qining
0c96db5a4c add a test for matrix, fix a variable name 2016-05-09 10:46:40 -04:00
qining
25262b3fd9 Resolve comments
1. Sink adding noContraction decoration to createBinaryOperation() and
createUnaryOperation().

2. Fix comments.

3. Remove the #define of my delimiter, use global constant char.
2016-05-09 10:46:40 -04:00
qining
015150e4b3 Removed the redundant functionalities in the assignee checking traverser 2016-05-09 10:46:40 -04:00
qining
9220dbb078 Precise and noContraction propagation
Reimplement the whole workflow to make that: precise'ness of struct
    members won't spread to other non-precise members of the same struct
    instance.

    Approach:
    1. Build the map from symbols to their defining nodes. And for each
    object node (StructIndex, DirectIndex, Symbol nodes, etc), generates an
    accesschain path. Different AST nodes that indicating a same object
    should have the same accesschain path.

    2. Along the building phase in step 1, collect the initial set of
    'precise' (AST qualifier: 'noContraction') objects' accesschain paths.

    3. Start with the initial set of 'precise' accesschain paths, use it as
    a worklist, do as the following steps until the worklist is empty:

        1) Pop an accesschain path from worklist.
        2) Get the symbol part from the accesschain path.
        3) Find the defining nodes of that symbol.
        4) For each defining node, check whether it is defining a 'precise'
        object, or its assignee has nested 'precise' object. Get the
        incremental path from assignee to its nested 'precise' object (if
        any).
        5) Traverse the right side of the defining node, obtain the
        accesschain paths of the corresponding involved 'precise' objects.
        Update the worklist with those new objects' accesschain paths.
        Label involved operations with 'noContraction'.

    In each step, whenever we find the parent object of an nested object is
    'precise' (has 'noContraction' qualifier), we let the nested object
    inherit the 'precise'ness from its parent object.
2016-05-09 10:46:40 -04:00
John Kessenich
d3d3ce7160 Comments only. 2016-05-06 13:06:11 -06:00
John Kessenich
baa9fa5df7 Merge branch 'feature2' of https://github.com/amdrexu/glslang into amdrexu-feature2 2016-05-05 16:32:39 -06:00