platform/upstream/glslang.git
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

8 years agoMerge pull request #217 from baldurk/vs2010-compile-fixes
John Kessenich [Sun, 3 Apr 2016 20:06:22 +0000 (14:06 -0600)]
Merge pull request #217 from baldurk/vs2010-compile-fixes

VS2010 compile fixes

8 years agoMerge pull request #219 from 1ace/master
John Kessenich [Sun, 3 Apr 2016 20:05:37 +0000 (14:05 -0600)]
Merge pull request #219 from 1ace/master

Fix spelling mistakes

8 years agofix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 00:17:13 +0000 (01:17 +0100)]
fix spelling mistakes

8 years agoComment: fix comment from gtest check in.
John Kessenich [Sat, 2 Apr 2016 19:09:14 +0000 (13:09 -0600)]
Comment: fix comment from gtest check in.

8 years agoSpecify explicit return type on lambda function
baldurk [Sat, 2 Apr 2016 11:38:42 +0000 (13:38 +0200)]
Specify explicit return type on lambda function

8 years agoChange {parameter} lists into explicit std::vector temporaries
baldurk [Sat, 2 Apr 2016 11:38:28 +0000 (13:38 +0200)]
Change {parameter} lists into explicit std::vector temporaries

8 years agoMerge pull request #190 from antiagainst/gtest
John Kessenich [Thu, 31 Mar 2016 18:31:45 +0000 (12:31 -0600)]
Merge pull request #190 from antiagainst/gtest

Add Google Test as the new test framework

8 years agoMerge pull request #214 from amdrexu/bugfix
John Kessenich [Thu, 31 Mar 2016 18:28:47 +0000 (12:28 -0600)]
Merge pull request #214 from amdrexu/bugfix

Parser: Update array size of gl_ClipDistance/gl_CullDistance in gl_in[].

8 years agoMerge pull request #215 from Qining/spec-constants-operations
John Kessenich [Thu, 31 Mar 2016 18:22:14 +0000 (12:22 -0600)]
Merge pull request #215 from Qining/spec-constants-operations

SPV: Spec Constant Operations

8 years agofix format; remove unnecessary parameters; rename some spec op mode guard class;...
qining [Thu, 31 Mar 2016 17:57:28 +0000 (13:57 -0400)]
fix format; remove unnecessary parameters; rename some spec op mode guard class; remove support of float point comparison and composite type comparison; update the tests.

8 years agoLink in Google Test framework.
Lei Zhang [Fri, 4 Mar 2016 21:22:34 +0000 (16:22 -0500)]
Link in Google Test framework.

The existing test harness is a homemade shell script. All the tests
and the expected results are written in plain text files. The harness
just reads in a test, invoke the glslangValidator binary on it, and
compare the result with the golden file. All tests are kinda
integration tests.

This patch add Google Test as an external project, which provides a
new harness for reading shader source files, compile to SPIR-V, and
then compare with the expected output.

8 years agoSpec Constant Operations
qining [Mon, 21 Mar 2016 13:51:37 +0000 (09:51 -0400)]
Spec Constant Operations

Approach:
Add a flag in `Builder` to indicate 'spec constant mode' and 'normal
mode'. When the builder is in 'normal mode', nothing changed. When the
builder is in 'spec constant mode', binary, unary and other instruction
creation rountines will be redirected to `createSpecConstantOp()` to
create instrution at module level with `OpSpecConstantOp <original
opcode> <operands>`.

'spec constant mode' should be enabled if and only if we are creating
spec constants. So a flager setter/recover guard is added when handling
binary/unary nodes in `createSpvConstantsFromConstSubTree()`.

Note when handling spec constants which are represented as ConstantUnion
Node, we should not use `OpSpecConstantOp` to initialize the composite
constant, so builder is set to 'normal mode'.

Tests:
Tests are added in Test/spv.specConstantOperations.vert, including:

1) Arithmetic, shift opeations for both scalar and composite type spec constants.
2) Size conversion from/to float and double for both scalar and vector.
3) Bitwise and/or/xor for both scalar and vector.
4) Unary negate/not for both scalar and vector.
5) Vector swizzles.
6) Comparisons for scalars.
7) == and != for composite type spec constants

Issues:
1) To implement == and != for composite type spec constants, the Spec needs
to allow OpAll, OpAny, OpFOrdEqual, OpFUnordEqual, OpOrdNotEqual,
OpFUnordNotEqual. Currently none of them are allowed in the Spec.

