Hans-Kristian Arntzen
6a7b95d2d6
Validate that std140 packing can actually be used.
2017-10-10 10:12:27 +02:00
Hans-Kristian Arntzen
8538b4c9c0
Handle empty struct declarations with best effort.
...
This "feature" is a bit icky as we have no useful representation of it,
so never emit code which has anything to do with empty structs.
2017-10-06 13:05:14 +02:00
Hans-Kristian Arntzen
ecaea50739
Add SPVASM test from clspv.
2017-09-29 12:20:57 +02:00
Hans-Kristian Arntzen
0e4ed4102b
Only declare with specialization constant when in Vulkan semantics.
2017-09-28 12:24:04 +02:00
Hans-Kristian Arntzen
3339fd4e87
Fix case when Phi variable is a loop variable.
...
Need to flush variable to static expression rather than a variable.
2017-09-25 10:15:17 +02:00
Hans-Kristian Arntzen
7064c54820
Various fixes to texture/image query in GLSL.
2017-09-19 16:08:25 +02:00
Hans-Kristian Arntzen
656a7ba1d3
Remove irrelevant test.
...
The UDIV test was testing invalid SPIR-V and recent SPIRV-Tools errors
out on it.
2017-09-06 10:56:14 +02:00
Hans-Kristian Arntzen
a2229a0327
Add regression test for RMW optimizations.
2017-09-06 09:20:55 +02:00
Hans-Kristian Arntzen
9091eadb0d
Support FrexpStruct/ModfStruct.
2017-09-04 10:27:08 +02:00
Hans-Kristian Arntzen
11dfcb6531
Add restrict qualifier for images.
2017-08-29 15:54:22 +02:00
Hans-Kristian Arntzen
d55898ec74
Fix declaration of coherent images.
2017-08-29 15:52:59 +02:00
Hans-Kristian Arntzen
536d888a92
Add test shader for coherent SSBO.
2017-08-28 09:02:08 +02:00
Hans-Kristian Arntzen
d7f38ab4bf
Add support for SPV_KHR_multiview.
2017-08-15 13:28:16 +02:00
Hans-Kristian Arntzen
744d0405b0
Preserve arguments with inout unless complete writes are made.
2017-08-09 17:06:41 +02:00
Hans-Kristian Arntzen
48ccde3779
Support OpConstantNull.
2017-08-03 14:32:29 +02:00
Hans-Kristian Arntzen
a4fafa0607
Fix edge-case where do/while body is a dominator.
...
Shows up quite a lot in inlined code, should get more test coverage in
this area ...
2017-08-02 11:58:24 +02:00
Hans-Kristian Arntzen
cbcaca5a39
Fix textureProj with shadow on GLSL.
2017-07-31 10:05:32 +02:00
Hans-Kristian Arntzen
dbaaf1b69e
Add test for default member names.
2017-07-29 21:58:37 +02:00
Hans-Kristian Arntzen
955319aa66
Update test files.
2017-07-29 21:47:28 +02:00
Hans-Kristian Arntzen
6ff9007311
Fix unary enclosures.
2017-07-24 10:17:19 +02:00
Hans-Kristian Arntzen
c8d60914c4
Add support for SampleId/SampleMask/SamplePosition builtins.
2017-07-24 10:07:31 +02:00
Hans-Kristian Arntzen
df6aa0e609
Support SampleCmpLevelZero on cubes as well.
2017-07-24 09:28:24 +02:00
David Srbecky
77b5b4446b
Always make a copy when handling OpCompositeInsert
...
The modified object might not be mutable (e.g. shader input).
Added a test for the case when this happens.
2017-06-26 18:32:53 +01:00
Hans-Kristian Arntzen
ad2b7c05e7
Implement workaround for textureLod on 2D array shadow.
...
This does not exist in GLSL, but it exists in HLSL if LOD == 0.0.
2017-06-23 09:45:42 +02:00
Hans-Kristian Arntzen
de33d89074
Add explicit in/out locations everywhere.
...
Needed for newer glslang. With Vulkan semantics for SPIR-V, all
locations must be explicitly defined.
2017-06-21 09:39:08 +02:00
Hans-Kristian Arntzen
470ae7a7f6
Add multidimensional array flattening test.
2017-05-31 10:00:52 +02:00
Hans-Kristian Arntzen
623eaebdf8
Add test shaders for SSO.
2017-05-22 15:53:38 +02:00
Hans-Kristian Arntzen
89d57e15ba
Add test case for combined depth image sampler in GLSL.
2017-05-06 13:56:45 +02:00
Hans-Kristian Arntzen
851acf3712
Avoid boolean mix in HLSL.
...
Update glslang travis checkout as boolean mix support was broken on that commit.
2017-05-04 10:28:30 +02:00
Hans-Kristian Arntzen
543e380d90
Fix case where samplerBuffer is emitted without combined sampler.
2017-04-02 11:03:07 +02:00
Hans-Kristian Arntzen
b2c2e6483b
Analyze parameter preservation for functions.
...
This is kinda tricky, because if we only conditionally write to a
function parameter variable it is implicitly preserved in SPIR-V, so we must force
an in qualifier on the parameter to get the same behavior in GLSL.
2017-03-25 16:25:30 +01:00
Hans-Kristian Arntzen
24382a8ea2
Use findLSB as well in bitfield test.
2017-03-25 15:46:12 +01:00
Hans-Kristian Arntzen
6801af4dce
Fix bitfield functions.
2017-03-25 15:38:20 +01:00
Hans-Kristian Arntzen
840a72d47a
Workaround empty struct declaration and empty IO variables.
2017-03-24 10:03:11 +01:00
Robert Konrad
eab111ed32
Add tests for legacy lod handling
2017-03-23 15:51:43 +01:00
Hans-Kristian Arntzen
75391f9a68
Handle vector variants of OpLogicalAnd/Or/Not.
2017-03-20 22:45:40 +01:00
Hans-Kristian Arntzen
fd12124bf7
Add tests for legacy I/O flattening.
2017-03-06 14:04:01 +01:00
Hans-Kristian Arntzen
7f2e17969b
Add built-in cull distance.
2017-03-05 12:47:03 +01:00
Hans-Kristian Arntzen
036b9b73f5
Emit storage qualifier in the correct place.
...
Need to emit qualifiers in a specific order for legacy GLSL.
<interpolation> <storage> <precision> <type>.
2017-02-24 09:56:17 +01:00
Hans-Kristian Arntzen
fc80cd8cbf
Add support for loading flattened structs.
2017-02-23 19:31:56 +01:00
Hans-Kristian Arntzen
97350d32fd
Fix cases for flattened struct write.
...
Handle writing the entire struct as well as writing the elements
individually.
2017-02-23 19:05:11 +01:00
Hans-Kristian Arntzen
0e7c33ff81
Update glslang to latest on Travis.
...
Fix a lingering bug with OpSelect and boolean mix().
2017-02-11 10:52:34 +01:00
Arseny Kapoulkine
32a561a6c3
Remove redundant constructor calls for scalar types
2017-01-24 08:09:58 -08:00
Arseny Kapoulkine
ed04c95b08
Implement flattening of row major matrix indexing
...
To extract a column from row-major matrix, we need to do a strided load one
component at a time. In this case flattened_access_chain_offset still returns
the offset to the first element, but the stride is equal to matrix stride
instead of vector stride.
For this to work, we need to pass matrix stride (and transpose flag) through,
similar to how matrix flattening works.
Additionally slightly clean up recursive flattened_access_chain structure -
specifically, instead of deciding mid-traversal that we need matrix stride
information, we can just pass the matrix stride through - for access chains
that end in matrix/vector this gets us what we need, and for access chains
that end in structs the flattened_access_chain_struct code will recompute
correct stride/transposition data to pass through further.
2017-01-24 07:42:19 -08:00
Hans-Kristian Arntzen
a35073ad78
Add test for flattened 3-dimensional arrays.
2017-01-22 08:49:11 +01:00
Hans-Kristian Arntzen
3eb2e52c4e
Fix bugs with row-major matrices inside flattened UBOs.
2017-01-21 13:50:01 +01:00
Hans-Kristian Arntzen
d93dc38415
Use correct glslang revision for reference output ...
2017-01-21 12:53:17 +01:00
Hans-Kristian Arntzen
d1dcced1cb
Fixups to the flatten tests.
2017-01-21 12:39:16 +01:00
Hans-Kristian Arntzen
69af27d8be
Expand array flatten test a little.
2017-01-21 12:35:57 +01:00
Hans-Kristian Arntzen
9540979c55
Support int and uint as flattened UBO types.
2017-01-21 12:29:20 +01:00