platform/upstream/glslang.git
8 years agoAdd support for testing file-based HLSL source code in GTest.
Lei Zhang [Mon, 16 May 2016 16:50:30 +0000 (12:50 -0400)]
Add support for testing file-based HLSL source code in GTest.

8 years agoHLSL: Add function call syntax and AST building.
John Kessenich [Fri, 13 May 2016 15:33:42 +0000 (09:33 -0600)]
HLSL: Add function call syntax and AST building.

8 years agoMerge pull request #278 from greg-lunarg/greg-mr3
John Kessenich [Thu, 12 May 2016 22:51:15 +0000 (16:51 -0600)]
Merge pull request #278 from greg-lunarg/greg-mr3

Build: fix for -Werror=non-virtual-dtor for Android system builds

8 years agoMerge pull request #276 from amdrexu/bugfix
John Kessenich [Thu, 12 May 2016 20:22:56 +0000 (14:22 -0600)]
Merge pull request #276 from amdrexu/bugfix

Parser: Redeclare gl_ClipDistance/gl_CullDistance should update their array sizes.

8 years agoMerge pull request #277 from amdrexu/bugfix3
John Kessenich [Thu, 12 May 2016 20:18:13 +0000 (14:18 -0600)]
Merge pull request #277 from amdrexu/bugfix3

SPV: Add capability ImageGatherExtended if necessary.

8 years agofix for -Werror=non-virtual-dtor for Android system builds
GregF [Wed, 11 May 2016 20:46:48 +0000 (14:46 -0600)]
fix for -Werror=non-virtual-dtor for Android system builds

8 years agoSPV: Add capability ImageGatherExtended if necessary.
Rex Xu [Wed, 11 May 2016 08:38:50 +0000 (16:38 +0800)]
SPV: Add capability ImageGatherExtended if necessary.

8 years agoParser: Redeclare gl_ClipDistance/gl_CullDistance should update their array sizes.
Rex Xu [Wed, 11 May 2016 07:50:41 +0000 (15:50 +0800)]
Parser: Redeclare gl_ClipDistance/gl_CullDistance should update their array sizes.

8 years agoMerge pull request #274 from antiagainst/stoul-strtoul
John Kessenich [Tue, 10 May 2016 18:30:26 +0000 (12:30 -0600)]
Merge pull request #274 from antiagainst/stoul-strtoul

Use strtoul instead of stoul for Android.

8 years agoUse strtoul instead of stoul for Android.
Lei Zhang [Tue, 10 May 2016 17:38:08 +0000 (13:38 -0400)]
Use strtoul instead of stoul for Android.

8 years agoMerge pull request #273 from antiagainst/appveyor-readme-status
John Kessenich [Tue, 10 May 2016 17:37:03 +0000 (11:37 -0600)]
Merge pull request #273 from antiagainst/appveyor-readme-status

Add badge status for Appveyor build in README.

8 years agoAdd badge status for Appveyor build in README.
Lei Zhang [Tue, 10 May 2016 17:04:55 +0000 (13:04 -0400)]
Add badge status for Appveyor build in README.

8 years agoMerge pull request #272 from antiagainst/appveyor
John Kessenich [Tue, 10 May 2016 15:38:37 +0000 (09:38 -0600)]
Merge pull request #272 from antiagainst/appveyor

Configuration for Windows buildbot & fix a bug

8 years agoUse std::string for TBD/missing functionality reporting.
Lei Zhang [Tue, 10 May 2016 14:22:48 +0000 (10:22 -0400)]
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.

8 years agoAdd test configuration for Appveyor.
Lei Zhang [Tue, 10 May 2016 13:55:05 +0000 (09:55 -0400)]
Add test configuration for Appveyor.

8 years agoMerge pull request #222 from Qining/support-precise
John Kessenich [Tue, 10 May 2016 02:18:33 +0000 (20:18 -0600)]
Merge pull request #222 from Qining/support-precise

