Hans-Kristian Arntzen
fa42ed37ba
Parser: Handle group decorations.
2018-11-15 10:51:52 +01:00
Hans-Kristian Arntzen
2a8a4fe706
GLSL: Support extended arithmetic opcodes.
...
- uaddCarry
- usubBorrow
- umulExtended
- imulExtended
2018-11-13 14:50:46 +01:00
Hans-Kristian Arntzen
4e5c8d7199
Deal with depth_greater/depth_less qualifiers.
...
Adds support on HLSL SM 5.0, and fixes bug on GLSL.
Makes sure early fragment tests is tested on MSL as well.
2018-11-12 10:35:36 +01:00
Chip Davis
0d949e11ff
Support bitcasts of 16-bit types.
2018-11-05 14:56:36 -06:00
Chip Davis
ca4744ab72
Support constants of 16-bit integral type in GLSL and MSL.
...
Constants of 8-bit type aren't supported in GLSL, since there's no
extension letting you use them.
2018-11-02 14:39:55 -05:00
Chip Davis
1fb27b4cda
Add support for 8- and 16-bit types to GLSL and MSL.
...
In GLSL, 8-bit types require GL_EXT_shader_8bit_storage. 16-bit types
can use either GL_AMD_gpu_shader_int16/GL_AMD_gpu_shader_half_float or
GL_EXT_shader_16bit_storage.
2018-11-01 10:20:57 -05:00
Hans-Kristian Arntzen
480acdad18
Deal with OpSpecConstantOp used as array size.
...
When trying to validate buffer sizes, we usually need to bail out when
using SpecConstantOps, but for some very specific cases where we allow
unsized arrays currently, we can safely allow "unknown" sized arrays as
well.
This is probably the best we can do, when we have even more difficult
cases than this, we throw a more sensible error message.
2018-11-01 14:58:02 +01:00
Hans-Kristian Arntzen
d4ad1e266a
Add test case for local_size_x_id and some complex cases.
2018-11-01 11:23:48 +01:00
Hans-Kristian Arntzen
6157bf3cae
Add Windows support in Travis CI.
...
- Add new Windows support
- Use CMake/CTest instead of Make + shell scripts
- Use --parallel in CTest
- Fix CTest on Windows
- Cleanups in test_shaders.py
- Force specific commit for SPIRV-Headers
- Fix Inf/NaN odd-ball case by moving to ASM
2018-10-27 00:22:30 +02:00
Hans-Kristian Arntzen
af75ef005f
Update glslang and SPIRV-Tools.
...
A lot of changes in spirv-opt output.
Some new invalid SPIR-V was found but most of them were not significant
for SPIRV-Cross, so just marked them as invalid.
2018-09-27 11:10:22 +02:00
Hans-Kristian Arntzen
a985ac9499
Add test case for continue out of switch default block.
2018-09-18 11:01:15 +02:00
Hans-Kristian Arntzen
3b5968bb26
Deal with switch cases which break out of a loop.
...
Need some pretty hideous ladder variable system, but high level
languages do not support breaking out of a loop. break in switch blocks
and break in loops alias each other.
2018-09-18 10:50:48 +02:00
Hans-Kristian Arntzen
737715214e
Implement atomic increment/decrement in GLSL and HLSL.
2018-09-17 15:54:21 +02:00
Hans-Kristian Arntzen
32a0d05e05
Bitcast loads from builtin compute variables.
2018-09-11 09:43:28 +02:00
Hans-Kristian Arntzen
63f6466065
Support Component decoration in GLSL.
2018-09-10 12:13:26 +02:00
Hans-Kristian Arntzen
af672b7a4b
Add composite array test shaders for GLSL and HLSL as well.
2018-09-10 10:21:08 +02:00
Chip Davis
2de572ac53
Add new tests for GLSL 4.50 shaders.
2018-08-29 13:32:01 -05:00
Chip Davis
56a9b73685
Add test cases for SPV_KHR_shader_draw_parameters.
2018-08-29 12:04:29 -05:00
Hans-Kristian Arntzen
87de951105
MSL: Fix naming issue of aliased global variables.
...
When the name of an alias global variable collides with a global
declaration, MSL would emit inconsistent names, sometimes with the
naming fix, sometimes without, because names were being tracked in two
separate meta blocks. Fix this by always redirecting parameter naming to
the original base variable as necessary.
2018-08-27 09:59:55 +02:00
Hans-Kristian Arntzen
f6ec83e5d4
GLSL: Allow blocks to have their own namespace.
2018-08-21 11:29:08 +02:00
Hans-Kristian Arntzen
eee290a029
MSL: Fix support for texelFetchOffset.
...
Just apply the offset directly, MSL has no immediate offset parameter.
2018-08-07 15:28:04 +02:00
Hans-Kristian Arntzen
361fe52c9d
MSL: Properly support passing parameters by value.
...
MSL would force thread const& which would not work if the input argument
came from a different storage class.
Emit proper non-reference arguments for such values.
2018-08-06 15:43:51 +02:00
Hans-Kristian Arntzen
34a21b96cf
Add test case for phi-only continue block.
2018-08-06 14:06:40 +02:00
Hans-Kristian Arntzen
e1367e609a
Fix a lot of redundant code when loading flattened composites.
2018-07-06 10:57:23 +02:00
Hans-Kristian Arntzen
dcddd5326e
Add LUT test cases for OpVariable with initializer.
2018-07-05 14:51:07 +02:00
Hans-Kristian Arntzen
5582523d9a
Add some tests for LUT promotion.
...
Also, update other tests.
2018-07-05 14:14:18 +02:00
Hans-Kristian Arntzen
e044732896
Support OpTypeImage with depth == 2 (unknown) properly.
...
Track which OpSampledImages are ever used with Dref opcodes.
2018-07-04 14:26:23 +02:00
Hans-Kristian Arntzen
ffa9133d77
Support ternary expressions in OpSpecConstantOp.
2018-06-25 09:49:13 +02:00
Hans-Kristian Arntzen
d94d20f4f3
Deal with some builtins being declared with wrong signedness.
2018-06-22 11:30:56 +02:00
Hans-Kristian Arntzen
9d31154917
Deal with switch case labels which share a block.
2018-06-20 10:49:28 +02:00
Hans-Kristian Arntzen
6bcc890e63
Sanitize underscores in general, not just for members.
2018-06-04 10:13:57 +02:00
Hans-Kristian Arntzen
7cba89b4a5
Add reference files for SREM.
2018-05-24 10:26:11 +02:00
Jin Zhou
6b144cc609
handle OpSRem
2018-05-24 10:22:01 +02:00
Hans-Kristian Arntzen
3951b9456f
Fix SpecConstantComposite if input is SpecConstantOp.
2018-05-15 11:16:06 +02:00
Hans-Kristian Arntzen
7eba247864
Handle inout properly with split access chains.
...
Found some other issues. Had some bugs with variable writes not properly
invalidating if writes came from split access chains.
2018-05-11 10:15:42 +02:00
Hans-Kristian Arntzen
b71f5dfc0c
Fix split access chains for builtin arrays.
2018-05-08 15:34:20 +02:00
Hans-Kristian Arntzen
85a8f066f4
Do not use RMW rewrite for matrices.
...
Does not work on MSL.
2018-05-04 10:35:56 +02:00
Hans-Kristian Arntzen
d2df067dd4
Force recompile if we add row-major transpose functions in MSL.
2018-05-04 09:43:34 +02:00
Hans-Kristian Arntzen
17be3c652f
Deal with fake overloads when using combined image samplers.
2018-05-02 10:36:00 +02:00
Hans-Kristian Arntzen
47081f810a
Fix GatherDref on GLSL.
2018-04-30 12:45:23 +02:00
Hans-Kristian Arntzen
40bbf6be7a
Build combined dummy samplers for Query functions without sampler as well.
...
Deal with various query functions which require dummy sampler.
In SPIR-V, separate images are used, but GLSL (even Vulkan GLSL)
requires combined sampler images ...
2018-04-30 12:08:33 +02:00
Hans-Kristian Arntzen
d93807a625
Deal with OpImageFetch without explicit LOD.
2018-04-30 10:54:44 +02:00
Hans-Kristian Arntzen
aaf397cd1f
Fix usage tracking issue for OpImage.
2018-04-27 11:11:24 +02:00
Hans-Kristian Arntzen
0280800a8f
Fix case where SampledImage would get flushed to temporary.
2018-04-27 10:06:30 +02:00
Hans-Kristian Arntzen
f56433b802
Add new tests for combined arrays of sampler + image.
2018-04-23 12:28:05 +02:00
Hans-Kristian Arntzen
146ea76f52
Add test shader for subgroup.
...
Update SPIRV-Tools/glslang commits.
Use vulkan1.1 environment for testing.
Found new "errors" in SPIRV-Tools, so disable validation on those shaders
for now.
2018-04-11 10:29:47 +02:00
Hans-Kristian Arntzen
e1ccfd5dbb
Implement all of subgroup.
2018-04-10 17:16:41 +02:00
Hans-Kristian Arntzen
f6c0e53f58
Start adding Vulkan 1.1 subgroup support to GLSL.
2018-04-10 16:13:33 +02:00
Hans-Kristian Arntzen
694b314f87
Support empty structs.
...
Need to fake it by pretending it has one dummy member.
2018-04-05 16:26:54 +02:00
Hans-Kristian Arntzen
05c66f9cac
Add test shader which uses counter buffer extension.
2018-04-04 12:56:34 +02:00
Hans-Kristian Arntzen
a6e211e00b
Support dual-source blending on GLSL and MSL.
2018-04-03 16:04:49 +02:00
Hans-Kristian Arntzen
35f64d03bb
Fix name aliasing for temporary variables.
2018-03-24 01:53:49 +01:00
Hans-Kristian Arntzen
e7bf8d2f48
Refactor out noopt shaders to their own folders.
...
Makes maintenance easier with less clutter.
2018-03-13 10:39:49 +01:00
Hans-Kristian Arntzen
938c7debed
Handle control-dependent temporaries.
...
Derivatives, subgroup and implicit-lod instructions all need to happen
in the block they were created.
2018-03-12 17:34:54 +01:00
Hans-Kristian Arntzen
9fbd8b789e
Update tests for latest SPIRV-Tools and glslang.
2018-03-12 15:11:55 +01:00
Hans-Kristian Arntzen
e8e58844d4
Rewrite everything to use Bitset rather than uint64_t.
2018-03-12 13:24:14 +01:00
Hans-Kristian Arntzen
e3b8e9455c
Add test shader where a phi variable invalidates a temporary.
...
The temporary in question is used to flush a phi variable.
2018-03-09 14:42:26 +01:00
Hans-Kristian Arntzen
54549a624f
Add some test shaders for special merge methods.
2018-03-08 16:48:50 +01:00
Hans-Kristian Arntzen
922420e346
Disallow arrays and structs from becoming loop variables.
...
Fixes awkward code-gen issue.
2018-03-07 14:54:11 +01:00
Hans-Kristian Arntzen
0780820a7b
Skip interpolateAt tests with FP16.
2018-03-07 10:58:38 +01:00
Hans-Kristian Arntzen
547278da12
Test denormal fp16 constants.
2018-03-06 17:09:18 +01:00
Hans-Kristian Arntzen
05348a66ca
Add test shader for FP16 support.
2018-03-06 17:09:18 +01:00
Hans-Kristian Arntzen
5fe79eb59c
Update tests.
...
Adds an earlier reported shader packing failure into regression suite.
2018-03-05 16:34:42 +01:00
Hans-Kristian Arntzen
3c1b147272
Support Invariant for BuiltInPosition.
2018-03-01 12:31:39 +01:00
Hans-Kristian Arntzen
dd603eab58
Support spec constant array size in blocks.
...
Won't really be correct if the spec constant is changed outside
SPIRV-Cross, but nothing we can do about that, really.
2018-02-23 15:11:45 +01:00
Hans-Kristian Arntzen
a04bdcc7f7
Handle overloaded functions which share the same OpName.
...
Awkward, but legal SPIR-V.
2018-02-23 14:15:51 +01:00
Hans-Kristian Arntzen
047ad7df0f
Support special float constants (NaN/Inf).
2018-02-23 13:06:20 +01:00
Hans-Kristian Arntzen
fb3f92a3ff
Overhaul clip/cull distance support in GLSL.
2018-02-22 14:36:50 +01:00
Hans-Kristian Arntzen
1a2e4de7a5
Add test for texelFetch without sampler.
2018-02-21 13:45:59 +01:00
Hans-Kristian Arntzen
8a3bef2bd6
Add OpFRem tests.
2018-02-15 13:36:59 +01:00
Hans-Kristian Arntzen
843e34b604
Add IsFrontFace support to HLSL.
2018-02-15 12:42:56 +01:00
Hans-Kristian Arntzen
636cc30088
Fix case where hoisted temporaries were used before being declared.
2018-02-15 10:52:56 +01:00
Hans-Kristian Arntzen
00ccd590ee
Return arrays in HLSL/MSL by writing to an output variable instead.
2018-02-08 12:22:08 +01:00
Hans-Kristian Arntzen
9fa91f7e1c
Support returning arrays from functions in GLSL/MSL.
...
Not possible in HLSL apparently, need workaround ...
2018-02-08 12:22:08 +01:00
Hans-Kristian Arntzen
5d9df6a31c
Do not declare constant composites inline in HLSL.
...
Move arrays and structs out to their own global static constants.
Also, replace illegal names in HLSL as well.
2018-02-02 10:12:26 +01:00
Hans-Kristian Arntzen
8841f15283
Fix case where loop header branches into continue block.
2018-02-01 10:00:16 +01:00
Hans-Kristian Arntzen
09f550f718
Handle exponential explosion of code-gen during first phase of compile.
...
Certain patterns with OpVectorShuffle (and probably others) will cascade
to so large, that they can cause OOM. After we have observed
force_recompile, don't spend unnecessary memory emitting code which will
never be used.
2018-01-24 18:12:41 +01:00
Hans-Kristian Arntzen
af0a887997
Add test for false loop init.
...
Clean up how for loop variables are declared.
2018-01-23 21:15:09 +01:00
Hans-Kristian Arntzen
d0ce948df4
Do not merge swizzles for anything other than vectors.
2018-01-22 09:52:57 +01:00
Hans-Kristian Arntzen
b902d5400c
Do not use inline for-loop initializers with different types.
2018-01-16 10:27:58 +01:00
Hans-Kristian Arntzen
0f4adaa09d
Handle OpUnreachable in code-gen.
...
Forgot to add it to emit_block_chain. It should just be a noop.
2018-01-15 09:35:09 +01:00
Hans-Kristian Arntzen
d4e470babd
Analyze the CFG for temporaries as well.
...
Normally, temporary declaration must dominate any use of it,
so we generally did not need to analyze the CFG for these variables,
but there is an edge case where you have an inliner doing:
do {
create_temporary;
break;
} while(0);
use_temporary;
The inside of the loop dominates the outer scope, but we cannot emit
code like this in GLSL, so make sure we hoist these temporaries outside
the "loop".
2018-01-12 10:56:11 +01:00
Hans-Kristian Arntzen
27ad8c0922
Add more exhaustive test for barrier handling.
2018-01-09 12:26:46 +01:00
Hans-Kristian Arntzen
166eed8c18
Add test shaders for barriers.
2018-01-09 12:19:31 +01:00
Hans-Kristian Arntzen
9bdfd7025e
Fix tessellation control shaders from HLSL.
...
Need to take into account that gl_Position[i] needs to be rewritten as
gl_out[i].gl_Position instead.
2018-01-04 16:22:44 +01:00
Hans-Kristian Arntzen
41ffb1064e
Add basic test for viewport-index builtin.
2018-01-04 13:51:05 +01:00
Hans-Kristian Arntzen
2e68675ef7
Support mediump in desktop Vulkan GLSL.
2017-12-06 10:25:58 +01:00
Hans-Kristian Arntzen
6d7af5c83c
Add test for continue block lifting.
2017-12-05 17:44:52 +01:00
Hans-Kristian Arntzen
4a9d3cebd0
Merge pull request #355 from KhronosGroup/fix-345
...
Improve handling of block name declaration in GLSL.
2017-12-02 13:01:32 +01:00
Hans-Kristian Arntzen
3c52771aee
Make sure image integer coords are int, not uint.
...
HLSL can emit uint here.
2017-12-01 15:02:50 +01:00
Hans-Kristian Arntzen
2c90ea3acc
Improve handling of block name declaration in GLSL.
...
HLSL UAVs are a bit annoying because they can share block types,
so reflection becomes rather awkward. Sometimes we will need to make
some nasty fallbacks, so add a reflection interface which lets you query
post-shader compile which names was actually declared in the shader.
2017-12-01 14:30:10 +01:00
Hans-Kristian Arntzen
3ce6b2a23b
Make bitfield test noopt for now.
...
SPIRV-Tools trips assertion.
2017-11-23 09:59:25 +01:00
Hans-Kristian Arntzen
7e02f7fd62
Check more places where we can potentially read phi variables.
2017-11-23 09:50:11 +01:00
Hans-Kristian Arntzen
bcdff2d2e1
Fixups for PR #338 review.
2017-11-22 20:51:26 +01:00
Lou Kramer
6671f52334
Add support for new extensions.
2017-11-22 19:05:38 +01:00
Hans-Kristian Arntzen
b629ca1c33
Fix complicated Phi case.
...
A continue block might have used a temporary which existed only in the
loop body.
2017-11-21 09:27:49 +01:00
Hans-Kristian Arntzen
851e584338
Do not allow base expressions when extracting struct members.
2017-11-20 21:32:13 +01:00
Hans-Kristian Arntzen
dd604fec9a
Fix SSO for HLSL vertex shaders.
2017-11-17 13:37:28 +01:00
Hans-Kristian Arntzen
c68c72c5be
Fix ARB_enhanced_layout test.
2017-10-10 16:25:47 +02:00
Hans-Kristian Arntzen
4d11220aa8
Add a test for enhanced layouts.
2017-10-10 11:30:29 +02:00
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
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
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
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
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
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
Hans-Kristian Arntzen
016b1d86e9
Emit readonly, writeonly for SSBOs.
2017-01-21 10:08:27 +01:00
Arseny Kapoulkine
62b27f1d81
Implement access chain flattening support for row major matrices
...
We currently only support access chains that end in a matrix by propagating
"needs transpose" flag upstream which flips the matrix multiplication order.
It's possible to support indexed extraction as well, however it would have to
generate code like this:
vec4 row = vec4(UBO[0].y, UBO[1].y, UBO[2].y, UBO[3].y);
for a column equivalent of:
vec4 row = UBO[1];
It is definitely possible to do so but it requires signaling the vector output
that it needs to switch to per-component extraction which is a bit more trouble
than this is worth for now.
2017-01-17 23:26:23 -08:00
Arseny Kapoulkine
24c66250c7
Add tests for buffer block flattening
2017-01-17 23:26:18 -08:00
Hans-Kristian Arntzen
41f7e5b6a1
Add ability to have legacy-specific tests.
2017-01-16 09:08:06 +01:00
Hans-Kristian Arntzen
45c797d54c
Improve debuggability of Travis CI when things go wrong.
2016-12-16 13:48:30 +01:00
Hans-Kristian Arntzen
d11b8aa3ef
Optimize += 1, -= 1 to ++, --.
...
Purely cosmetic, but easier to read.
2016-12-16 13:24:49 +01:00