Commit Graph

262 Commits

Author SHA1 Message Date
Polona Caserman
5775dcfcc6 Check if a variable has a valid name 2017-01-15 16:05:14 +01:00
Polona Caserman
3b2dab99a6 Check if this arg is an uniform pointer 2017-01-15 16:05:14 +01:00
Polona Caserman
16834e5832 Sort fragment input variables and vertex output variables alphabetical 2017-01-15 16:05:14 +01:00
Polona Caserman
a496a40f98 Adjust clip-space for Metal 2017-01-15 16:05:13 +01:00
Polona Caserman
20d2b59c8d Buffer counter modified 2017-01-15 16:05:13 +01:00
Polona Caserman
742ec49946 Create uniform struct 2017-01-15 16:05:12 +01:00
Polona Caserman
df3e4c3eb3 Check if function name contains _main 2017-01-15 16:05:12 +01:00
Polona Caserman
5de757621c Set function name 2017-01-15 16:05:12 +01:00
Polona Caserman
989563ad3f Add uniform structure 2017-01-15 16:05:11 +01:00
Polona Caserman
bafde4e917 Check if the location of the original variable is set 2017-01-15 16:05:11 +01:00
Hans-Kristian Arntzen
2f48065ec1 Merge pull request #86 from KhronosGroup/for-loop-fix
Fix for loops for legacy ESSL.
2016-12-16 14:14:19 +01:00
Hans-Kristian Arntzen
44b3216611 Sort loop variables to make sure Travis CI runs are reproducable. 2016-12-16 14:01:09 +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
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