Full stack: Support *precise* qualifier

8 years agoMerge pull request #270 from scyganINTEL/bitfield_buildins
John Kessenich [Tue, 10 May 2016 02:17:40 +0000 (20:17 -0600)]
Merge pull request #270 from scyganINTEL/bitfield_buildins

Use proper precision qualifiers for bitfield build-in functions on ES

8 years agoMerge pull request #271 from greg-lunarg/greg-mr2
John Kessenich [Tue, 10 May 2016 02:16:19 +0000 (20:16 -0600)]
Merge pull request #271 from greg-lunarg/greg-mr2

fix check for non-positive array size

8 years agoremove double underscore
qining [Tue, 10 May 2016 01:38:42 +0000 (21:38 -0400)]
remove double underscore

8 years agoRebase to d3d3ce7160001846ede74978954e67f4f9fd84e4,update comments, rename a member...
qining [Tue, 10 May 2016 01:18:33 +0000 (21:18 -0400)]
Rebase to d3d3ce7160001846ede74978954e67f4f9fd84e4,update comments, rename a member variable name, fix format issue

8 years agofix check for non-positive array size
GregF [Mon, 9 May 2016 23:07:04 +0000 (17:07 -0600)]
fix check for non-positive array size

8 years agoUse proper precision qualifiers for bitfield build-in functions on ES
scygan [Mon, 9 May 2016 15:51:25 +0000 (17:51 +0200)]
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.

8 years agointeger type operation should not be noContraction
qining [Sat, 7 May 2016 01:52:28 +0000 (21:52 -0400)]
integer type operation should not be noContraction

8 years agosimplified the symbol definition collector code, add assert()
qining [Sat, 7 May 2016 00:00:44 +0000 (20:00 -0400)]
simplified the symbol definition collector code, add assert()

8 years agoadd a test for matrix, fix a variable name
qining [Fri, 6 May 2016 22:56:33 +0000 (18:56 -0400)]
add a test for matrix, fix a variable name

8 years agoResolve comments
qining [Fri, 6 May 2016 21:25:16 +0000 (17:25 -0400)]
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.

8 years agoRemoved the redundant functionalities in the assignee checking traverser
qining [Fri, 6 May 2016 02:34:52 +0000 (22:34 -0400)]
Removed the redundant functionalities in the assignee checking traverser

8 years agoFix the test of precise output function parameter
qining [Thu, 5 May 2016 21:47:27 +0000 (17:47 -0400)]
Fix the test of precise output function parameter

Rebase to 5cc344d8ce09a6d35ff88b9ea9f351062d779081 and update the
expected test result.

8 years agoPrecise and noContraction propagation
qining [Wed, 4 May 2016 21:34:38 +0000 (17:34 -0400)]
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.

8 years agoComments only.
John Kessenich [Fri, 6 May 2016 19:06:11 +0000 (13:06 -0600)]
Comments only.

8 years agoREADME: Editorial update.
John Kessenich [Fri, 6 May 2016 06:08:03 +0000 (00:08 -0600)]
README: Editorial update.

8 years agoSPV: Non-functional: modularize createInvocationsOperation() from the previous commit.
John Kessenich [Thu, 5 May 2016 22:45:40 +0000 (16:45 -0600)]
SPV: Non-functional: modularize createInvocationsOperation() from the previous commit.

8 years agoMerge branch 'amdrexu-feature2'
John Kessenich [Thu, 5 May 2016 22:33:04 +0000 (16:33 -0600)]
Merge branch 'amdrexu-feature2'

8 years agoMerge branch 'feature2' of https://github.com/amdrexu/glslang into amdrexu-feature2
John Kessenich [Thu, 5 May 2016 22:32:39 +0000 (16:32 -0600)]
Merge branch 'feature2' of https://github.com/amdrexu/glslang into amdrexu-feature2