8 years agoParser: Update array size of gl_ClipDistance/gl_CullDistance in gl_in[].
Rex Xu [Sun, 27 Mar 2016 00:42:23 +0000 (08:42 +0800)]
Parser: Update array size of gl_ClipDistance/gl_CullDistance in gl_in[].

8 years agoMerge pull request #211 from Qining/spec-constants-composite
John Kessenich [Fri, 25 Mar 2016 19:17:27 +0000 (13:17 -0600)]
Merge pull request #211 from Qining/spec-constants-composite

SPV: Support specialization composite constants.

8 years agoSupport specialization composite constants
qining [Mon, 21 Mar 2016 13:51:37 +0000 (09:51 -0400)]
Support specialization composite constants

Fix issue #163, support creation and reference of composite type
specialization constants.

e.g.:
```
layout(constant_id = 200) const float myfloat = 1.25;
layout(constant_id = 201) const int myint = 14;
struct structtype {
  float f;
  int i;
};
const structtype outer_struct_var = {myfloat, myint};
void main(){}
```
generated code (use glslangValidator):
```
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 12

                              Capability Shader
               1:             ExtInstImport  "GLSL.std.450"
                              MemoryModel Logical GLSL450
                              EntryPoint Vertex 4  "main"
                              Source GLSL 450
                              Name 4  "main"
                              Name 10  "structtype"
                              MemberName 10(structtype) 0  "f"
                              MemberName 10(structtype) 1  "i"
                              Decorate 7 SpecId 200
                              Decorate 9 SpecId 201
               2:             TypeVoid
               3:             TypeFunction 2
               6:             TypeFloat 32
               7:    6(float) SpecConstant 1067450368
               8:             TypeInt 32 1
               9:      8(int) SpecConstant 14
  10(structtype):             TypeStruct 6(float) 8(int)
              11:10(structtype) SpecConstantComposite 7 9
         4(main):           2 Function None 3
               5:             Label
                              Return
                              FunctionEnd
```

Rname two function names to match their functionalities.
1) Rename `GlslangToSpvTraverser::createSpvSpecConstant()` to
`createSpvConstant()`;
2) Rename `GlslangToSpvTraverser::createSpvConstant()` to
`createSpvConstantFromConstUnionArray()`

Add function `GlslangToSpvTraverser::createSpvConstantFromSubTree()` to
handle constant creation from sub trees (e.g.: specialization constants).

Related PR: #208

8 years agoMerge pull request #212 from amdrexu/bugfix
John Kessenich [Tue, 22 Mar 2016 14:56:20 +0000 (08:56 -0600)]
Merge pull request #212 from amdrexu/bugfix

VS2012: Fix a build issue in parser.

8 years agoParser: Fix a build issue (VS2012).
Rex Xu [Tue, 22 Mar 2016 07:42:07 +0000 (15:42 +0800)]
Parser: Fix a build issue (VS2012).

8 years agoMerge pull request #210 from AWoloszyn/fix-compilation
John Kessenich [Mon, 21 Mar 2016 20:06:55 +0000 (14:06 -0600)]
Merge pull request #210 from AWoloszyn/fix-compilation

Fixed compilation issue introduced by my last commit

8 years agoFixed compilation issue introduced by my last commit
Andrew Woloszyn [Mon, 21 Mar 2016 19:56:31 +0000 (15:56 -0400)]
Fixed compilation issue introduced by my last commit

8 years agoMerge pull request #198 from AWoloszyn/update-includer
John Kessenich [Mon, 21 Mar 2016 19:23:20 +0000 (13:23 -0600)]
Merge pull request #198 from AWoloszyn/update-includer

Updated the includer interface to allow relative includes.

8 years agoFront-end: Propagate spec-constness up through aggregate constructors.
John Kessenich [Mon, 21 Mar 2016 18:55:00 +0000 (12:55 -0600)]
Front-end: Propagate spec-constness up through aggregate constructors.

8 years agoUpdated the includer interface to allow relative includes.
Andrew Woloszyn [Mon, 7 Mar 2016 18:23:09 +0000 (13:23 -0500)]
Updated the includer interface to allow relative includes.

This plumbs both the current file path and the include depth
back up to the includer. This allows the includer to properly
support relative paths.

This also replaces the string copy that was done during include
with a zero-copy method of accomplishing the same thing. This
prevents extra copies of entire files.

8 years agoFront-end: propagate specialization-constness through conversions and swizzles.
John Kessenich [Mon, 21 Mar 2016 00:45:23 +0000 (18:45 -0600)]
Front-end: propagate specialization-constness through conversions and swizzles.

