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
Bill Hollings
943191a1c8
Compliance fixes for pull request.
...
Use C++ style primitive casts.
Add BackendVariations.discard_literal to support language variation for discard syntax.
Tweaks to custom MSL defines.
2016-10-27 10:20:01 -04:00
Hans-Kristian Arntzen
48636b4af8
Fix style nits from last merge.
2016-10-27 13:56:10 +02:00
Hans-Kristian Arntzen
376f19cf61
Merge branch 'master' of git://github.com/baszalmstra/SPIRV-Cross
2016-10-27 13:53:22 +02:00
Bas Zalmstra
e042eab551
Changed keywords to const static unordered_set and indented the keywords
2016-10-27 13:48:15 +02:00
Bas Zalmstra
f537adf6e9
Added all glsl reserved keywords to replace_illegal_names
2016-10-27 12:51:22 +02:00
Bill Hollings
ac00c6032f
Run clang-format.
2016-10-24 09:24:24 -04:00
Bill Hollings
0943d9fece
MoltenVK shader converter handle missing names.
...
Use entry point name if no function name provided.
When flattening in/out structs, qualify member names with struct name.
Fix issue when determining declared size of struct types.
Refactor use of m_ name prefix.
Identify header defines in MSL code.
2016-10-23 21:42:54 -04:00
Nathaniel Brown
9577568d56
Corrects some problems converting to compilable MSL from SPIRV. A better solution is to refactor the glsl compiler base-class so some keywords and actions can be overridden, and then the msl subclass can override them - this is a quick & dirty solution.
...
- adds some common macros that correct for intrinsic differences
- adds some inline functions to adapt for GLSL terms
- injects structure member names when the original SPV has been stripped - there is another way to use the correct temporarily assigned member name, but using m_<id> based on the inside SPV code yields metal code that more correctly maps to the original SPV opcodes/slots.
2016-10-21 13:48:21 -07:00
Bill Hollings
a759e2c872
Merge Brenwill fork with upstream.
2016-10-19 14:09:51 -07:00
Hans-Kristian Arntzen
206cb9157c
Handle interpolation qualifiers inside IO blocks.
2016-10-07 16:30:11 +02:00
Hans-Kristian Arntzen
a2d2d2e6fb
Merge git://github.com/Kangz/SPIRV-Cross
2016-10-05 23:21:26 +02:00
Corentin Wallez
ef9ee49276
Fix compilation on some old C++11 standard libraries.
2016-10-05 16:13:51 -04:00
Hans-Kristian Arntzen
f10fbc8131
Split CMake build into separate static libs.
...
Makes it easier to use SPIRV-Cross from other CMake projects.
2016-10-05 21:43:04 +02:00
Hans-Kristian Arntzen
301e981203
Merge pull request #60 from KhronosGroup/spec-constant
...
Add more complete specialization constant support
2016-10-03 17:33:28 +02:00
Hans-Kristian Arntzen
253b15ff0c
Remove fixed FIXME.
2016-10-03 17:25:20 +02:00
Hans-Kristian Arntzen
5d4bb687bc
Support arrays which have spec constant size.
...
The size of an array can be a specialization constant or a spec constant
op. This complicates things quite a lot.
Reflection becomes very painful in the presence of expressions instead
of literals so add a new array which expresses this.
It is unlikely that we will need to do accurate reflection of interface
types which have specialization constant size.
SSBOs and UBOs will for now throw exception if a dynamic size is used since it
is very difficult to know the real size.
2016-10-03 17:17:11 +02:00
Hans-Kristian Arntzen
7e8afa872b
Implement OpSpecConstantOp.
...
The details here get quite hairy, and it's not complete as not all
functionality is implemented in glslang yet.
2016-10-03 15:54:02 +02:00
Hans-Kristian Arntzen
081620f811
Emit spec constants directly with Vulkan semantics.
...
Emit an actual spec constant declaration in Vulkan instead of resolving
the constant.
2016-10-03 12:52:56 +02:00