8 years agoMerge pull request #268 from AWoloszyn/update-cmake
John Kessenich [Thu, 5 May 2016 19:46:36 +0000 (13:46 -0600)]
Merge pull request #268 from AWoloszyn/update-cmake

CMake: Updated to better organize folders and options.

8 years agoFront-End: precise: capture noContraction on output parameter declarations.
John Kessenich [Thu, 5 May 2016 19:36:55 +0000 (13:36 -0600)]
Front-End: precise: capture noContraction on output parameter declarations.

8 years agoMerge pull request #266 from dekimir/kfixstoll
John Kessenich [Thu, 5 May 2016 18:59:56 +0000 (12:59 -0600)]
Merge pull request #266 from dekimir/kfixstoll

Use strtoll, as stoll is unavailable on Android.

8 years agoInstall the test executable alongside glslangValidator
Andrew Woloszyn [Thu, 5 May 2016 18:58:26 +0000 (14:58 -0400)]
Install the test executable alongside glslangValidator

8 years agoUpdated cmake to better organize folders and options.
Andrew Woloszyn [Thu, 5 May 2016 18:45:53 +0000 (14:45 -0400)]
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.

8 years agoMerge branch 'amdrexu-feature'
John Kessenich [Thu, 5 May 2016 18:05:06 +0000 (12:05 -0600)]
Merge branch 'amdrexu-feature'

8 years agoMerge branch 'feature' of https://github.com/amdrexu/glslang into amdrexu-feature
John Kessenich [Thu, 5 May 2016 18:04:22 +0000 (12:04 -0600)]
Merge branch 'feature' of https://github.com/amdrexu/glslang into amdrexu-feature

8 years agoUse strtoll, as stoll is unavailable on Android.
Dejan Mircevski [Thu, 5 May 2016 15:51:27 +0000 (11:51 -0400)]
Use strtoll, as stoll is unavailable on Android.

8 years agoMerge pull request #257 from antiagainst/ostrstream
John Kessenich [Thu, 5 May 2016 17:23:58 +0000 (11:23 -0600)]
Merge pull request #257 from antiagainst/ostrstream

Avoid printing to stdout directly in library functions.

8 years agoMerge pull request #261 from antiagainst/make-tests-clear
John Kessenich [Thu, 5 May 2016 16:27:25 +0000 (10:27 -0600)]
Merge pull request #261 from antiagainst/make-tests-clear

README: Explain test organization and deduplication.

8 years agoImprove README steps for building and testing glslang.
Lei Zhang [Thu, 5 May 2016 14:44:26 +0000 (10:44 -0400)]
Improve README steps for building and testing glslang.

8 years agoExplain organization and build steps for source code and tests.
Lei Zhang [Wed, 4 May 2016 18:22:56 +0000 (14:22 -0400)]
Explain organization and build steps for source code and tests.

8 years agoCreate a new logger class for all messages w.r.t. SPIR-V build.
Lei Zhang [Wed, 4 May 2016 19:55:59 +0000 (15:55 -0400)]
Create a new logger class for all messages w.r.t. SPIR-V build.

8 years agoAvoid printing to stdout directly in library functions.
Lei Zhang [Mon, 2 May 2016 22:11:54 +0000 (18:11 -0400)]
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.

8 years agoImplement the extension GL_ARB_shader_group_vote.
Rex Xu [Thu, 5 May 2016 12:38:33 +0000 (20:38 +0800)]
Implement the extension GL_ARB_shader_group_vote.

8 years agoImplement the extension GL_ARB_shader_ballot
Rex Xu [Thu, 14 Apr 2016 08:53:07 +0000 (16:53 +0800)]
Implement the extension GL_ARB_shader_ballot

Add new built-in variables and functions to the parser (SPIR-V tokens are missing).

8 years agoMerge pull request #263 from antiagainst/cmake-minimum-required
John Kessenich [Wed, 4 May 2016 21:35:36 +0000 (15:35 -0600)]
Merge pull request #263 from antiagainst/cmake-minimum-required

