Граф коммитов

1285 Коммитов

Автор SHA1 Сообщение Дата
Lei Zhang d145f855cf Remove the obselete and incorrect LinusDoAll.bash. 2016-05-04 14:53:34 -04:00
John Kessenich a65556918f Merge pull request #260 from antiagainst/cmake-version
CMake: Bump minimum required CMake version to 2.8.12.
2016-05-04 12:48:17 -06:00
Lei Zhang 045e02af75 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.
2016-05-04 13:06:15 -04:00
John Kessenich 52e1db879f Merge pull request #258 from antiagainst/travis
Testing: Add configuration for Travis to test on Linux and Mac OS X.
2016-05-04 10:27:53 -06:00
Lei Zhang c4ebb55347 Add configuration for Travis to test on Linux and Mac OS X. 2016-05-04 11:55:10 -04:00
John Kessenich 34fb036a9c HLSL: Add (almost) full expression grammar: Binary, unary (pre/post-fix), assign, ... 2016-05-03 23:33:00 -06:00
John Kessenich 9c86c6ab5b HLSL: Separate out token stream handling from grammar recognition. 2016-05-03 22:49:24 -06:00
John Kessenich e512cd943e 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.
2016-05-03 21:18:59 -06:00
John Kessenich af459216a1 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.
2016-05-03 19:34:00 -06:00
John Kessenich f88a5c756e Merge pull request #256 from DavidYen/missing_license
Remove unused files SetupLinux.sh and index.php.
2016-05-02 14:50:57 -06:00
David Yen f67f91254b Removed unused files SetupLinux.sh, index.php. 2016-05-02 13:03:31 -07:00
John Kessenich 19f3f4724d Merge pull request #248 from amdrexu/feature2
Full stack: Implement the extension GL_ARB_gpu_shader_int64
2016-04-30 04:19:59 -06:00
Rex Xu 8ff43de891 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.
2016-04-30 13:34:34 +08:00
David Yen 00422441ea 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.
2016-04-29 10:38:52 -07:00
John Kessenich 010e93fe62 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
2016-04-28 12:27:47 -06:00
qining 94a89d51f3 add .err file for eof_missing test 2016-04-27 10:22:22 -04:00
qining 19647a32b9 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().
2016-04-27 10:05:57 -04:00
John Kessenich ba00f67d2f Merge pull request #251 from amdrexu/bugfix
SPV: Use OpLogicalEqual/OpLogicalNotEqual for boolean type comparison.
2016-04-27 03:50:05 -06:00
Rex Xu c7d3656dde SPV: Use OpLogicalEqual/OpLogicalNotEqual for boolean type comparison. 2016-04-27 08:15:37 +08:00
John Kessenich d6abcee1fc Merge pull request #247 from dneto0/no-mutex
Remove use of std::mutex in gtest code.
2016-04-22 13:38:16 -06:00
David Neto 10223e886c 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.
2016-04-21 15:56:33 -04:00
John Kessenich 63b280bbbd Merge pull request #241 from Qining/fix-spec-const-construct-matrix
SPV: Spec-consts: Fix constructors matrix and vector
2016-04-18 11:23:38 -06:00
qining 1f2820a3d3 fix the problem that spec constant composite instruction being used when only front-end constants are used in the constructor 2016-04-14 18:34:27 -04:00
qining 27e04a004d 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()
2016-04-14 17:52:57 -04:00
John Kessenich e1cd410d9c Merge pull request #232 from Qining/fix-spec-const-bool-to-int-conversion
SPV: SpecOp bool->uint/int and uint<->int conversion
2016-04-12 21:28:11 -06:00
qining 189b2033a4 Refine the code and address comments 2016-04-12 23:19:28 -04:00
qining e24aa5edbb 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)`
2016-04-12 22:01:55 -04:00
John Kessenich cec24c9852 Merge pull request #231 from dneto0/gtests-link-to-hlsl
Unit test executable should link to libHLSL
2016-04-12 19:06:33 -06:00
John Kessenich 6f29a1bb3b SPV for OpenGL: Issue #229: don't allow gl_VertexIndex or gl_InstanceIndex under -G. 2016-04-12 18:35:12 -06:00
David Neto c0792105f1 Unit test executable should link to libHLSL
No unit tests exercise it.
2016-04-12 19:54:02 -04:00
Dejan Mircevski 51eb91f272 Make two more IncludeResult members const. 2016-04-12 12:07:27 -04:00
John Kessenich d99524197f Merge pull request #226 from baldurk/warning-fixes
A couple of small warning fixes
2016-04-11 10:23:50 -06:00
baldurk 40289165dd Fix warning about function parameter shadowing class member variable 2016-04-09 13:11:50 +02:00
baldurk 3cb57d3731 Fix warning about losing information, use size_t instead of int 2016-04-09 13:11:49 +02:00
John Kessenich 6e620c4674 Nonfunctional: Remove stray ';' and fix Google Test sentence in README. 2016-04-07 09:10:47 -06:00
John Kessenich 7e3e486344 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.
2016-04-06 19:03:15 -06:00
John Kessenich 78a6b78810 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.
2016-04-06 13:32:44 -06:00
John Kessenich a8d9faba1f Merge pull request #216 from Qining/fix-non-const-array-size-from-spec-const
SPV: Generate OpSpecConstantOp for all subtrees indicated by the AST.
2016-04-06 13:14:11 -06:00
qining 75d1d80109 add SpecConstantOpModeGuard to GlslangToSpvTraverser::visitSymbol() 2016-04-06 14:42:01 -04:00
qining 408876600f 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.
2016-04-06 12:56:31 -04:00
qining 4c9126153d fix the wrong generated code when a non-constant array is declared with its size derived from spec constant operations 2016-04-06 12:51:50 -04:00
John Kessenich aa0298bfde Merge pull request #220 from Qining/fix-built-in-spec-constants
Handle built-in constants redeclared with a specialization constant id.
2016-04-04 15:43:58 -06:00
qining 4f4bb81cd9 Built-in values declared as specialization constant
Support declaring built-in values as spec constants.

Refine the code in createSpvConstant().
2016-04-04 11:10:41 -04:00
John Kessenich 1c7e70763b Merge branch 'master' into hlsl-frontend 2016-04-03 20:36:48 -06:00
John Kessenich 9c2f1c7bc0 Merge branch 'master' of github.com:KhronosGroup/glslang 2016-04-03 14:06:53 -06:00
John Kessenich 79845ad8e7 Merge pull request #217 from baldurk/vs2010-compile-fixes
VS2010 compile fixes
2016-04-03 14:06:22 -06:00
John Kessenich bb5743ea8e Merge pull request #219 from 1ace/master
Fix spelling mistakes
2016-04-03 14:05:37 -06:00
Eric Engestrom 6a6d6dda95 fix spelling mistakes 2016-04-03 01:17:13 +01:00
John Kessenich f0bcb0aaf4 Comment: fix comment from gtest check in. 2016-04-02 13:09:14 -06:00
baldurk bd9f8351f4 Specify explicit return type on lambda function 2016-04-02 13:38:42 +02:00