Rex Xu [Mon, 7 Dec 2015 11:07:17 +0000 (19:07 +0800)]
Parser: Extension requirement of gl_PrimitiveID and gl_Layer should be checked only for ESSL instead of GLSL.
John Kessenich [Wed, 9 Dec 2015 03:48:49 +0000 (20:48 -0700)]
SPV: Protect getStorageClass() with a test that the thing is pointer.
John Kessenich [Wed, 9 Dec 2015 02:32:47 +0000 (19:32 -0700)]
SPV: Implement OpImage functionality (emit before query).
John Kessenich [Tue, 8 Dec 2015 21:45:01 +0000 (14:45 -0700)]
Merge pull request #113 from amdrexu/feature
SPV: Implement GLSL interpolation built-in functions.
John Kessenich [Tue, 8 Dec 2015 21:26:26 +0000 (14:26 -0700)]
Platforms: Remove support for Windows XP executables.
Dealing with the 110 toolset seems not worth it.
Rex Xu [Tue, 8 Dec 2015 09:12:09 +0000 (17:12 +0800)]
SPV: Implement GLSL interpolation built-in functions.
John Kessenich [Mon, 7 Dec 2015 22:03:16 +0000 (15:03 -0700)]
Merge pull request #111 from dneto0/issue-110-frexp-fix
Avoid read past end of operands vector for EOpFrexp
David Neto [Mon, 7 Dec 2015 21:17:06 +0000 (16:17 -0500)]
Avoid read past end of operands vector for EOpFrexp
When emitting SPIR-V code for frexp, avoid access
beyond the end of the operands vector. When constructing
the OpExtInst, construct a new arguments vector instead of
modifying the existing operands vector. In the case of OpFrexp,
well need that last operand later on to generate the store.
Fixes https://github.com/KhronosGroup/glslang/issues/110
Change-Id: Ibc380fadf5e600ac491932e9ecef7afe2d72fd7f
John Kessenich [Mon, 7 Dec 2015 02:33:07 +0000 (19:33 -0700)]
Built-ins: fix mapping of packDouble2x32 and unpackDouble2x32.
John Kessenich [Mon, 7 Dec 2015 02:29:11 +0000 (19:29 -0700)]
SPV: Fix extra operands when using the "struct" form of a built-in taking an 'out' param.
John Kessenich [Mon, 7 Dec 2015 02:17:49 +0000 (19:17 -0700)]
SPV: Distinguish between std140 and std430 layouts, and correctly use alignments as the base for strides.
John Kessenich [Mon, 7 Dec 2015 01:10:27 +0000 (18:10 -0700)]
Semantics: Correct that std430 is universally disallowed with 'uniform'.
John Kessenich [Mon, 7 Dec 2015 00:12:53 +0000 (17:12 -0700)]
Merge pull request #100 from mawww/scanner-optim
Scanner optimisations
John Kessenich [Sun, 6 Dec 2015 17:29:06 +0000 (10:29 -0700)]
Merge pull request #109 from xorgy/add-unary-math-check-for-null-before-dereferencing
In addUnaryMath, check for 'child' being null before dereferencing it.
Aaron Hamilton [Sun, 6 Dec 2015 01:10:54 +0000 (01:10 +0000)]
In addUnaryMath, check for 'child' being null before dereferencing it.
John Kessenich [Fri, 4 Dec 2015 00:57:35 +0000 (17:57 -0700)]
Merge pull request #107 from xorgy/fail-init-process-on-init-thread-fail
Fail InitProcess() when InitThread() fails.
John Kessenich [Fri, 4 Dec 2015 00:56:53 +0000 (17:56 -0700)]
Merge pull request #108 from mgadams/extensions_compile_fix
Fix ordered pointer comparison build warning/error
John Kessenich [Fri, 4 Dec 2015 00:46:03 +0000 (17:46 -0700)]
Build: Fix CMake files to find osinclude.h
John Kessenich [Fri, 4 Dec 2015 00:20:24 +0000 (17:20 -0700)]
Merge pull request #105 from phaulos/generic-osinclude
Use generic osinclude.h.
Mark Adams [Thu, 3 Dec 2015 20:31:58 +0000 (15:31 -0500)]
Fix ordered pointer comparison build warning/error
Aaron Hamilton [Wed, 2 Dec 2015 07:39:26 +0000 (07:39 +0000)]
InitProcess() should fail if InitThread() does.
Pyry Haulos [Tue, 1 Dec 2015 20:59:53 +0000 (12:59 -0800)]
Use generic osinclude.h
Using platform-neutral osinclude.h makes it easier to substitute
implementation when necessary and eliminates some variability between
build configurations.
John Kessenich [Sat, 28 Nov 2015 22:19:11 +0000 (15:19 -0700)]
Require l-value patch-out indexing to be gl_InvocationID.
Also, generally allow ES variable indexing of in/out blocks.
John Kessenich [Sat, 28 Nov 2015 19:52:29 +0000 (12:52 -0700)]
Array-sizing bug fix: multiple array initializers of different size in the same declaration.
Handles the case of
float[] x = float[] (1.0, 2.0, 3.0),
y = float[] (1.0, 2.0, 3.0, 4.0);
where a shallow copy of the type arrayness from the left-most float[]
was getting used twice.
John Kessenich [Mon, 23 Nov 2015 06:36:49 +0000 (23:36 -0700)]
Merge pull request #98 from amdrexu/myfix
SPV: Fix an issue related with using CubeArrayShadow for texture()
Rex Xu [Wed, 11 Nov 2015 07:35:47 +0000 (15:35 +0800)]
SPV: Fix an issue related with using CubeArrayShadow for texture()
John Kessenich [Fri, 20 Nov 2015 22:49:09 +0000 (15:49 -0700)]
Merge pull request #10 from baldurk/osinclude-common-header
Build: Use common osinclude.h header file that redirects per-platform, remove obsolete build files, enforce relative includes.
baldurk [Mon, 16 Nov 2015 22:53:46 +0000 (23:53 +0100)]
Exclude bison generated files in .gitignore
baldurk [Mon, 16 Nov 2015 22:51:35 +0000 (23:51 +0100)]
Remove legacy build system
baldurk [Mon, 16 Nov 2015 17:03:28 +0000 (18:03 +0100)]
Add an osinclude.h below each OS directory, redirects by platform macro
* Linux folder has been renamed to Unix, to match defines and so that it
compiles on OS X.
* This removes the need for a per-platform include search path for the
right OS folder
baldurk [Sat, 11 Jul 2015 22:54:17 +0000 (00:54 +0200)]
Remove include_directories from CMakeLists, to enforce relative includes
* This also moves bison generated files into the source tree, so that
include of glslang_tab.cpp.h and includes from glslang_tab.cpp work
the same way.
baldurk [Mon, 16 Nov 2015 17:05:07 +0000 (18:05 +0100)]
Remove unnecessary include path relative to root
John Kessenich [Mon, 16 Nov 2015 16:31:26 +0000 (09:31 -0700)]
SPV testing: Add missing test case.
John Kessenich [Mon, 16 Nov 2015 04:33:39 +0000 (21:33 -0700)]
SPIR-V: Move from Version .99 Rev 31 to Version 1.0, Rev 2.
Maxime Coste [Wed, 11 Nov 2015 17:46:18 +0000 (17:46 +0000)]
Avoid costly indirect calls of tStringInput::(un)?getch through TPpContext
There is no calls to the TPpContext that could change the current input,
so every calls to pp->getChar and pp->ungetChar ultimately call this->getch
and this->ungetch while adding overhead of virtual calls and vector::back.
Maxime Coste [Wed, 11 Nov 2015 17:38:31 +0000 (17:38 +0000)]
Avoid creation of temporary std::string when looking up keywords and reserved words
John Kessenich [Wed, 28 Oct 2015 23:29:13 +0000 (17:29 -0600)]
Merge pull request #88 from mgadams/unistd_removal
Remove obsolete unistd.h file
Mark Adams [Tue, 27 Oct 2015 18:27:18 +0000 (14:27 -0400)]
Remove obsolete unistd.h file
The presence of this file can cause build issues when integrating glslang
into other projects.
John Kessenich [Mon, 26 Oct 2015 21:29:10 +0000 (15:29 -0600)]
Merge pull request #85 from mgadams/gcc_build_fixes
Various build fixes when using newer GCC versions with warnings enabled
Mark Adams [Mon, 26 Oct 2015 16:38:46 +0000 (12:38 -0400)]
Various build fixes when using newer GCC versions with warnings enabled
Encountered with GCC-4.7.3 in a build environment where warnings are enabled
and treated as errors.
John Kessenich [Fri, 16 Oct 2015 00:30:34 +0000 (18:30 -0600)]
Merge pull request #82 from mgadams/remove_sprintf
Replace sprintf() usage with snprintf()
Mark Adams [Thu, 15 Oct 2015 20:16:52 +0000 (16:16 -0400)]
Replace sprintf() usage with snprintf()
This fixes compilation in build environments with stricter warnings enabled
John Kessenich [Thu, 15 Oct 2015 19:55:18 +0000 (13:55 -0600)]
SPV: Remove accidental inclusion of a test.
John Kessenich [Thu, 15 Oct 2015 19:29:11 +0000 (13:29 -0600)]
SPV: Implement short circuiting of && and || when emitting SPIR-V.
John Kessenich [Wed, 14 Oct 2015 20:10:30 +0000 (14:10 -0600)]
GL_ARB_shader_draw_parameters: From @amdrexu, implement extension.
John Kessenich [Tue, 13 Oct 2015 23:23:10 +0000 (17:23 -0600)]
Front-end: Fix missing tessellation shader built-in qualifiers.
The gl_in array has a special path due to context-specific
gl_MaxPatchVertices, making the code out of order for tagging built-ins.
This commit moves the tagging to the correct location.
This also fixes issue #80.
John Kessenich [Tue, 13 Oct 2015 22:29:02 +0000 (16:29 -0600)]
SPV: Add modes for spacing, depth, depth replacing, winding, and point mode.
John Kessenich [Tue, 13 Oct 2015 16:55:08 +0000 (10:55 -0600)]
Add comment that was missed in previous commit.
John Kessenich [Tue, 13 Oct 2015 16:39:19 +0000 (10:39 -0600)]
SPV constants and constOffsets completion: isConstant() and disassembler to see results.
Expand to full isConstant() implementation.
Fix disassembler to generate texture look-up masks.
John Kessenich [Tue, 13 Oct 2015 16:04:26 +0000 (10:04 -0600)]
Merge pull request #81 from amdrexu/myfix
Generate correct image operand mask for Offset and ConstOffset(#77) and correct arg # for rect. texelFetchOffset.
Rex Xu [Mon, 12 Oct 2015 09:02:21 +0000 (17:02 +0800)]
Fix an issue related with texelFetchOffset
Rex Xu [Sun, 11 Oct 2015 11:37:48 +0000 (19:37 +0800)]
Generate correct image operand mask for Offset and ConstOffset(#77)
John Kessenich [Tue, 6 Oct 2015 19:11:38 +0000 (13:11 -0600)]
Give error for calling a user-defined function at global scope.
John Kessenich [Mon, 5 Oct 2015 16:00:27 +0000 (10:00 -0600)]
Add another frexp() test.
John Kessenich [Fri, 2 Oct 2015 21:01:53 +0000 (15:01 -0600)]
Allow future keywords to be accessed as members in a struct.
This fixes a bug where a token that could be a keyword in one version
is not a keyword in another version, but treated like a non-member after
a "." dereference.
John Kessenich [Thu, 1 Oct 2015 18:40:48 +0000 (12:40 -0600)]
Front-end: Fix: Cubemap arrays only use 3-component coord when accessed as an image.
4 components are needed when used a texture, but not an image, which multiplies
layers and faces into the same coordinate. This fixes it from using 4 everywhere,
to only using 4 for textures and 3 for images.
John Kessenich [Thu, 1 Oct 2015 00:57:47 +0000 (18:57 -0600)]
GLSL front-end: Check recursively for opaque types in a block; these are all illegal.
John Kessenich [Tue, 22 Sep 2015 03:50:29 +0000 (21:50 -0600)]
SPV: Fix missing 'Member' operand to OpArrayLength.
John Kessenich [Mon, 21 Sep 2015 16:39:20 +0000 (10:39 -0600)]
SPV 31: Remove obsolete and unused ../SPIRV/GLSL450Lib.h.
John Kessenich [Mon, 21 Sep 2015 16:00:42 +0000 (10:00 -0600)]
Merge pull request #75 from google/fix-vs2013-debug
SPV non-determinism: Fixed subtle issue that causes tests to fail in VS2013 in some configs.
John Kessenich [Mon, 21 Sep 2015 14:59:47 +0000 (08:59 -0600)]
SPV: Remove old Rev. 30 header spirv.h (glslang has been using Rev. 31 spirv.hpp).
Andrew Woloszyn [Fri, 18 Sep 2015 20:12:03 +0000 (16:12 -0400)]
Fixed subtle issue that causes tests to fail in VS2013 in some configs.
Depending on specific optimization settings VS2013 will sometimes
execute the operands to
new Instruction(builder.getUniqueId(), builder.makeBoolType(), OpPhi)
left-to-right, and sometimes right-to-left. Since makeBoolType can
also call getUniqueId(), the IDs to the OpPhi can sometimes be swapped.
This guarantees an explicit ordering of the Ids so that tests work
reliably.
John Kessenich [Thu, 17 Sep 2015 00:23:20 +0000 (18:23 -0600)]
PP: Restore a line of code deleted by commit
bb63bd5e3792455b77ce93e471158bed0cc884f0.
John Kessenich [Wed, 16 Sep 2015 22:04:05 +0000 (16:04 -0600)]
SPV: Generate the LocalSize Execution Mode for compute shaders.
John Kessenich [Wed, 16 Sep 2015 16:54:31 +0000 (10:54 -0600)]
SPV: Minor corrections to previous big merge for images and atomics.
John Kessenich [Wed, 16 Sep 2015 16:51:33 +0000 (10:51 -0600)]
Merge pull request #71 from amdrexu/mywork
SPIRV: Add image instruction support and atomic counter support.
Rex Xu [Wed, 16 Sep 2015 09:48:22 +0000 (17:48 +0800)]
Add new test case for image functions and fix issues caught by this test
Rex Xu [Wed, 16 Sep 2015 05:20:37 +0000 (13:20 +0800)]
Merge master branch from upstream
Rex Xu [Wed, 16 Sep 2015 03:44:50 +0000 (11:44 +0800)]
Merge remote-tracking branch 'upstream/master'
Rex Xu [Wed, 16 Sep 2015 03:44:02 +0000 (11:44 +0800)]
Fix issues from review comments and those relevant to texelFetch
John Kessenich [Wed, 16 Sep 2015 01:38:56 +0000 (19:38 -0600)]
Full stack: implement textureQueryLod(*) and textureQueryLevels(*).
John Kessenich [Wed, 16 Sep 2015 01:17:30 +0000 (19:17 -0600)]
Update the Todo.txt file with recent AEP, 3.1, and textureQuery progress.
John Kessenich [Tue, 15 Sep 2015 04:45:16 +0000 (22:45 -0600)]
SPV OpAtomicCompareSwap: Generate correct operand order and number of operands.
John Kessenich [Tue, 15 Sep 2015 04:08:12 +0000 (22:08 -0600)]
SPV legacy texturing: Smear result of Op*Dref* up to a vector to match
the expectations of old GLSL shadow*() lookups.
John Kessenich [Tue, 15 Sep 2015 02:58:02 +0000 (20:58 -0600)]
SPV return from main: Simplify a legacy design such returns are not jumps to exit block.
Structured control-flow rules allow leaving the middle of a construct through
a return, but not through a jump to a block that does a return.
Addresses issue #58.
John Kessenich [Mon, 14 Sep 2015 02:59:36 +0000 (20:59 -0600)]
Bump up layout(location) limit from 62 to 4094, to handle bigger uniform locations.
Rex Xu [Mon, 14 Sep 2015 02:38:56 +0000 (10:38 +0800)]
Merge master branch from upstream
Rex Xu [Mon, 14 Sep 2015 02:15:54 +0000 (10:15 +0800)]
Merge remote-tracking branch 'upstream/master'
John Kessenich [Sun, 13 Sep 2015 20:46:30 +0000 (14:46 -0600)]
SPV: Reduce spurious type generation by removing intermediate types in the middle of access chains.
This generally simplifies access chain generation, with far fewer type conversions.
It is particularly important to future SPIR-V changes where there is less aggregate
type uniqueness due to carrying different layout information with the type.
John Kessenich [Sat, 12 Sep 2015 18:17:44 +0000 (12:17 -0600)]
SPV arrays: Add support for runtime-sized array types and arrays of arrays.
This includes run-time block.member.length() (OpArrayLength).
John Kessenich [Fri, 11 Sep 2015 21:25:38 +0000 (15:25 -0600)]
Front-end Arrays of arrays: Add ES-specific checks and tests. AoA should be quite close to done now.
John Kessenich [Fri, 11 Sep 2015 21:15:23 +0000 (15:15 -0600)]
SPV: Correct generation of transparent offsets for implicitly assigned offsets.
Rex Xu [Thu, 10 Sep 2015 04:06:48 +0000 (12:06 +0800)]
Merge pull request #1 from KhronosGroup/master
Sync local master branch from the upstream
John Kessenich [Wed, 9 Sep 2015 23:51:38 +0000 (17:51 -0600)]
SPV: Only decorate array and matrix strides for transparent types requiring explicit layouts.
John Kessenich [Wed, 9 Sep 2015 22:36:37 +0000 (16:36 -0600)]
Add test results for merge pull request #69.
John Kessenich [Wed, 9 Sep 2015 22:28:39 +0000 (16:28 -0600)]
README: Update testing section.
John Kessenich [Wed, 9 Sep 2015 22:33:45 +0000 (16:33 -0600)]
Merge pull request #69 from jekstrand/texel-fetch
SPIR-V: Add support for texelFetch
John Kessenich [Wed, 9 Sep 2015 22:19:15 +0000 (16:19 -0600)]
Update test results for pull request #68, SPIRV: Decorate matrices and arrays with their strides.
John Kessenich [Wed, 9 Sep 2015 22:12:35 +0000 (16:12 -0600)]
Merge pull request #68 from jekstrand/stride-decorations
SPIRV: Decorate matrices and arrays with their strides
John Kessenich [Wed, 9 Sep 2015 21:52:29 +0000 (15:52 -0600)]
Merge pull request #66 from chadversary/cmake-dont-override-install-prefix
cmake: Don't override CMAKE_INSTALL_PREFIX
John Kessenich [Wed, 9 Sep 2015 21:45:23 +0000 (15:45 -0600)]
Merge pull request #60 from xorgy/no-define-defined
Preprocessor: 'defined' cannot be used as a macro name in #define or #undef.
John Kessenich [Wed, 9 Sep 2015 21:32:38 +0000 (15:32 -0600)]
Remove executables from the source tree. This addresses issue #48.
Rex Xu [Wed, 9 Sep 2015 08:42:49 +0000 (16:42 +0800)]
SPIRV: Add the support of missing image functions #72
Rex Xu [Sun, 6 Sep 2015 08:30:11 +0000 (16:30 +0800)]
SPIRV: Token layout of OpAtomicXXX instructions is incorrect #70
Rex Xu [Sun, 6 Sep 2015 06:55:45 +0000 (14:55 +0800)]
SPIRV: Fix a comment issue
Jason Ekstrand [Sat, 5 Sep 2015 21:14:48 +0000 (14:14 -0700)]
SPIRV: Add support for texelFetch
There's nothing really special about texelFetch other than the opcode and
some restrictions so adding it is pretty trivial.
Jason Ekstrand [Sat, 5 Sep 2015 16:50:58 +0000 (09:50 -0700)]
SPIRV: Decorate matrices and arrays with their strides
Chad Versace [Mon, 31 Aug 2015 21:27:04 +0000 (14:27 -0700)]
cmake: Don't override CMAKE_INSTALL_PREFIX
Stop forcing CMAKE_INSTALL_PREFIX="install". If the user manually set
CMAKE_INSTALL_PREFIX, then trust that he knows what he's doing.
This patch does NOT change the project's default value ("install") of
CMAKE_INSTALL_PREFIX.
Change-Id: I81b46dd1986427b498fe6316bed03f01689987d4
John Kessenich [Sun, 30 Aug 2015 11:43:51 +0000 (05:43 -0600)]
Implement GL_KHR_blend_equation_advanced.
Aaron Hamilton [Wed, 19 Aug 2015 21:04:18 +0000 (21:04 +0000)]
'defined' cannot be used as a macro name in #define or #undef.