CMake: Remove duplicated cmake_minimum_required() calls.

8 years agoRemove duplicated cmake_minimum_required() calls.
Lei Zhang [Wed, 4 May 2016 21:01:36 +0000 (17:01 -0400)]
Remove duplicated cmake_minimum_required() calls.

8 years agoFront-end precise: Propagate noContraction up the AST when dereferencing structs.
John Kessenich [Wed, 4 May 2016 19:24:47 +0000 (13:24 -0600)]
Front-end precise: Propagate noContraction up the AST when dereferencing structs.

This should be the last commit in this sequence to form the base of the work
in pull request #222.

8 years agoParser: Precise: Recognize 'precise', tag types, and do related semantic checking.
John Kessenich [Wed, 4 May 2016 18:36:14 +0000 (12:36 -0600)]
Parser: Precise: Recognize 'precise', tag types, and do related semantic checking.

This partly overlaps pull request #222, we have divided the work on this one.

8 years agoBison: Non-functional: Move to revision 3.0.4.
John Kessenich [Wed, 4 May 2016 06:12:10 +0000 (00:12 -0600)]
Bison: Non-functional: Move to revision 3.0.4.

This hopefully prevents obsucuring actual changes in a future commit.

Also, adds a script to update the grammar.

8 years agoMerge pull request #262 from antiagainst/remove-obselete-src
John Kessenich [Wed, 4 May 2016 18:54:41 +0000 (12:54 -0600)]
Merge pull request #262 from antiagainst/remove-obselete-src

Remove the obselete and incorrect LinusDoAll.bash.

8 years agoRemove the obselete and incorrect LinusDoAll.bash.
Lei Zhang [Wed, 4 May 2016 18:53:34 +0000 (14:53 -0400)]
Remove the obselete and incorrect LinusDoAll.bash.

8 years agoMerge pull request #260 from antiagainst/cmake-version
John Kessenich [Wed, 4 May 2016 18:48:17 +0000 (12:48 -0600)]
Merge pull request #260 from antiagainst/cmake-version

CMake: Bump minimum required CMake version to 2.8.12.

8 years agoBump minimum required CMake version to 2.8.12.
Lei Zhang [Wed, 4 May 2016 17:06:15 +0000 (13:06 -0400)]
Bump minimum required CMake version to 2.8.12.

CMake 2.8.12 added support for target_include_directories(), among
other features, and we would like to use it.

8 years agoMerge pull request #258 from antiagainst/travis
John Kessenich [Wed, 4 May 2016 16:27:53 +0000 (10:27 -0600)]
Merge pull request #258 from antiagainst/travis

Testing: Add configuration for Travis to test on Linux and Mac OS X.

8 years agoAdd configuration for Travis to test on Linux and Mac OS X.
Lei Zhang [Wed, 4 May 2016 15:29:21 +0000 (11:29 -0400)]
Add configuration for Travis to test on Linux and Mac OS X.

8 years agoHLSL: Add (almost) full expression grammar: Binary, unary (pre/post-fix), assign...
John Kessenich [Wed, 4 May 2016 05:17:20 +0000 (23:17 -0600)]
HLSL: Add (almost) full expression grammar: Binary, unary (pre/post-fix), assign, ...

8 years agoHLSL: Separate out token stream handling from grammar recognition.
John Kessenich [Wed, 4 May 2016 04:49:24 +0000 (22:49 -0600)]
HLSL: Separate out token stream handling from grammar recognition.

8 years agoVulkan: Add the #define VULKAN 100 when compiled for Vulkan.
John Kessenich [Wed, 4 May 2016 03:17:55 +0000 (21:17 -0600)]
Vulkan: Add the #define VULKAN 100 when compiled for Vulkan.

Note this requires test-based piecing together of the preamble string,
so it changed to being a std::string to make it easier to do.

This closes issue #254.

