Commit Graph

228 Commits

Author SHA1 Message Date
John Kessenich
e23c9849c2 SPV: Handle type punning in createCompositeCompare(). 2016-01-04 23:59:09 -07:00
John Kessenich
f8842e55c0 SPV: Don't do stride decorations for arrays of arrays of blocks. 2016-01-04 19:22:56 -07:00
John Kessenich
c9e0a42b92 SPV: Handle stride decorations for arrays of arrays, and using multiple type instances when strides are used. 2015-12-29 21:27:24 -07: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
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
7ba6341a05 SPV: Make OpEntryPoint I/O list include all static uses.
Before, it was only including explicit interface, sufficient for IO-Block-declared
oriented interface, but not sufficient for all modes GLSL might be used with
SPIR-V.

Two things are accomplished now:
1) each id will appear exactly once
2) the OpEntryPoint list will union static use with declarations
2015-12-20 17:37:07 -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
b62e693f74 Merge pull request #118 from amdrexu/bugfix
SPV: Fix an issue related with imageStore() for 2DMS.
2015-12-19 11:20:25 -07:00
John Kessenich
b6d7fa91a1 Merge pull request #117 from amdrexu/feature
SPV: Implement GLSL built-in bitcast functions.
2015-12-19 11:08:02 -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
Rex Xu
7beb44190f SPV: Fix an issue related with imageStore() for 2DMS. 2015-12-15 17:52:45 +08:00
Rex Xu
cbc426ee62 SPV: Implement GLSL built-in bitcast functions. 2015-12-15 16:03:10 +08:00
John Kessenich
e7c83cfb8c SPV GLSL.std.450: Add needed smear operations for min, max, clamp, mix, step, and smoothstep. 2015-12-13 13:34:37 -07:00
John Kessenich
6feb4989fe SPV texturing: Use comp. 2 as the 3rd comp. for Dref in ImageSampleProjDrefImplicitLod. 2015-12-13 12:23:33 -07:00
John Kessenich
04bb8a01d6 SPV: Implement all matrix operators {+,-,*,/} for {matrix,scalar,vector}. 2015-12-12 12:28:14 -07:00
John Kessenich
76f7139789 SPV: Modify last merge: Have promoteScalar() generate the correct vectorType. 2015-12-09 19:08:42 -07:00
Rex Xu
e723b45bca SPV: Scalar smear operation should use type of the scalar to make the
expected vector type when the provided vector type is incompatible with
the scalar.
2015-12-09 16:05:06 +08:00
John Kessenich
e00e72ded1 SPV: Protect getStorageClass() with a test that the thing is pointer. 2015-12-08 20:48:49 -07:00
John Kessenich
33661450c7 SPV: Implement OpImage functionality (emit before query). 2015-12-08 19:32:47 -07:00
Rex Xu
7a26c176ce SPV: Implement GLSL interpolation built-in functions. 2015-12-08 17:40:11 +08:00
David Neto
8d63a3d35a 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
2015-12-07 16:24:31 -05:00
John Kessenich
2359bd0a1d SPV: Fix extra operands when using the "struct" form of a built-in taking an 'out' param. 2015-12-06 19:29:11 -07:00
John Kessenich
e721f49dbd SPV: Distinguish between std140 and std430 layouts, and correctly use alignments as the base for strides. 2015-12-06 19:17:49 -07:00
Rex Xu
71519fe70b SPV: Fix an issue related with using CubeArrayShadow for texture() 2015-11-22 21:43:05 +08:00
baldurk
08dee03d18 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.
2015-11-16 18:05:18 +01:00
baldurk
e915da4aee Remove unnecessary include path relative to root 2015-11-16 18:05:18 +01:00
John Kessenich
55e7d11ce8 SPIR-V: Move from Version .99 Rev 31 to Version 1.0, Rev 2. 2015-11-15 22:31:41 -07:00
Mark Adams
c11e95f6e5 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.
2015-10-26 12:38:46 -04:00
John Kessenich
7c1aa1026e SPV: Implement short circuiting of && and || when emitting SPIR-V. 2015-10-15 13:50:48 -06:00
John Kessenich
da581a2b95 GL_ARB_shader_draw_parameters: From @amdrexu, implement extension. 2015-10-14 14:10:30 -06:00
John Kessenich
e690332c3c SPV: Add modes for spacing, depth, depth replacing, winding, and point mode. 2015-10-13 16:29:02 -06:00
John Kessenich
f685df8c16 Add comment that was missed in previous commit. 2015-10-13 10:55:08 -06:00
John Kessenich
716312771c SPV constants and constOffsets completion: isConstant() and disassembler to see results.
Expand to full isConstant() implementation.
Fix disassembler to generate texture look-up masks.
2015-10-13 10:45:22 -06:00
Rex Xu
86e608133c Generate correct image operand mask for Offset and ConstOffset(#77) 2015-10-11 19:37:48 +08:00
John Kessenich
ee21fc9081 SPV: Fix missing 'Member' operand to OpArrayLength. 2015-09-21 21:50:29 -06:00
John Kessenich
142d7780a4 SPV 31: Remove obsolete and unused ../SPIRV/GLSL450Lib.h. 2015-09-21 10:39:20 -06:00
John Kessenich
ff4f04dd0e 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.
2015-09-21 10:00:42 -06:00
John Kessenich
f82c661462 SPV: Remove old Rev. 30 header spirv.h (glslang has been using Rev. 31 spirv.hpp). 2015-09-21 08:59:47 -06:00
Andrew Woloszyn
2d83ab2f57 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.
2015-09-18 16:12:03 -04:00
John Kessenich
b56a26ab4d SPV: Generate the LocalSize Execution Mode for compute shaders. 2015-09-16 16:04:05 -06:00
John Kessenich
56bab0483a SPV: Minor corrections to previous big merge for images and atomics. 2015-09-16 11:42:16 -06:00
Rex Xu
6b86d496c2 Add new test case for image functions and fix issues caught by this test 2015-09-16 17:48:22 +08:00
Rex Xu
bba5c80957 Merge master branch from upstream 2015-09-16 13:20:37 +08:00
Rex Xu
04db3f5aa4 Fix issues from review comments and those relevant to texelFetch 2015-09-16 11:44:02 +08:00
John Kessenich
3e60a6ff13 SPV OpAtomicCompareSwap: Generate correct operand order and number of operands. 2015-09-14 22:45:16 -06:00
John Kessenich
7355eebb18 SPV legacy texturing: Smear result of Op*Dref* up to a vector to match
the expectations of old GLSL shadow*() lookups.
2015-09-14 22:08:12 -06:00
John Kessenich
e770b3e6cf 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.
2015-09-14 21:08:58 -06:00
Rex Xu
30f9258d5e Merge master branch from upstream 2015-09-14 10:38:56 +08:00
John Kessenich
fa668dad99 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.
2015-09-13 14:46:30 -06:00
John Kessenich
c9a808319a SPV arrays: Add support for runtime-sized array types and arrays of arrays.
This includes run-time block.member.length() (OpArrayLength).
2015-09-13 10:18:19 -06:00
John Kessenich
a06bd527ca SPV: Correct generation of transparent offsets for implicitly assigned offsets. 2015-09-11 15:15:23 -06:00
John Kessenich
31ed4830d1 SPV: Only decorate array and matrix strides for transparent types requiring explicit layouts. 2015-09-09 17:51:38 -06:00
John Kessenich
0487d550d1 Merge pull request #69 from jekstrand/texel-fetch
SPIR-V: Add support for texelFetch
2015-09-09 16:33:45 -06:00
Rex Xu
fc6189197d SPIRV: Add the support of missing image functions #72 2015-09-09 16:42:49 +08:00
Rex Xu
d4782c10d4 SPIRV: Token layout of OpAtomicXXX instructions is incorrect #70 2015-09-06 16:30:11 +08:00
Jason Ekstrand
18b9fbd742 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.
2015-09-05 14:17:24 -07:00
Jason Ekstrand
54aedf1f66 SPIRV: Decorate matrices and arrays with their strides 2015-09-05 09:50:58 -07:00
John Kessenich
78258d3d40 Fix misspelled EOpFrexp and EOpLdexp. 2015-08-19 17:30:12 -06:00
John Kessenich
fc51d284aa Backward incompatible: Turn on PureOperatorBuiltins: use only enum-based built-in functions in the AST.
If this breaks your AST consumer, best is to modify it to test
against the enum values instead of doing string comparisons on
built-in function names.  This is the reason the change was made.

If you need the old behavior, you should be able to get it back by changing
PureOperatorBuiltins to be false instead of true.  This path will work for
a while, but is marked deprecated.

Also, the old behavior is tagged as release 2.4.
2015-08-19 13:43:25 -06:00
Andrew Woloszyn
8b64fa5474 Fixes for compiling glslang on Android.
Primarily fix is due to Android not supporting std::to_string().
2015-08-17 11:39:38 -04:00
John Kessenich
f99b7dde08 Merge pull request #54 from mknejp/master
SPIR-V: Return undefined values from implicit returns instead of dummy
2015-08-11 14:25:20 -06:00
Steve
3573f2e029 Add missing OpTypeSampledImage to prevent unknown type error from SPVRemapper. 2015-08-11 09:20:14 -06:00
Miro Knejp
28f9b1c28d SPIR-V: Return undefined values from implicit returns instead of dummy
Previously if a non-void function implictly returned, a dummy variable
was created as return value. Now instead it returns the result of the
OpUndef instruction. This better conveys the presence of undefined
behavior to SPIR-V consuming tools (and humans).

It also saves one ID per occurrence...
2015-08-11 03:26:46 +02:00
John Kessenich
65c78a0b62 Array of array: Implement the core functionality: types, constructors, operations.
There will be subsequent commits to refine semantics, esp. version-specific semantics,
as well as I/O functionality and restrictions.

Note: I'm getting white-space differences in the preprocessor test results,
which I'm not checking in.  I think they need to be tagged as binary or something.
2015-08-10 17:08:55 -06:00
John Kessenich
6726cccc91 Add new SPIR-V 31 files. 2015-08-06 22:59:24 -06:00
John Kessenich
5e4b1242bf Move to revision 31 of SPIR-V. 2015-08-06 22:55:01 -06:00
John Kessenich
306695360d Fixes to 8f1684b7bb, merge pull request 52. 2015-08-06 22:02:24 -06:00
baldurk
d7c5ead6a1 Compile fixes for gcc -Wall 2015-08-05 21:04:23 +02:00
John Kessenich
61d7d7ad73 Revisioning: Include GLSL.std.450 version. Also, the revision.h script now includes redirection to revision.h. 2015-08-03 12:04:56 -06:00
John Kessenich
426394d0c8 AST -> SPV: Add basic atomic_uint and atomic*() built-in function functionality. 2015-07-23 10:22:48 -06:00
John Kessenich
c040e76c58 Portability: Remove unneeded "= default" to work with older compilers. 2015-07-22 15:25:59 -06:00
David Neto
3e6a33cedf spv::Builder::Loop constructor inits all members.
After construction, the Loop is effectively const.

This perturbs the IDs in SPIR-V tests because the body block
is created before generating any of the loop code, rather than
only when the body is first referenced.
2015-07-22 12:24:21 -04:00
John Kessenich
96f4911351 SPV: Make previous commit compile with MSVC 2012. 2015-07-20 22:34:49 -06:00
John Kessenich
37e8337958 Merge pull request #22 from google/structured-do-while
Generate correctly structured do-while loops.
2015-07-20 22:14:38 -06:00
John Kessenich
2f273369e4 Performance: Simple upgrade/cleanup of stl c++11 containers (10% perf. increase). 2015-07-19 12:03:51 -06:00
David Neto
c22f37cfb4 Generate correctly structured do-while loops.
The loop test is always emitted before the loop body.

For do-while loops, use a phi node to track whether we're
on the first loop iteration, and only check the loop test
on the second and subsequent iterations.

For do-while loops, the loop test branch no longer occurs
at the top of the loop, so it must get its own selection
merge instruction.

A block can't be the target of more than one merge instruction.
So when the loop test executes after the body (as in do-while in GLSL)
we need to introduce a dummy block to be the target of the selection
merge just before the loop test conditional branch.

The other arm of the branch exits the loop and hence is the
"break block" exception in the structured control flow rules.
2015-07-17 17:51:51 -04:00
Steve
465a14666a Comment out some dead assignments per suggestion from static analysis tools.
Code is left in as comments for clarity to humans.
2015-07-15 14:34:35 -06:00
John Kessenich
9e55f633bc Include specification revision as part of the version string. 2015-07-15 10:03:39 -06:00
John Kessenich
eebb20511f Merge pull request #11 from baldurk/size-t-int-warning-fixes
Fix warnings compiling on x64 with size_t to int casts
2015-07-14 12:25:55 -06:00
John Kessenich
f98ee23415 Fix incorrect used of snprintf() 2015-07-12 19:39:51 -06:00
John Kessenich
68d78fd31e Updated command-line options, adding -o for saving binaries, -G for OpenGL SPIR-V validation, -v etc.
Old uses should still work as they did before.
Also encapsulated use of these flags during parsing, for the parse context.
Added SPIR-V version to -v.
2015-07-12 19:28:10 -06:00
baldurk
d76692dfb8 on x64, size_t is 64-bit and int is 32-bit, so needs an explicit cast 2015-07-12 11:32:58 +02:00
John Kessenich
1f654e1603 Merge pull request #4 from baldurk/relative-include-paths
include by relative path, so root doesn't need to be in the search path
2015-07-11 16:41:38 -06:00
Andre Weissflog
a5ade51363 Fix most clang warnings
- member initializing order in some constructors
- missing default branches in switch-case
- uninitialized variable if switch-case default (uncritical because
  program would exit)
- && and || brace warnings in if()
2015-07-11 14:45:57 +02:00
baldurk
42169c5fee include by relative path, so root doesn't need to be in the search path 2015-07-08 15:27:29 +02:00
John Kessenich
e0603a441e Front-end: move to rational internal array-of-array interfaces and design. (A-of-A is not yet implemented though.) 2015-07-06 21:00:03 -06:00
John Kessenich
ec43d0abec glslang -> SPIR-V: smear scalars for integer (scalar * vector). OpVectorTimesScalar is only for floats. 2015-07-04 17:17:31 -06:00
Felix Kaaman
61deffd92a Fix include directive depending on root folder name 2015-07-02 15:25:23 +02:00
John Kessenich
140f3df134 Final round for line endings. 2015-06-26 16:58:36 -06:00
John Kessenich
e5e0f6e37a glslang -> SPV: swap arguments as needed for OpVectorTimesScalar and OpMatrixTimesScalar, and check for correct types for those as well as OpMatrixTimesVector, OpVectorTimesMatrix, and OpMatrixTimesMatrix.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31486 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-13 00:48:48 +00:00
John Kessenich
8d64d44c3f glslang -> SPV: fix degenerate switch topologies (bug 14118).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31485 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-12 22:34:37 +00:00
John Kessenich
fae38ee277 glslang portability: Fixed a slew of OSX compilation warnings (but not all).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31469 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-10 23:23:12 +00:00
John Kessenich
79eaa91e6f glslang portability: Resolve OSX errors, some other OS warnings.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31468 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-10 22:05:48 +00:00
John Kessenich
3ef22f2139 SPV compressor: Fixes a possible asserts. Attribution: spvremapper@lunarg.com
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31451 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-09 02:01:53 +00:00
John Kessenich
06e1d0b434 glslang -> SPV: Improvements in swizzles on access chains: Bug 14007 (wrong type), simplications, tests, support mixed swizzle with dynamic component selection.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31277 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-22 21:57:58 +00:00
John Kessenich
6b3fd19d89 glslang -> SPV: add decorations for built-ins that are inside blocks.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31266 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-22 01:53:15 +00:00
John Kessenich
ea543986f9 glslang -> SPV: translate the source profile to the SPV source language.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31265 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-22 01:21:31 +00:00
John Kessenich
e61ed59726 glsl -> SPV: fix OpVectorInsertDynamic result type bug.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31262 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-22 00:58:41 +00:00
John Kessenich
3a13a0c71b Correct some English spellings of SPIR-V.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31237 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-20 16:13:01 +00:00
John Kessenich
01685c3ff8 SPV compression: Final check-in enabling this on MSVC 2012. All compression submissions from Steve (spvremapper@lunarg.com).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31236 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-20 16:04:17 +00:00
John Kessenich
3c4a276282 SPIR-V compression: Requires rerunning CMake. Adds a standalone tool for running the SPV compression.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31232 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-19 21:07:04 +00:00
John Kessenich
40e391184c glslang -> SPV: Use the new TBuiltInVariable instead of string compares to get the type of SPV built in. Also fixed gl_FragData and gl_PrimitiveIDIn.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31226 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-18 23:25:32 +00:00
John Kessenich
ca3457f1a7 glslang: Fix a few more warnings, and see it using nullptr causes anyone problems (testing c++11 portability).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31218 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-18 01:59:45 +00:00
John Kessenich
593a3f7f6b glslang -> SPV: improved support for do-while/continue. Contributed by David Neto (dneto@google.com).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31205 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-15 18:44:16 +00:00
John Kessenich
93dfbe1309 glslang: Fix over 100 warnings from MSVC warning level 4.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31202 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-15 17:30:55 +00:00
John Kessenich
2aa7f3a671 SPV compression: Remove file/path manipulation stuff, setting up for that to be a separate tool. Added copyright messages as well.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31201 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-15 16:02:07 +00:00
John Kessenich
4217d2ea22 SPIR-V compression: Add stripping and remapping tools for compressibility of generated SPIR-V.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31180 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-13 20:38:44 +00:00
John Kessenich
3a44d7fee8 glslang spvIR.h: Portability improvement.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31139 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-11 18:50:01 +00:00
John Kessenich
1cfc71b73e glslang->SPV: Fix addStringOperand so it saves the string argument early, before the str parameter variable is modified. Otherwise you save a garbage string (buffer overrun?) because "str" has run past the terminating NUL. Contributor: Â Lei Zhang antiagainst@google.com
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31108 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-08 00:45:31 +00:00
John Kessenich
11f5fc04b8 glslang preprocassor: Fix operator precedence bug.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31087 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-07 01:04:29 +00:00
John Kessenich
b7cc33116a glslang portability: add a #include <cassert>.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31082 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-06 22:16:30 +00:00
John Kessenich
735a2efa70 glslang -> SPV: 1) Include post switch-break unreachable blocks and 2) Generally, don't emit degenerate (basically empty) unreachable blocks.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31023 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-03 22:38:16 +00:00
John Kessenich
bcef333a78 SPV: Emit layout(index=) as Index decoration.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30939 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-04-27 10:03:25 +00:00
John Kessenich
edd181944e glslang and SPIR-V: Some basic turn on for doubles (previously untested but existed code). Partly from a submission, partly addressing bug 13772.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30794 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-04-17 21:47:07 +00:00
John Kessenich
5302c7d836 glslang -> SPIR-V: Correct renaming mistake made in moving to the auto-generated headers.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30510 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-04-03 00:10:51 +00:00
John Kessenich
d8132e164d glslang GLSL -> SPIR-V: Final delta to bump to revision 30 of the specification.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30488 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-04-02 16:32:51 +00:00
John Kessenich
9a3399450a glslang -> SPIR-V: some built-in decoration code was turned off; turn it on.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30466 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-04-01 20:35:23 +00:00
John Kessenich
0016eaf1b9 GLSL AST -> SPIR-V: Update to explicit enum values for the GLSL extended instruction set.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30443 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-31 01:46:57 +00:00
John Kessenich
b40d6ac9e7 glslang AST -> SPIR-V: Move to new auto-generated official headers, and for the disassembler, mirror the split done between the auto-generation header database and the specification.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30434 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-30 17:41:16 +00:00
John Kessenich
1f77cacd69 glslang -> SPIR-V: Correct code generated for EmitStreamVertex and EndStreamPrimitive.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30270 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-24 00:32:50 +00:00
John Kessenich
43bc2d857d glslang: Add SPIR-V human readable form. (Use -H.): Fix Linux build problems.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30039 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-04 03:55:31 +00:00
John Kessenich
acba77200b glslang: Add SPIR-V human readable form. (Use -H.)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30038 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-04 03:48:38 +00:00
John Kessenich
00dfa06f89 glslangValidator: Add straightforward SPIR-V support (non-optimizing, ~3.x functionality): fix linux case issue.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30033 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-03 17:15:07 +00:00
John Kessenich
0df0cdeeeb glslangValidator: Add straightforward SPIR-V support (non-optimizing, ~3.x functionality).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30032 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-03-03 17:09:43 +00:00