Hans-Kristian Arntzen
d11b8aa3ef
Optimize += 1, -= 1 to ++, --.
...
Purely cosmetic, but easier to read.
2016-12-16 13:24:49 +01:00
Hans-Kristian Arntzen
62613df5a5
Optimize for read-modify-writes.
...
Required for legacy loop increments.
2016-12-16 13:14:22 +01:00
Hans-Kristian Arntzen
a714d424d0
Add directed test for for-loop-init.
2016-12-16 12:43:12 +01:00
Hans-Kristian Arntzen
51d45511a6
Check if we can use multiple initializers.
...
Need same type and qualifiers in GLSL and friends.
2016-12-15 17:54:49 +01:00
Hans-Kristian Arntzen
4f07a32c29
Begin implementing for loop initializer propagation.
2016-12-15 17:44:47 +01:00
Hans-Kristian Arntzen
fcc962057a
Merge pull request #84 from brenwill/master
...
Support row-major matrices in access chain when not natively supporte…
2016-12-15 09:51:46 +01:00
Bill Hollings
1358362075
Fixes to non-native row-major matrix support.
...
Add support for OpLoad. Throw exception for non-square non-native row-major matrix.
Update variable and function names to clarify purposes.
2016-12-14 02:12:52 -05:00
Bill Hollings
343677e639
Support row-major matrices in access chain when not natively supported by backend (MSL).
2016-12-11 11:01:08 -05:00
Hans-Kristian Arntzen
875c32fd39
Use correct link for Travis CI build status.
2016-12-08 22:33:40 +01:00
Hans-Kristian Arntzen
0a065ff594
Add Travis CI build result to README.
2016-12-08 22:31:27 +01:00
Hans-Kristian Arntzen
b8cdb69220
Merge pull request #83 from zeux/travis-ci
...
Add Travis build
2016-12-08 21:36:32 +01:00
Arseny Kapoulkine
0f22399821
Travis: Checkout a specific glslang version
...
This will help avoid test output mismatches due to glslang changes
2016-12-08 02:34:10 -08:00
Arseny Kapoulkine
4a05dcaeca
Add Travis build
...
Builds on both Linux and OSX and tests all shaders for regressions. The
shader set currently does not include any Metal shaders but once it does
we should be able to also validate the resulting MSL using Xcode metal
compiler.
2016-12-08 02:26:36 -08:00
Hans-Kristian Arntzen
14977efc8c
Merge pull request #81 from KhronosGroup/defer-parens
...
Defer parenthesis generation until needed.
2016-12-08 09:05:59 +01:00
Hans-Kristian Arntzen
b8b202f489
Add more dedicated test shader for defer-parens.
2016-12-08 09:05:30 +01:00
Hans-Kristian Arntzen
03a26e593d
Fixes for MSL and strip redundant parens in some places.
2016-12-06 23:03:35 +01:00
Hans-Kristian Arntzen
ea781e602c
Fix code generated from optimized OpCompositeExtract.
2016-12-06 17:19:34 +01:00
Hans-Kristian Arntzen
e67f6f85a4
Defer parenthesis generation until needed.
...
Previously, we would generate parentheses proactively when generating
binary ops, however, this leads to uglier code and hits warnings in
compilers when used as a conditional.
2016-12-05 10:56:54 +01:00
Hans-Kristian Arntzen
cc207e32c8
Merge pull request #80 from brenwill/master
...
MSL sort interface struct members by offset instead of location.
2016-12-05 09:08:55 +01:00
Bill Hollings
72df15061d
CompilerMSL do not clear used_by_shader flag of
...
contextual vertex attributes and resource bindings.
2016-12-04 21:57:29 -05:00
Bill Hollings
aca1b55449
MSL sort interface struct members by offset instead of location.
...
MSL support OpFMod as fmod() function.
Remove SPIRType::is_packed member.
2016-12-04 12:32:58 -05:00
Hans-Kristian Arntzen
b9600aa8d3
Only dump block size for blocks which have a physical size.
...
I/O variables can also be blocks, but they have no physical size.
2016-11-29 09:07:51 +01:00
Hans-Kristian Arntzen
740fce8ebd
Merge pull request #77 from KhronosGroup/nested-struct-fix
...
Fix get_declared_struct_size for nested arrays of structs.
2016-11-28 15:39:15 +01:00
Hans-Kristian Arntzen
2d79d365dc
Fix get_declared_struct_size for nested arrays of structs.
...
The array size was dropped from consideration during recursion.
2016-11-28 15:01:36 +01:00
Hans-Kristian Arntzen
d14a29f893
Merge pull request #76 from brenwill/master
...
CompilerMSL fix cast error & add minor feature to CompilerGLSL
2016-11-28 14:35:16 +01:00
Bill Hollings
c2e6013f4b
CompilerMSL supports promoting unnamed global vars to function args.
...
CompilerMSL use correct MSL type name for 3D textures.
2016-11-27 15:00:06 -05:00
Bill Hollings
c5c073699e
CompilerMSL fix func_call_arg() cast error when not passed SPIRVariable type.
...
CompilerGLSL allow retrieval of partial source if an error occurs.
2016-11-27 12:34:04 -05:00
Hans-Kristian Arntzen
9075262787
Use -D__STDC_LIMIT_MACROS.
...
Avoids random #ifndef.
2016-11-25 23:40:28 +01:00
rob
70ea5a6469
Updated Android build
2016-11-25 13:22:11 +09:00
Hans-Kristian Arntzen
43020e2f74
Merge pull request #73 from luboslenco/master
...
Legacy GL_ARB_shader_texture_lod support.
2016-11-22 08:19:39 +01:00
Lubos Lenco
0028b4f278
Legacy GL_ARB_shader_texture_lod support.
2016-11-21 22:37:20 +01:00
Hans-Kristian Arntzen
7630d3cc9c
MSVC maintenance.
...
Fix compilation and warnings.
2016-11-21 12:18:45 +01:00
Hans-Kristian Arntzen
810fa633d0
Merge pull request #71 from KhronosGroup/cfg-analysis
...
WIP: Add control flow graph analysis for variable scoping
2016-11-21 09:11:54 +01:00
Hans-Kristian Arntzen
69761cc80f
Merge pull request #72 from cdwfs/python3
...
Fixed python3 detection for spirv-cross-test.
2016-11-19 11:37:23 +01:00
Cort
ffb6613482
Fixed python3 detection for spirv-cross-test.
...
Windows Python 3.x installations do not include a python3.exe; this
caused the old test to fail and issue a spurious warning.
2016-11-18 14:02:48 -08:00
Hans-Kristian Arntzen
b847c88559
Cleanup, and make cfg analysis optional.
2016-11-18 17:06:49 +01:00
Hans-Kristian Arntzen
5ff11cc689
Handle more corner cases with the CFG traversal.
2016-11-18 16:45:11 +01:00
Hans-Kristian Arntzen
0c9683cd85
Distinguish between cross edges and back edges.
...
Handle the weird opcodes CopyMemory/CopyObject.
2016-11-18 09:59:54 +01:00
Hans-Kristian Arntzen
edbe867b74
Improve handling of dead blocks.
...
All tests pass now.
Still need to handle OpFunction, atomics, OpPhi, etc ...
2016-11-17 22:15:07 +01:00
Hans-Kristian Arntzen
dad4a34072
Start adding CFG analysis.
...
Not complete yet, but partly working ...
2016-11-17 16:58:05 +01:00
Hans-Kristian Arntzen
f7ce25b6c2
Add some documentation for HLSL.
2016-11-13 11:24:13 +01:00
Hans-Kristian Arntzen
67aad48e50
Run format.sh.
2016-11-12 10:04:50 +01:00
Hans-Kristian Arntzen
526d06d0a4
Add more descriptive error message.
2016-11-12 10:04:42 +01:00
Hans-Kristian Arntzen
81c3caeeca
Merge pull request #67 from brenwill/master
...
When flattening global structs for MSL, don't qualify names of built-…
2016-11-11 09:20:08 +01:00
Bill Hollings
23ff950390
When flattening global structs for MSL, don't qualify names of built-in members.
2016-11-10 21:07:50 -05:00
Hans-Kristian Arntzen
8199986c0e
Merge pull request #64 from brenwill/master
...
Support MSL-specific functions
2016-10-28 09:09:35 +02:00
Bill Hollings
2f68ea39f1
Merge upstream.
2016-10-27 19:03:01 -04:00
Bill Hollings
f5f910483b
Support MSL-specific functions.
...
Add CompilerMSL emit_instruction() and emit_glsl_op() functions
to handle MSL-specific operation and function definitions.
Remove CompilerMSL emit_msl_defines() function.
2016-10-27 18:47:17 -04:00
Hans-Kristian Arntzen
03abf6a534
Fix formatting after merge.
2016-10-27 16:27:15 +02:00
Hans-Kristian Arntzen
75c2285f6e
Merge branch 'master' of git://github.com/brenwill/SPIRV-Cross
2016-10-27 16:26:00 +02:00