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

646 Коммитов

Автор SHA1 Сообщение Дата
John Kessenich e01a9bc8c0 HLSL: Plumb in HLSL parse context and keywords, and most basic HLSL parser and test. 2016-03-12 21:40:08 -07:00
John Kessenich b3dc3acd59 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).
2016-03-12 19:08:55 -07:00
John Kessenich 66e2faf844 Support multiple source languages, adding HLSL as an option. 2016-03-12 18:34:36 -07:00
John Kessenich 4d65ee31a6 Generalize "main" to a settable entry point name. 2016-03-12 18:17:47 -07:00
Lei Zhang 24e4bc99ac 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.
2016-03-09 15:11:56 -05:00
John Kessenich f7497e289b SPV: Issue #180: push_constants don't have descriptor sets. 2016-03-08 21:43:14 -07:00
John Kessenich 84ecb413ac Infrastructure: Tweak CMake for 31c294cea8, removal of bison. 2016-03-06 15:37:56 -07:00
John Kessenich 31c294cea8 Merge pull request #122 from baldurk/remove-bison-binary
Remove bison binary
2016-03-06 15:14:46 -07:00
John Kessenich f2d8a5c53f SPV: Use heuristic to avoid geometry multi-streams when possible. 2016-03-03 22:29:11 -07:00
John Kessenich 8e3f4c2d66 Syntax: correct spelling of rgb10_a2ui. 2016-03-01 08:43:17 -07:00
baldurk 395b7dd3f5 Remove custom command for bison, it fails if bison is not found 2016-02-28 09:15:31 +01:00
baldurk 530690e442 Commit bison-generated files from Windows GNU Bison 2.7 2016-02-28 09:15:31 +01:00
John Kessenich 52d08596ec Merge pull request #175 from rdb/master
Fix compilation issues with MSVC 2010
2016-02-27 21:29:14 -07:00
baldurk 1be2ffa7cd GCC/Clang warning fix - unsigned/signed mismatch in comparison 2016-02-25 21:47:14 +01:00
John Kessenich 5184353326 Merge pull request #174 from mgadams/alias_proto_warnings
Fix warnings/errors for strict aliasing & function prototypes
2016-02-24 21:43:59 -07:00
rdb 32084e889d Fix compilation issues with MSVC 2010
(mostly by eliminating use of range-based for loops and std::tie)
2016-02-23 22:17:38 +01:00
Mark Adams 18b637f9dc Fix warnings/errors for strict aliasing & function prototypes
This fixes various issues related to gcc's strict-aliasing warning
by using unions. It also handles various cases hit with
gcc's missing-declarations warning.
2016-02-23 12:17:11 -05:00
Hubert Jarosz 6df2cdbb8a fix #171 - error: ‘isinf’ was not declared in this scope
glslang/MachineIndependent/intermOut.cpp used `isinf`,
but it's in `std` namespace, so should use `std::isinf`.
2016-02-23 01:32:37 +01:00
John Kessenich 0967748fbc SPV: Fix 'location' inheritance bug. 2016-02-19 12:21:50 -07:00
John Kessenich 5047c6f7a7 SPV: Fix Linux build warning. 2016-02-18 19:47:33 -07:00
Lei Zhang 4fe1efa1a9 Error out if bison is not found on non-Windows operating systems.
We cannot just default to use tools/bison.exe when it is not on
Windows.
2016-02-18 06:18:05 -05:00
John Kessenich 6c292d3ba7 SPV: Implement Vulkan version of GLSL (KHR_vulkan_glsl). 2016-02-15 21:46:55 -07:00
John Kessenich ba5685a332 Semantics: Map noise*() to an operator for PureOperatorBuiltins mode.
Fixes issue #157.
2016-02-02 15:59:12 -07:00
John Kessenich 9df51caba9 Fix front-end bug: Constant folding of array-of-struct index op.
If a constant object was both an array and a structure, and was
indexed with a constant, the arrayness was ignored and the wrong
subconstant selected.  This fixes that.
2016-02-01 11:57:33 -07:00
John Kessenich f6eae2a54a SPV: Require desktop 140 or ES 310 or above. 2016-01-22 17:47:22 -07:00
John Kessenich 4bfeed5fe8 Semantics: Spec. changing to reflect reality of int/uint conversion for |^&.
This effects 4.x, where int/uint conversions are done, but not earlier.
2016-01-22 15:40:24 -07:00
John Kessenich 28ad350b35 Memory: remove a part of the last merge request that causes crashes in multi-threaded mode. 2016-01-18 11:10:40 -07:00
John Kessenich 3e9add360d Merge pull request #133 from AWoloszyn/spirv-memory
Free memory associated with SPIR-V generation and the pragmaTable.
2016-01-18 10:48:07 -07:00
Andrew Woloszyn b7946d16bb Free memory associated with SPIR-V generation. 2016-01-18 10:29:41 -05:00
John Kessenich 712ecb96a2 Doubles: Add all the missing built-in double-based prototypes. 2016-01-16 20:37:43 -07:00
John Kessenich c57b2a97fa Memory/Perf: For link-mode, isolate file I/O so API can be looped over.
Separating file I/O from compile/link lets the compile/link be done
repeatedly in a loop for testing and measuring of performance and
memory footprint, including seeing memory growth over time for
functional-level memory-leak testing.

