Maxime Coste
6998987ecf
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.
2015-11-11 18:24:37 +00:00
Maxime Coste
29051bd148
Avoid creation of temporary std::string when looking up keywords and reserved words
2015-11-11 18:24:37 +00:00
John Kessenich
1c77f3a8d2
Merge pull request #88 from mgadams/unistd_removal
...
Remove obsolete unistd.h file
2015-10-28 17:29:13 -06:00
Mark Adams
ea9112e0a5
Remove obsolete unistd.h file
...
The presence of this file can cause build issues when integrating glslang
into other projects.
2015-10-27 14:27:18 -04:00
John Kessenich
40f6f688cd
Merge pull request #85 from mgadams/gcc_build_fixes
...
Various build fixes when using newer GCC versions with warnings enabled
2015-10-26 15:29:10 -06: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
fac0d1c72b
Merge pull request #82 from mgadams/remove_sprintf
...
Replace sprintf() usage with snprintf()
2015-10-15 18:30:34 -06:00
Mark Adams
4123a04ca9
Replace sprintf() usage with snprintf()
...
This fixes compilation in build environments with stricter warnings enabled
2015-10-15 16:16:52 -04:00
John Kessenich
fa540d1414
SPV: Remove accidental inclusion of a test.
2015-10-15 13:55:18 -06: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
b5c046e58b
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 .
2015-10-13 17:23:10 -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
John Kessenich
d4a7a8e721
Merge pull request #81 from amdrexu/myfix
...
Generate correct image operand mask for Offset and ConstOffset(#77 ) and correct arg # for rect. texelFetchOffset.
2015-10-13 10:04:26 -06:00
Rex Xu
19c6e5919f
Fix an issue related with texelFetchOffset
2015-10-12 17:02:21 +08:00
Rex Xu
86e608133c
Generate correct image operand mask for Offset and ConstOffset( #77 )
2015-10-11 19:37:48 +08:00
John Kessenich
820a22fcc8
Give error for calling a user-defined function at global scope.
2015-10-06 13:11:38 -06:00
John Kessenich
894c1c109f
Add another frexp() test.
2015-10-05 10:00:27 -06:00
John Kessenich
eb505e4262
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.
2015-10-02 15:01:53 -06:00
John Kessenich
6373574b13
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.
2015-10-01 12:40:48 -06:00
John Kessenich
3cd0024ea8
GLSL front-end: Check recursively for opaque types in a block; these are all illegal.
2015-09-30 18:57:47 -06: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
b9cd3996c7
PP: Restore a line of code deleted by commit bb63bd5e37
.
2015-09-16 18:23:20 -06: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
John Kessenich
f6890c3798
Merge pull request #71 from amdrexu/mywork
...
SPIRV: Add image instruction support and atomic counter support.
2015-09-16 10:51:33 -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
fa2d01844e
Merge remote-tracking branch 'upstream/master'
2015-09-16 11:44:50 +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
2398b3a458
Full stack: implement textureQueryLod(*) and textureQueryLevels(*).
2015-09-15 19:38:56 -06:00
John Kessenich
ef0118b26e
Update the Todo.txt file with recent AEP, 3.1, and textureQuery progress.
2015-09-15 19:17:30 -06: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
John Kessenich
5f5b205ce9
Bump up layout(location) limit from 62 to 4094, to handle bigger uniform locations.
2015-09-13 21:03:33 -06:00
Rex Xu
30f9258d5e
Merge master branch from upstream
2015-09-14 10:38:56 +08:00
Rex Xu
88fa964745
Merge remote-tracking branch 'upstream/master'
2015-09-14 10:15:54 +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
9312269d09
Front-end Arrays of arrays: Add ES-specific checks and tests. AoA should be quite close to done now.
2015-09-11 15:25:38 -06:00
John Kessenich
a06bd527ca
SPV: Correct generation of transparent offsets for implicitly assigned offsets.
2015-09-11 15:15:23 -06:00
Rex Xu
42323e4107
Merge pull request #1 from KhronosGroup/master
...
Sync local master branch from the upstream
2015-09-10 12:06:48 +08: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