Commit Graph

1134 Commits

Author SHA1 Message Date
Lei Zhang
d6f0ed2c81 Add support for testing file-based HLSL source code in GTest. 2016-05-16 12:51:13 -04:00
John Kessenich
4678ca9dac HLSL: Add function call syntax and AST building. 2016-05-13 09:33:42 -06: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
John Kessenich
9f0cbdc22a Merge pull request #277 from amdrexu/bugfix3
SPV: Add capability ImageGatherExtended if necessary.
2016-05-12 14:18:13 -06:00
GregF
2713ed735d fix for -Werror=non-virtual-dtor for Android system builds 2016-05-11 14:46:48 -06:00
Rex Xu
5839031759 SPV: Add capability ImageGatherExtended if necessary. 2016-05-11 16:38:50 +08:00
Rex Xu
827b23b8a1 Parser: Redeclare gl_ClipDistance/gl_CullDistance should update their array sizes. 2016-05-11 15:50:41 +08:00
John Kessenich
fc6ac78567 Merge pull request #274 from antiagainst/stoul-strtoul
Use strtoul instead of stoul for Android.
2016-05-10 12:30:26 -06:00
Lei Zhang
20daa7f64a Use strtoul instead of stoul for Android. 2016-05-10 13:38:08 -04:00
John Kessenich
b2bd53b0ac Merge pull request #273 from antiagainst/appveyor-readme-status
Add badge status for Appveyor build in README.
2016-05-10 11:37:03 -06:00
Lei Zhang
0e101c9613 Add badge status for Appveyor build in README. 2016-05-10 13:04:55 -04:00
John Kessenich
210c6bf4d8 Merge pull request #272 from antiagainst/appveyor
Configuration for Windows buildbot & fix a bug
2016-05-10 09:38:37 -06:00
Lei Zhang
cb3236d9f9 Use std::string for TBD/missing functionality reporting.
We can have multiple instances of the same string, so comparing
const char* is not guaranteed working.

Fixed the failure on VS 2013 with Debug build.
2016-05-10 10:52:32 -04:00
Lei Zhang
f36d6e350e Add test configuration for Appveyor. 2016-05-10 10:52:32 -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
John Kessenich
dc4c9a70bd Merge pull request #271 from greg-lunarg/greg-mr2
fix check for non-positive array size
2016-05-09 20:16:19 -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
1a0d93f416 Fix the test of precise output function parameter
Rebase to 5cc344d8ce and update the
expected test result.
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
3bdf24267c README: Editorial update. 2016-05-06 00:08:03 -06:00
John Kessenich
91cef52f63 SPV: Non-functional: modularize createInvocationsOperation() from the previous commit. 2016-05-05 16:45:40 -06:00
John Kessenich
213d4be142 Merge branch 'amdrexu-feature2' 2016-05-05 16:33:04 -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
John Kessenich
e2d06dbf60 Merge pull request #268 from AWoloszyn/update-cmake
CMake: Updated to better organize folders and options.
2016-05-05 13:46:36 -06:00
John Kessenich
5cc344d8ce Front-End: precise: capture noContraction on output parameter declarations. 2016-05-05 13:36:55 -06:00
John Kessenich
076879d61c Merge pull request #266 from dekimir/kfixstoll
Use strtoll, as stoll is unavailable on Android.
2016-05-05 12:59:56 -06:00
Andrew Woloszyn
0b887d00e0 Install the test executable alongside glslangValidator 2016-05-05 14:58:26 -04:00
Andrew Woloszyn
db0eaf9887 Updated cmake to better organize folders and options.
This adds solution folders that properly group gtest/glslang/hlsl.
This also marks gtest options as advanced so they don't show up
in cmake-gui by default.
2016-05-05 14:45:53 -04:00
John Kessenich
0a0db9e411 Merge branch 'amdrexu-feature' 2016-05-05 12:05:06 -06:00
John Kessenich
c8a5676025 Merge branch 'feature' of https://github.com/amdrexu/glslang into amdrexu-feature 2016-05-05 12:04:22 -06:00
Dejan Mircevski
a25352eb4f Use strtoll, as stoll is unavailable on Android. 2016-05-05 13:46:51 -04:00
John Kessenich
6dea76add2 Merge pull request #257 from antiagainst/ostrstream
Avoid printing to stdout directly in library functions.
2016-05-05 11:23:58 -06:00
John Kessenich
0542ac8f23 Merge pull request #261 from antiagainst/make-tests-clear
README: Explain test organization and deduplication.
2016-05-05 10:27:25 -06:00
Lei Zhang
d7b552a907 Improve README steps for building and testing glslang. 2016-05-05 10:50:09 -04:00
Lei Zhang
f5e33b0bac Explain organization and build steps for source code and tests. 2016-05-05 10:19:12 -04:00
Lei Zhang
17535f7d55 Create a new logger class for all messages w.r.t. SPIR-V build. 2016-05-05 10:15:06 -04:00
Lei Zhang
09caf12bec Avoid printing to stdout directly in library functions.
Previously GlslangToSpv() reported missing/TBD functionalities
by directly writing to stdout using printf. That could cause
problems to callers of GlslangToSpv(). This patch cleans up
the error reporting logic in GlslangToSpv(), TGlslangToSpvTraverser,
and spv::Builder a little bit to use ostringstream.

Also fixed the usage of GlslangToSpv() in GTest fixtures to
capture warnings/errors reported when translating AST to SPIR-V.
2016-05-05 10:15:06 -04:00
Rex Xu
338b185a2b Implement the extension GL_ARB_shader_group_vote. 2016-05-05 20:38:33 +08:00
Rex Xu
574ab04caa Implement the extension GL_ARB_shader_ballot
Add new built-in variables and functions to the parser (SPIR-V tokens are missing).
2016-05-05 19:02:35 +08:00