8 years agoCorrect precision qualification on built-in functions.
John Kessenich [Wed, 4 May 2016 01:34:00 +0000 (19:34 -0600)]
Correct precision qualification on built-in functions.

This is a replacement commit for pull request #238.

This is a design change, followed by implementation change that
A) fixes the changes caused by the design change, and
B) fixes some cases that were originally incorrect.

The design change is to not give built-in functions default precision qualification.
This is to allow the rule that the precision of some built-in functions adopt their
precision qualification from the calling arguments.  This is A above.

A consequence of this design change is that all built-ins that are supposed to have
an explicit precision qualifier must now be declared that way.  So, a lot more
built-in declarations now have precision qualifiers, just to keep things the same.
This is B above.

8 years agoMerge pull request #256 from DavidYen/missing_license
John Kessenich [Mon, 2 May 2016 20:50:57 +0000 (14:50 -0600)]
Merge pull request #256 from DavidYen/missing_license

Remove unused files SetupLinux.sh and index.php.

8 years agoRemoved unused files SetupLinux.sh, index.php.
David Yen [Mon, 2 May 2016 20:03:31 +0000 (13:03 -0700)]
Removed unused files SetupLinux.sh, index.php.

8 years agoMerge pull request #248 from amdrexu/feature2
John Kessenich [Sat, 30 Apr 2016 10:19:59 +0000 (04:19 -0600)]
Merge pull request #248 from amdrexu/feature2

Full stack: Implement the extension GL_ARB_gpu_shader_int64

8 years agoImplement the extension GL_ARB_gpu_shader_int64
Rex Xu [Fri, 22 Apr 2016 08:51:45 +0000 (16:51 +0800)]
Implement the extension GL_ARB_gpu_shader_int64

- Add new keyword int64_t/uint64_t/i64vec/u64vec.
- Support 64-bit integer literals (dec/hex/oct).
- Support built-in operators for 64-bit integer type.
- Add implicit and explicit type conversion for 64-bit integer type.
- Add new built-in functions defined in this extension.

8 years agoAdded missing headers to SetupLinux.sh and index.php.
David Yen [Fri, 29 Apr 2016 17:38:52 +0000 (10:38 -0700)]
Added missing headers to SetupLinux.sh and index.php.

Some license information were missing for some of the files, I have
added the proper licensing information as well as author information
for both files.

8 years agoMerge pull request #228 from Qining/fix-infinite-loop-due-to-eof-missing
John Kessenich [Thu, 28 Apr 2016 18:27:47 +0000 (12:27 -0600)]
Merge pull request #228 from Qining/fix-infinite-loop-due-to-eof-missing

Scanner/PP: Fix the infinite loop when an input file lacks EOF

8 years agoadd .err file for eof_missing test
qining [Wed, 27 Apr 2016 14:17:30 +0000 (10:17 -0400)]
add .err file for eof_missing test

8 years agoFix the infinite loop when an input file lacks EOF
qining [Mon, 11 Apr 2016 23:12:17 +0000 (19:12 -0400)]
Fix the infinite loop when an input file lacks EOF

The input scanner can be trapped in an infinite loop if the given input
file does not have EOF (and is not ended with a 'whitespace').

The problem is caused by unget(), which keeps rolling back the scanner
pointer without hitting an EOF at the end of the file. This makes getch()
function keep returning the last character of the file and never ends,
and the effect of advance() is always counteracted by unget().

8 years agoMerge pull request #251 from amdrexu/bugfix
John Kessenich [Wed, 27 Apr 2016 09:50:05 +0000 (03:50 -0600)]
Merge pull request #251 from amdrexu/bugfix

SPV: Use OpLogicalEqual/OpLogicalNotEqual for boolean type comparison.

8 years agoSPV: Use OpLogicalEqual/OpLogicalNotEqual for boolean type comparison.
Rex Xu [Wed, 27 Apr 2016 00:15:37 +0000 (08:15 +0800)]
SPV: Use OpLogicalEqual/OpLogicalNotEqual for boolean type comparison.

