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
aa1dd61257
Merge branch 'master' of github.com:KhronosGroup/glslang
2015-12-19 11:10:56 -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
297bb3f2d0
Tests for PR: Fix results for 4f68b83ea1b34923a71e699125a9e867003864f6.
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
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
61d9fb9048
Semantics: 'invocations' defaults to 1, not 0.
...
'invocations' was using 0 as the "shader never set" flag and as the
default. Formalize this and explicit set to 1 and link time.
2015-12-13 10:59:17 -07:00
John Kessenich
04bb8a01d6
SPV: Implement all matrix operators {+,-,*,/} for {matrix,scalar,vector}.
2015-12-12 12:28:14 -07:00
John Kessenich
494a02a2b0
Semantics: Geometry stage can support max_vertices = 0.
...
To do this, more generally use a named -1 as a not set value.
2015-12-11 17:54:35 -07:00
John Kessenich
3c24a06c8c
SPV tests: Turn on some more tests related to currently pending issues.
2015-12-11 15:08:26 -07:00
John Kessenich
cc16fa0720
Tests: Move to just linefeed to simply cross-platform test changes.
2015-12-10 18:01:54 -07:00
John Kessenich
562394d112
Linux: Fix case of test file.
2015-12-10 12:01:41 -07:00
John Kessenich
c51710e0a9
Merge pull request #115 from amdrexu/bugfix
...
SPV: Smear 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 18:47:48 -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
Rex Xu
e553ace049
Parser: Extension requirement of gl_PrimitiveID and gl_Layer should be checked only for ESSL instead of GLSL.
2015-12-09 15:03:41 +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
John Kessenich
8c1c2ca0d7
Built-ins: fix mapping of packDouble2x32 and unpackDouble2x32.
2015-12-06 19:33:07 -07: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
John Kessenich
dd6ca17845
Semantics: Correct that std430 is universally disallowed with 'uniform'.
2015-12-06 18:10:27 -07:00
John Kessenich
1be8063e01
Require l-value patch-out indexing to be gl_InvocationID.
...
Also, generally allow ES variable indexing of in/out blocks.
2015-11-28 16:52:25 -07:00
John Kessenich
989df85dcd
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.
2015-11-28 12:52:29 -07:00
Rex Xu
71519fe70b
SPV: Fix an issue related with using CubeArrayShadow for texture()
2015-11-22 21:43:05 +08:00
John Kessenich
085371d9d4
SPV testing: Add missing test case.
2015-11-16 09:31:26 -07: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
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
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
19c6e5919f
Fix an issue related with texelFetchOffset
2015-10-12 17:02:21 +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
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
John Kessenich
2398b3a458
Full stack: implement textureQueryLod(*) and textureQueryLevels(*).
2015-09-15 19:38:56 -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