Bill Hollings
fe8b8604bc
For MSL, extract global var refs from within functions and convert them to function args.
2016-07-06 16:55:45 -04:00
Hans-Kristian Arntzen
d5dc5f3f1c
Fix issue with new glslang behavior for samplers as parameters.
...
Check case where storage class uniform is passed as function parameter.
2016-07-05 13:21:26 +02:00
Bill Hollings
8f2dec358c
Add support for BuiltInFragCoord (changed from BuiltInSamplePosition).
2016-07-04 11:49:46 -04:00
Bill Hollings
449335fd34
Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross
2016-06-13 19:49:43 -04:00
Hans-Kristian Arntzen
5f629276a7
Use Boolean instead of Bool.
...
Xlib.h header uses a very ugly define for Bool which conflicts with
SPIRV-Cross.
The hassle free solution is to use Boolean instead.
2016-06-05 20:13:45 +02:00
Bill Hollings
691844f9d7
Support builtin inputs glVertexIndex, glVertexID, glInstanceIndex and glInstanceID
...
even if they are not identified in the SPIR-V.
2016-05-31 20:27:13 -04:00
Hans-Kristian Arntzen
5ea59bd11b
Non-functional: Update formatting.
2016-05-23 13:30:02 +02:00
Hans-Kristian Arntzen
6aa2007cba
Deal better with OpName and OpMemberName which alias.
...
OpName is only for debug information, so we must be very careful that
we do not reuse the same name for different variables.
This was previously done for local variables, but this commit extends
this to global variables as well.
2016-05-23 13:19:41 +02:00
Hans-Kristian Arntzen
4b8ed53974
Add Clang format.
...
Reformats the entire codebase. Better to do it now than later.
Adds .clang-format and a convenience script format_all.sh which formats
everything automatically.
2016-05-05 09:40:58 +02:00
Hans-Kristian Arntzen
926916d745
Add -Wshadow.
...
Fixes lots of dubious variable shadowing.
2016-05-05 09:15:25 +02:00
Bill Hollings
2436f4cb5c
CompilerMSL DimBuffer image type uses 2D MTLTexture.
2016-04-29 15:04:17 +02:00
Bill Hollings
762947e3dd
CompilerMSL move Private global variables to entry-point function variables.
...
CompilerMSL add support for texture read() without sampler for OpImageFetch.
2016-04-27 19:54:33 +02:00
Bill Hollings
5aafb28cc7
Track sampler ID in Meta for OpSampledImage objects.
...
Add virtual CompilerGLSL emit_sampled_image_op function for OpSampledImage.
Under MSL, set sampler ID for local OpSampledImage objects and extract it when emitting sampler.
2016-04-23 21:47:41 -04:00
Bill Hollings
1dbd18daaf
Add pixel type qualifier to MSL image type names.
...
Add MSL support for half-precision base formats (short, ushort, half).
2016-04-21 20:47:57 -04:00
Bill Hollings
fa46c14a78
Clean up commented uniform code and replace with TODO statement.
2016-04-11 17:34:26 -04:00
Bill Hollings
257b10eef4
Fix MSL reference to instruction stream modified in subclass update.
2016-04-11 14:16:12 -04:00
Bill Hollings
78b6877368
MSL outputs vertex input struct even when vertex attribute configuration input is missing.
2016-04-11 13:28:43 -04:00
Bill Hollings
b2e313ef3e
Support 3 compilation loops for MSL.
2016-04-11 12:23:31 -04:00
Bill Hollings
f9e5fb38b8
Fix compiler warnings.
2016-04-11 10:19:20 -04:00
Bill Hollings
6ddd80e3fe
Fixes from code review of MSL functionality.
...
Rename MSLOptions to MSLConfiguration.
Convert tabs to spaces.
Replace Builtin with uint32_t as map key.
2016-04-08 15:12:40 -04:00
Bill Hollings
8f30f07eb5
Clarify CompileMSL config parameters and move to compile() function.
...
CompileMSL supports marking vertex attributes and resource bindings
as to whether they are used by the shader, and feeding back to caller.
2016-04-07 21:25:51 -04:00
Bill Hollings
103aabf5e8
Initial support for Metal Shading Language.
2016-04-06 17:42:27 -04:00