8 years agoMerge pull request #247 from dneto0/no-mutex
John Kessenich [Fri, 22 Apr 2016 19:38:16 +0000 (13:38 -0600)]
Merge pull request #247 from dneto0/no-mutex

Remove use of std::mutex in gtest code.

8 years agoRemove use of std::mutex in gtest code.
David Neto [Thu, 21 Apr 2016 19:46:11 +0000 (15:46 -0400)]
Remove use of std::mutex in gtest code.

Gtest runs in single-threaded mode.  So the GlslangInitializer
object in the test code doesn't have to do its own synchronization.

8 years agoMerge pull request #241 from Qining/fix-spec-const-construct-matrix
John Kessenich [Mon, 18 Apr 2016 17:23:38 +0000 (11:23 -0600)]
Merge pull request #241 from Qining/fix-spec-const-construct-matrix

SPV: Spec-consts: Fix constructors matrix and vector

8 years agofix the problem that spec constant composite instruction being used when only front...
qining [Thu, 14 Apr 2016 22:34:27 +0000 (18:34 -0400)]
fix the problem that spec constant composite instruction being used when only front-end constants are used in the constructor

8 years agoFix spec const construtor for matrix and vector
qining [Thu, 14 Apr 2016 20:40:20 +0000 (16:40 -0400)]
Fix spec const construtor for matrix and vector

Fix issue: #237

1. The code generated for matrix constructor should 1) build column
vectors first, 2) build matrix with the vectors.

2. When there is only one scalar type constituent in vector's
constructor, we should populate the constituent to fill all the slots in
the vector. As for matrix, the single constituent should be populated to
the diagonal positions (top-left to bottom-right diagonal).

remove createSpvConstantFromConstSubTree()

8 years agoMerge pull request #232 from Qining/fix-spec-const-bool-to-int-conversion
John Kessenich [Wed, 13 Apr 2016 03:28:11 +0000 (21:28 -0600)]
Merge pull request #232 from Qining/fix-spec-const-bool-to-int-conversion

SPV: SpecOp bool->uint/int and uint<->int conversion

8 years agoRefine the code and address comments
qining [Wed, 13 Apr 2016 03:16:20 +0000 (23:16 -0400)]
Refine the code and address comments

8 years agoSpecOp bool->uint/int and uint<->int conversion
qining [Thu, 7 Apr 2016 19:40:27 +0000 (15:40 -0400)]
SpecOp bool->uint/int and uint<->int conversion

Bool -> uint/int with OpSpecConstantOp OpSelect instruction.

uint <-> int conversion with OpSpecConstantOp OpIAdd instruction.

Note, implicit conversion: `const uint = an_int_spec_constant` is not
supported. Explicit type casting is required: `const uint =
uint(an_int_spec_constant)`

8 years agoMerge pull request #231 from dneto0/gtests-link-to-hlsl
John Kessenich [Wed, 13 Apr 2016 01:06:33 +0000 (19:06 -0600)]
Merge pull request #231 from dneto0/gtests-link-to-hlsl

Unit test executable should link to libHLSL

8 years agoSPV for OpenGL: Issue #229: don't allow gl_VertexIndex or gl_InstanceIndex under -G.
John Kessenich [Wed, 13 Apr 2016 00:35:12 +0000 (18:35 -0600)]
SPV for OpenGL: Issue #229: don't allow gl_VertexIndex or gl_InstanceIndex under -G.

8 years agoUnit test executable should link to libHLSL
David Neto [Tue, 12 Apr 2016 23:54:02 +0000 (19:54 -0400)]
Unit test executable should link to libHLSL

No unit tests exercise it.

8 years agoMerge pull request #226 from baldurk/warning-fixes
John Kessenich [Mon, 11 Apr 2016 16:23:50 +0000 (10:23 -0600)]
Merge pull request #226 from baldurk/warning-fixes