8 years agoFront-end: Add specialization-constant subtrees for const variables/symbols.
John Kessenich [Sun, 20 Mar 2016 22:46:00 +0000 (16:46 -0600)]
Front-end: Add specialization-constant subtrees for const variables/symbols.

8 years agoFront-end infrastructure: Encapsulate semantic-level questions/actions about const...
John Kessenich [Sun, 20 Mar 2016 06:46:02 +0000 (00:46 -0600)]
Front-end infrastructure: Encapsulate semantic-level questions/actions about const/temp.

Much about const or temp is mechanical, about actual declaration,
while much is semantic, about something higher level.  This commit
checks every use everywhere, and for the high-level ones, substitutes
an encapsulated version instead.

8 years agoFront-end infrastructure: simplify and localize creating symbol nodes, reducing repli...
John Kessenich [Sun, 20 Mar 2016 00:10:22 +0000 (18:10 -0600)]
Front-end infrastructure: simplify and localize creating symbol nodes, reducing replication.

8 years agoMerge pull request #209 from amdrexu/bugfix
John Kessenich [Fri, 18 Mar 2016 20:42:07 +0000 (14:42 -0600)]
Merge pull request #209 from amdrexu/bugfix

Parser: Type promotion for operator modulus(%) is missing.

8 years agoParser: Type promotion for operator modulus(%) is missing.
Rex Xu [Fri, 18 Mar 2016 08:26:23 +0000 (16:26 +0800)]
Parser: Type promotion for operator modulus(%) is missing.

8 years agoMerge pull request #203 from dneto0/wip-mingw
John Kessenich [Wed, 16 Mar 2016 20:08:30 +0000 (14:08 -0600)]
Merge pull request #203 from dneto0/wip-mingw

Support Linux-to-Windows cross compile via MinGW

8 years agoSupport compilation via MinGW
David Neto [Mon, 29 Feb 2016 04:32:44 +0000 (23:32 -0500)]
Support compilation via MinGW

Change-Id: Ie52f0b1b2b20948c6f4b3cb5474537d36a5a3385

8 years agoMerge pull request #204 from amdrexu/bugfix
John Kessenich [Tue, 15 Mar 2016 15:14:27 +0000 (09:14 -0600)]
Merge pull request #204 from amdrexu/bugfix

SPV: Implement boolean selection for mix().

8 years agoSPV: Implement boolean selection for mix().
Rex Xu [Tue, 15 Mar 2016 04:08:31 +0000 (12:08 +0800)]
SPV: Implement boolean selection for mix().

Use OpSelect to implement boolean selection of mix(). FMix is applicable
to linear blending of mix().

8 years agoHLSL: Abstract accepting an identifier.
John Kessenich [Mon, 14 Mar 2016 16:46:34 +0000 (10:46 -0600)]
HLSL: Abstract accepting an identifier.

8 years agoHLSL: Simplify appearances a bit to make easier to read.
John Kessenich [Mon, 14 Mar 2016 16:02:11 +0000 (10:02 -0600)]
HLSL: Simplify appearances a bit to make easier to read.

