Commit Graph

419 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
41f7e5b6a1 Add ability to have legacy-specific tests. 2017-01-16 09:08:06 +01:00
Robert Konrad
9802823deb Re-add accidentally removed break 2017-01-15 22:42:22 +01:00
Robert Konrad
881725fb36 Remove video code I accidentally put in 2017-01-15 16:48:01 +01:00
Robert Konrad
a778c363e1 Format code 2017-01-15 16:39:03 +01:00
Robert Konrad
fe5de5e03c Merge branch 'original' into metalcat 2017-01-15 16:33:14 +01:00
Polona Caserman
84c3092aba Merge with KhronosGroup/SPIRV-Cross 2017-01-15 16:21:15 +01:00
Polona Caserman
47808ec6f3 Add function global variables 2017-01-15 16:05:15 +01:00
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
27f4f75513 Run format_all.sh. 2017-01-13 16:32:54 +01:00
Hans-Kristian Arntzen
fadaec205b Improvements to legacy GLSL output.
- By default, emit uniform structs for UBOs, like push constant.
- Forward transpose information,
  and optimize transpose(matrix) * vector to vector * matrix.
2017-01-13 16:31:13 +01:00
Hans-Kristian Arntzen
a3bac9e4ce Merge pull request #95 from KhronosGroup/msvc-maintenance
MSVC maintenance.
2017-01-12 12:23:05 +01:00
Hans-Kristian Arntzen
ce3fe29557 MSVC maintenance. 2017-01-12 10:57:44 +01:00
Hans-Kristian Arntzen
b50513c03a Merge pull request #94 from eoma/fix-locale-independent-float-conversions
Use the classic locale when converting floats to string
2017-01-11 19:17:36 +01:00
Endre Oma
6ad8b307a1 Use the classic locale when converting floats to string 2017-01-11 17:06:06 +01:00
Hans-Kristian Arntzen
4c05b8c3e3 Merge pull request #93 from eoma/fix-glm-swizzle
Switch to GLM_FORCE_SWIZZLE from deprecated GLM_SWIZZLE
2017-01-09 20:53:32 +01:00
Endre Oma
42ca3d9956 Switch to GLM_FORCE_SWIZZLE from deprecated GLM_SWIZZLE 2017-01-09 18:03:54 +01:00
Hans-Kristian Arntzen
81238656ea Merge pull request #91 from brenwill/master
Refactor emit_texture_op() function.
2017-01-08 15:14:56 +01:00
Bill Hollings
4e915e8c48 Run style formatter. 2017-01-08 08:52:57 -05:00
Bill Hollings
4a6358bb9f Add clean_func_name() to support overrides to function names. 2017-01-07 22:15:58 -05:00
Bill Hollings
e6dab816b0 Removed names of unused function parameters. 2017-01-07 15:55:04 -05:00
Bill Hollings
91367799b0 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-01-06 14:13:56 -05:00
Hans-Kristian Arntzen
c7659507e8 Merge pull request #90 from gwihlidal/master
Improve useability of get_decoration and friends.
2017-01-05 23:07:40 +01:00
Graham Wihlidal
2edc350aa1 Remove whitespace 2017-01-05 21:04:42 +01:00
Graham Wihlidal
bcfe2be332 Coding style fix 2017-01-05 21:02:57 +01:00
Graham Wihlidal
9b1ee8f10a Improve fix for boolean decorations queried in get_decoration, added support to get_member_decoration, and updated comments to reflect the change in behavior. 2017-01-05 21:01:49 +01:00
Graham Wihlidal
acd98ac0d5 Fix typo in comment 2017-01-05 21:00:05 +01:00
Graham Wihlidal
a4818f4391 Explicitly truncate (to keep the fprintf easily portable) 2017-01-05 20:51:14 +01:00
Hans-Kristian Arntzen
0338a5c755 Merge pull request #89 from KhronosGroup/nowrite-noread-fix
Fix handling of NoWrite/NoRead decoration for images.
2017-01-05 20:37:59 +01:00
Graham Wihlidal
862a71b4d3 Fix Compiler::get_decoration to correctly return > 0 if DecorationNonWritable or DecorationNonReadable are specified. 2017-01-05 20:19:59 +01:00
Graham Wihlidal
fadc1f9e10 Fix for "error C4146: unary minus operator applied to unsigned type, result still unsigned" 2017-01-05 20:14:53 +01:00
Graham Wihlidal
33bee8a12e Fix for "warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data" 2017-01-05 20:14:34 +01:00
Hans-Kristian Arntzen
97f7ab865a Fix handling of NoWrite/NoRead decoration for images.
The old workaround for glslang is no longer needed, so only apply workaround
carefully.
2017-01-05 18:16:33 +01:00
Hans-Kristian Arntzen
3576cfb158 Fix warning in MSL. 2017-01-05 18:16:22 +01:00
Bill Hollings
e27a5f7df6 CompilerMSL refactored to simplify handling of vertex attributes.
Combine all vertex attributes into a single stage_in structure.
Remove unneeded structure members from MSLConfiguration, MSLVertexAttr and Meta::Decoration.
Remove unneeded CompilerMSL functions that supported struct offsets and padding.
2017-01-01 14:43:20 -05:00
Bill Hollings
a2b8a0e5c9 Refactor emit_texture_op() function.
CompilerGLSL add to_function_name() and to_function_args() functions to organize
structure of emit_texture_op() function.
CompilerMSL add support for MSL gather(), gather_compare() and sample_compare() functions.
2016-12-28 18:36:42 -05:00
Hans-Kristian Arntzen
c8e2269a78 Merge pull request #87 from brenwill/master
MSL enhancements
2016-12-22 11:22:16 +01:00
Bill Hollings
7d38f1822a CompilerMSL fixes to support pull-request feedback.
Make Compiler::OpcodeHandler and Compiler::traverse_all_reachable_opcodes protected
instead of private, for use by subclasses.
Add CompilerMSL::CustomFunctionHandler and traverse_all_reachable_opcodes() to detect
active opcodes that require the output of a custom function.
CompilerMSL::custom_function_ops use std::set to retain ordering to improve testability.
2016-12-21 16:31:13 -05:00
Bill Hollings
b1b68db835 Resolve conflict with upstream pull. 2016-12-21 11:43:32 -05:00
Hans-Kristian Arntzen
9ccd1aea42 Merge pull request #85 from godlikepanos/master
Add the option to build without exceptions
2016-12-19 12:32:04 +01:00
Bill Hollings
1a5dc0edcd CompilerMSL support emitting custom functions for SPIR-V ops.
CompilerMSL use custom mod() function instead of Metal's fmod() function.
2016-12-18 21:42:10 -05:00
Bill Hollings
32ae2eceed CompilerMSL enhancements to handling of in/out variables.
CompilerMSL sort in/out attributes by attribute number (location). Sort inputs in reverse order.
CompilerMSL propagate incoming vertex attribute offset values.
CompilerMSL elide unused in/out variables.
CompilerMSL replace use of sets with unordered_sets.
2016-12-18 18:48:15 -05:00