While the older compile-only mode already had this functionality,
and typically showed no memory leaks, SPIR-V uses the link path,
has pending "TODO" for memory freeing, and this shows several
kilobytes of leaking per compile-link. Most likely, pending
merge request 131 will address much of this.
2016-01-16 15:30:03 -07:00
John Kessenich 68f1431a55 Merge pull request #121 from amdrexu/feature
Parser & SPV: Implement two extensions regarding GLSL sparse texture.
2016-01-15 00:52:18 -07:00
John Kessenich 863aa667f3 Merge pull request #129 from AWoloszyn/fix-noop-strcpy
Preprocessor: Removed strcpy that copied a value to itself.
2016-01-13 19:12:50 -07:00
John Kessenich 5caf936428 Merge pull request #126 from mgadams/win32_warnings
Fix several build warnings/error encountered with VS2013
2016-01-13 19:11:05 -07:00
Jason Ekstrand a76766a434 getBaseAlignment: Use the rowMajor argument for determining matrix strides
The argument version is passed in from above and struct handling ensures
that row-majorness gets propagated correctly from one level to the next.
If we just look at the type itself and it's embedded in a struct that's
declared row-major, we may get the wrong stride.
2016-01-13 17:17:39 -08:00
Jason Ekstrand 79b7046a27 getBaseAlignment: Round up structure sizes to max alignment 2016-01-13 17:17:39 -08:00
Andrew Woloszyn e602d25f09 Removed strcpy that copied to itself.
Found by running glslang with -fsanitize=address in clang.
Also fixes a potential buffer-overrun with return from lReadByte.
2016-01-12 15:48:00 -05:00
Mark Adams 364c21c8c0 Fix several build warnings/error encountered with VS2013
This also fixes the newlines for spirv.hpp to be consistent with the rest of the files.
2016-01-06 13:41:02 -05:00
Rex Xu 48edadfd24 Parser & SPV: Implement two extensions regarding GLSL sparse texture.
Implement extension "GL_ARB_sparse_texture2".
Implement extension "GL_ARB_sparse_texture_clamp".
2016-01-05 16:07:02 +08:00
John Kessenich 4998789d4e SPV: Fix array strides by explicitly computing them in the getBaseAlignment() algorithm. 2015-12-29 19:20:55 -07:00
John Kessenich e0b6cad44f SPV: Generalize multiple struct-type instances for interpolation/invariant qualifiers. 2015-12-24 10:30:13 -07:00
John Kessenich 69d01eadd6 Semantics: Catch nested types containing 'int' with non-'flat' interpolation. 2015-12-22 16:39:07 -07:00
John Kessenich 50e57560a1 SPV: Don't make MissingFunctionality() exit anymore. 2015-12-21 21:21:11 -07:00
John Kessenich 2211835b4d SPV: Implement composite comparisons (reductions across hierchical compare). 2015-12-21 20:54:09 -07:00
John Kessenich 59420fd356 SPV: Move to deterministic results for OpEntryPoint, for test stability across platforms. 2015-12-21 11:45:34 -07:00
John Kessenich 3ac051e41d SPV: recursively propagate row/col majorness through nested structures.
This includes doing structure uniqueness modulo majorness, for shared nested structures.
2015-12-20 12:25:21 -07:00
John Kessenich f85e806e44 SPV: Nested layouts: Recursively send around the top-level std140 or std430 packing.
This also distinguishes between the same struct included in multiple parent packings.
2015-12-19 15:21:38 -07:00
John Kessenich a3211bfe72 Merge pull request #120 from amdrexu/bugfix2
Parser: Correct the storage qualifier of gl_HelperInvocation.
2015-12-19 11:14:32 -07:00
John Kessenich 297bb3f2d0 Tests for PR: Fix results for 4f68b83ea1. 2015-12-19 11:05:44 -07:00
John Kessenich 61c47a951b Constant folding: Correct result type of non-square matrix folding.
This also made the function easier to read by identifying
left and right operands more clearly.
2015-12-16 15:50:25 -07:00