8 years agoHLSL: Accept basic funtion definitions. (Not yet mapping input/output for entry...
John Kessenich [Sun, 13 Mar 2016 23:58:25 +0000 (17:58 -0600)]
HLSL: Accept basic funtion definitions.  (Not yet mapping input/output for entry point.)

8 years agoHLSL: Get correct set of reserved words.
John Kessenich [Sun, 13 Mar 2016 18:22:00 +0000 (12:22 -0600)]
HLSL: Get correct set of reserved words.

8 years agoHLSL: Hook up constructor expressions through the AST.
John Kessenich [Sun, 13 Mar 2016 17:24:20 +0000 (11:24 -0600)]
HLSL: Hook up constructor expressions through the AST.

8 years agoHLSL: Add basic declaration syntax and AST generation.
John Kessenich [Sun, 13 Mar 2016 03:24:24 +0000 (20:24 -0700)]
HLSL: Add basic declaration syntax and AST generation.

8 years agoHLSL: Plumb in HLSL parse context and keywords, and most basic HLSL parser and test.
John Kessenich [Sun, 13 Mar 2016 03:11:22 +0000 (20:11 -0700)]
HLSL: Plumb in HLSL parse context and keywords, and most basic HLSL parser and test.

8 years agoRefactor TParseContext into 3 level inheritance.
John Kessenich [Sun, 13 Mar 2016 02:08:55 +0000 (19:08 -0700)]
Refactor TParseContext into 3 level inheritance.

Adds parseVersions.h as the base TParseVersions for versioning,
and splits the remainder between TParseContextBase (sharable across parsers)
and TParseContext (now the GLSL-specific part).

8 years agoSupport multiple source languages, adding HLSL as an option.
John Kessenich [Sun, 13 Mar 2016 01:34:36 +0000 (18:34 -0700)]
Support multiple source languages, adding HLSL as an option.

8 years agoGeneralize "main" to a settable entry point name.
John Kessenich [Sun, 13 Mar 2016 01:17:47 +0000 (18:17 -0700)]
Generalize "main" to a settable entry point name.

8 years agoMerge pull request #199 from dekimir/test-dead-decors
John Kessenich [Fri, 11 Mar 2016 19:34:02 +0000 (12:34 -0700)]
Merge pull request #199 from dekimir/test-dead-decors

SPV test: Test dead-decoration removal.

8 years agoTest dead-decoration removal.
Dejan Mircevski [Fri, 11 Mar 2016 17:06:17 +0000 (12:06 -0500)]
Test dead-decoration removal.

8 years agoMerge pull request #195 from Qining/remove-decoration-on-undef-IDs
John Kessenich [Thu, 10 Mar 2016 16:51:22 +0000 (09:51 -0700)]
Merge pull request #195 from Qining/remove-decoration-on-undef-IDs

SPV: Remove decoration of undefined IDs

8 years agoChange to traditional 'for' loop
qining [Thu, 10 Mar 2016 02:40:41 +0000 (21:40 -0500)]
Change to traditional 'for' loop

8 years agoMerge pull request #194 from google/if-macro
John Kessenich [Thu, 10 Mar 2016 02:07:41 +0000 (19:07 -0700)]
Merge pull request #194 from google/if-macro

Preprocessor: Fix array out of bounds bug in processing if-else-endif macros.

8 years agoRemove decoration of undefined IDs
qining [Thu, 10 Mar 2016 00:54:03 +0000 (19:54 -0500)]
Remove decoration of undefined IDs

Fix issue #185 by removing OpDecorate instructions whose target IDs are
defined in unreachable blocks and thus not dumped in the generated
SPIR-V code.

8 years agoFix array out of bounds bug in processing if-else-endif macros.
Lei Zhang [Wed, 9 Mar 2016 19:53:57 +0000 (14:53 -0500)]
Fix array out of bounds bug in processing if-else-endif macros.

If we are not inside an if macro, we cannot simply decrease
elsetracker.

Fixes https://github.com/KhronosGroup/glslang/issues/29.

8 years agoSPV: Issue #180: push_constants don't have descriptor sets.
John Kessenich [Wed, 9 Mar 2016 04:36:22 +0000 (21:36 -0700)]
SPV: Issue #180: push_constants don't have descriptor sets.

8 years agoMerge pull request #192 from Qining/enable-adding-multiviewport-capability
John Kessenich [Tue, 8 Mar 2016 04:22:54 +0000 (21:22 -0700)]
Merge pull request #192 from Qining/enable-adding-multiviewport-capability

SPV: Declare MultiViewport capability.

8 years agoRun regression tests, update spv.420.geom.out so capability MultiViewport is declared
qining [Tue, 8 Mar 2016 04:05:59 +0000 (23:05 -0500)]
Run regression tests, update spv.420.geom.out so capability MultiViewport is declared

8 years agoEnable adding capability: MultiViewport
qining [Tue, 8 Mar 2016 02:32:15 +0000 (21:32 -0500)]
Enable adding capability: MultiViewport

Fix issue #191:
https://github.com/KhronosGroup/glslang/issues/191

8 years agoMerge pull request #168 from amdrexu/feature2
John Kessenich [Sun, 6 Mar 2016 22:45:11 +0000 (15:45 -0700)]
Merge pull request #168 from amdrexu/feature2

SPV: Add support for memory qualifiers.

8 years agoMerge pull request #165 from amdrexu/feature
John Kessenich [Sun, 6 Mar 2016 22:43:01 +0000 (15:43 -0700)]
Merge pull request #165 from amdrexu/feature

SPV: Support the new OpCode - OpImageSparseRead

8 years agoInfrastructure: Tweak CMake for 31c294cea86ae0115820f2a02c5a33cfca662a26, removal...
John Kessenich [Sun, 6 Mar 2016 22:37:56 +0000 (15:37 -0700)]
Infrastructure: Tweak CMake for 31c294cea86ae0115820f2a02c5a33cfca662a26, removal of bison.

8 years agoMerge pull request #122 from baldurk/remove-bison-binary
John Kessenich [Sun, 6 Mar 2016 22:14:46 +0000 (15:14 -0700)]
Merge pull request #122 from baldurk/remove-bison-binary

Remove bison binary