A couple of small warning fixes

8 years agoFix warning about function parameter shadowing class member variable
baldurk [Sat, 9 Apr 2016 11:07:25 +0000 (13:07 +0200)]
Fix warning about function parameter shadowing class member variable

8 years agoFix warning about losing information, use size_t instead of int
baldurk [Sat, 9 Apr 2016 11:07:12 +0000 (13:07 +0200)]
Fix warning about losing information, use size_t instead of int

8 years agoNonfunctional: Remove stray ';' and fix Google Test sentence in README.
John Kessenich [Thu, 7 Apr 2016 15:10:47 +0000 (09:10 -0600)]
Nonfunctional: Remove stray ';' and fix Google Test sentence in README.

8 years agoMemory: Don't use pool memory to store the entry point name in the intermediate repre...
John Kessenich [Thu, 7 Apr 2016 01:03:15 +0000 (19:03 -0600)]
Memory: Don't use pool memory to store the entry point name in the intermediate representation.

This might address issue #221, which I couldn't reproduce.

8 years agoFront-end: Get the right set of nodes marked as spec-const.
John Kessenich [Wed, 6 Apr 2016 19:32:44 +0000 (13:32 -0600)]
Front-end: Get the right set of nodes marked as spec-const.

This is according to the expected KHR_vulkan_glsl without floating point.
So, floating-point spec-const operations no longer work, and that's
reflected in the tests.

8 years agoMerge pull request #216 from Qining/fix-non-const-array-size-from-spec-const
John Kessenich [Wed, 6 Apr 2016 19:14:11 +0000 (13:14 -0600)]
Merge pull request #216 from Qining/fix-non-const-array-size-from-spec-const

SPV: Generate OpSpecConstantOp for all subtrees indicated by the AST.

8 years agoadd SpecConstantOpModeGuard to GlslangToSpvTraverser::visitSymbol()
qining [Wed, 6 Apr 2016 18:42:01 +0000 (14:42 -0400)]
add SpecConstantOpModeGuard to GlslangToSpvTraverser::visitSymbol()

8 years agoTurn on SpecConstantOpMode based on node qualifier
qining [Mon, 4 Apr 2016 02:20:42 +0000 (22:20 -0400)]
Turn on SpecConstantOpMode based on node qualifier

Move SpecConstantOpModeGuard from makeSpvConstantFromConstSubTree() to
visitbinary() and visitunary(). Checking if the visiting node is a spec
constants, if so, turn on the SpecConstantOpMode, otherwise, stay in the
normal mode.

8 years agofix the wrong generated code when a non-constant array is declared with its size...
qining [Fri, 1 Apr 2016 14:35:16 +0000 (10:35 -0400)]
fix the wrong generated code when a non-constant array is declared with its size derived from spec constant operations

8 years agoMerge pull request #220 from Qining/fix-built-in-spec-constants
John Kessenich [Mon, 4 Apr 2016 21:43:58 +0000 (15:43 -0600)]
Merge pull request #220 from Qining/fix-built-in-spec-constants

Handle built-in constants redeclared with a specialization constant id.

8 years agoBuilt-in values declared as specialization constant
qining [Mon, 4 Apr 2016 03:55:17 +0000 (23:55 -0400)]
Built-in values declared as specialization constant

Support declaring built-in values as spec constants.

Refine the code in createSpvConstant().

8 years agoMerge branch 'master' into hlsl-frontend
John Kessenich [Mon, 4 Apr 2016 02:36:48 +0000 (20:36 -0600)]
Merge branch 'master' into hlsl-frontend

8 years agoMerge branch 'master' of github.com:KhronosGroup/glslang
John Kessenich [Sun, 3 Apr 2016 20:06:53 +0000 (14:06 -0600)]
Merge branch 'master' of github.com:KhronosGroup/glslang