Commit Graph

1031 Commits

Author SHA1 Message Date
Joao Paulo Magalhaes
87e09f47f2 fix core library name 2017-05-31 10:18:27 +02:00
Joao Paulo Magalhaes
3db95327ac Added install targets to cmake. The following tree is produced:
.
./bin
./bin/spirv-cross.exe
./include
./include/spirv_cross
./include/spirv_cross/GLSL.std.450.h
./include/spirv_cross/spirv.hpp
./include/spirv_cross/spirv_cfg.hpp
./include/spirv_cross/spirv_common.hpp
./include/spirv_cross/spirv_cpp.hpp
./include/spirv_cross/spirv_cross.hpp
./include/spirv_cross/spirv_glsl.hpp
./include/spirv_cross/spirv_msl.hpp
./lib
./lib/spirv-cross-core.lib
./lib/spirv-cross-cpp.lib
./lib/spirv-cross-glsl.lib
./lib/spirv-cross-msl.lib
./share
./share/spirv_cross
./share/spirv_cross/cmake
./share/spirv_cross/cmake/spirv_crossConfig-release.cmake
./share/spirv_cross/cmake/spirv_crossConfig.cmake
./share/spirv_cross_cpp
./share/spirv_cross_cpp/cmake
./share/spirv_cross_cpp/cmake/spirv_cross_cppConfig-release.cmake
./share/spirv_cross_cpp/cmake/spirv_cross_cppConfig.cmake
./share/spirv_cross_glsl
./share/spirv_cross_glsl/cmake
./share/spirv_cross_glsl/cmake/spirv_cross_glslConfig-release.cmake
./share/spirv_cross_glsl/cmake/spirv_cross_glslConfig.cmake
./share/spirv_cross_msl
./share/spirv_cross_msl/cmake
./share/spirv_cross_msl/cmake/spirv_cross_mslConfig-release.cmake
./share/spirv_cross_msl/cmake/spirv_cross_mslConfig.cmake
2017-05-31 10:18:27 +02:00
Hans-Kristian Arntzen
f77d91e077 Merge pull request #189 from KhronosGroup/flatten-multidimensional-arrays
Add support for flattening multidimensional arrays into single dimension
2017-05-31 10:08:03 +02:00
Hans-Kristian Arntzen
326a7ffdf0 Check multidimensional extension in type_to_glsl_constructor. 2017-05-31 10:00:52 +02:00
Hans-Kristian Arntzen
470ae7a7f6 Add multidimensional array flattening test. 2017-05-31 10:00:52 +02:00
Hans-Kristian Arntzen
f0044b91a3 Add support for flattening multidimensional arrays. 2017-05-31 09:59:00 +02:00
Hans-Kristian Arntzen
842eff9647 Merge pull request #188 from KhronosGroup/sso
Add support for Separate Shader Objects
2017-05-31 09:55:34 +02:00
Hans-Kristian Arntzen
d93fcbdd9b Merge pull request #191 from hesiod/patch-1
Fix null pointer dereference
2017-05-30 21:57:48 +02:00
hesiod
ba381580af Fix null pointer dereference
write_string_to_file would try to write the error message that it failed to open a file stream to the very same file stream it just tried to open.
Fix this by writing to stderr instead.
2017-05-30 17:17:51 +03:00
Bill Hollings
b41e1482c8 Support emitting SPIR-V type declarations tuned for specified SPIR-V objects.
CompilerGLSL type_to_glsl() and image_type_glsl() functions support optional object ID.
Add SPIRType::Image::access member to support SPIR-V OpTypeImage access qualifier.
Remove SPIRType::Image::is_read and ::is_written members.
Use DecorationNonReadable and DecorationNonWritable to mark read/write access for image variables.
CompilerMSL emit access qualifiers per image variable, instead of per image type.
CompilerGLSL and CompilerHLSL behaviour is unchanged.
2017-05-29 20:45:05 -04:00
Bill Hollings
192bdc9516 CompilerMSL elide unused builtins from entry function input and output structs.
Add Compiler::has_active_builtin() function.
Update test reference shaders that included unused builtins.
2017-05-24 09:31:38 -04:00
Bill Hollings
d77de7ab80 CompilerMSL add support for MSL qualifiers on gl_ClipDistance and other array-based builtins. 2017-05-23 13:24:41 -04:00
Hans-Kristian Arntzen
20f7314881 Merge pull request #186 from brenwill/master
CompilerMSL map many GLSL functions to MSL functions
2017-05-23 17:35:12 +02:00
Bill Hollings
0f97ffd8be Fix merge conflicts with upstream master, plus fixes from review of PR #186. 2017-05-23 10:44:10 -04:00
Hans-Kristian Arntzen
a3b25d12cb Merge pull request #178 from KhronosGroup/msl-point-size
Implement more sophisticated check for point_size.
2017-05-23 17:30:44 +09:00
Hans-Kristian Arntzen
8d43908e66 Fix ternary statement. 2017-05-23 10:15:22 +02:00
Hans-Kristian Arntzen
91379fb0d0 Implement more sophisticated check for point_size. 2017-05-23 10:15:22 +02:00
Bill Hollings
c1b8154f2c CompilerMSL fix variables used in interface blocks aren't resolved correctly (#179). 2017-05-22 21:41:19 -04:00
Bill Hollings
a71c547b30 CompilerMSL remove pad_and_pack_uniform_structs option from both API and CLI tool. 2017-05-22 16:38:38 -04:00
Bill Hollings
542e8c37ad Edits resulting from review of PR #186. 2017-05-22 13:38:23 -04:00
Bill Hollings
94fdcecce9 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-05-22 11:57:25 -04:00
Hans-Kristian Arntzen
167fffd4af Enforce the standard builtin array names. 2017-05-22 15:55:42 +02:00
Hans-Kristian Arntzen
623eaebdf8 Add test shaders for SSO. 2017-05-22 15:53:38 +02:00
Hans-Kristian Arntzen
36650c890c Add separate shader object support.
Allow redeclaring gl_PerVertex for stage compatibility.
2017-05-22 15:53:21 +02:00
Hans-Kristian Arntzen
c3e6fdc579 Merge pull request #187 from KhronosGroup/spirv-1.2
Support SPIR-V 1.2.
2017-05-22 21:09:52 +09:00
Hans-Kristian Arntzen
e5595270c7 Support SPIR-V 1.2.
It's the default with recent spirv-as, so be more friendly.
2017-05-22 13:59:58 +02:00
Bill Hollings
d677e63860 Merge with upstream 2017-05-19 19:36:24 -04:00
Bill Hollings
8f6df770ce CompilerMSL map many GLSL functions to MSL functions.
Add bool members is_read and is_written to SPIRType::Image.
Output correct texture read/write access by marking whether textures
are read from and written to by the shader.
Override bitcast_glsl_op() to use Metal as_type<type> functions.
Add implementations of SPIR-V functions inverse(), degrees() & radians().
Map inverseSqrt() to rsqrt().
Map roundEven() to rint().
GLSL functions imageSize() and textureSize() map to equivalent
expression using MSL get_width() & get_height() functions.
Map several SPIR-V integer bitfield functions to MSL equivalents.
Map SPIR-V atomic functions to MSL equivalents.
Map texture packing and unpacking functions to MSL equivalents.
Refactor existing, and add new, image query functions.
Reorganize header lines into includes and pragmas.
Simplify type_to_glsl() logic.
Add MSL test case vert/functions.vert for added function implementations.
Add MSL test case comp/atomic.comp for added function implementations.
test_shaders.py use macOS compilation for MSL shader compilation validations.
2017-05-19 18:14:08 -04:00
Hans-Kristian Arntzen
a0d0a0ec9e Merge pull request #162 from KhronosGroup/hlsl-counter-buffer
Add interface for reflecting "magic" HLSL counter buffers.
2017-05-09 09:50:44 +02:00
Hans-Kristian Arntzen
4fef0f3227 Fix switch statement. 2017-05-09 09:41:17 +02:00
Hans-Kristian Arntzen
9c9e2674d2 Fix typo. 2017-05-09 09:38:33 +02:00
Hans-Kristian Arntzen
08b3c674a9 Check size of name before testing for @count. 2017-05-09 09:30:30 +02:00
Hans-Kristian Arntzen
ec45c9efb3 Add interface for reflecting "magic" HLSL counter buffers. 2017-05-09 09:21:54 +02:00
Hans-Kristian Arntzen
95d4cbcd8c Merge pull request #165 from KhronosGroup/hlsl-separate-image-sampler
HLSL: Support for separate image/samplers.
2017-05-07 13:48:35 +02:00
Hans-Kristian Arntzen
e897d154ac Cleanups. 2017-05-07 13:39:15 +02:00
Hans-Kristian Arntzen
947f7010c7 HLSL: Use emit_sampled_image_op instead. 2017-05-07 13:28:08 +02:00
Hans-Kristian Arntzen
686ac6812b HLSL: Can pass down combined image samplers as arguments. 2017-05-07 13:22:16 +02:00
Hans-Kristian Arntzen
59ad08429b HLSL: Add test for passing down separate image and samplers to functions. 2017-05-07 12:53:51 +02:00
Hans-Kristian Arntzen
f081fe1125 Fix separate sampler images in MSL. 2017-05-07 12:36:14 +02:00
Hans-Kristian Arntzen
36e1c470a2 Fix formatting. 2017-05-06 13:59:00 +02:00
Hans-Kristian Arntzen
89d57e15ba Add test case for combined depth image sampler in GLSL. 2017-05-06 13:56:45 +02:00
Hans-Kristian Arntzen
07ee7d09cb Fix deep call hierarchies in CombinedImageSamplerUsageHandler. 2017-05-06 13:53:06 +02:00
Hans-Kristian Arntzen
3eb8a34173 Declare variables and parameters with samplerShadow if necessary. 2017-05-06 13:35:02 +02:00
Hans-Kristian Arntzen
f4d7268565 GLSL will also need shadow state analysis.
Refactor stuff out to top-level.

Fix some bugs with combined shadow samplers in regular GLSL.
2017-05-06 13:21:35 +02:00
Hans-Kristian Arntzen
100e9d34b8 HLSL: Basic support for separate image/samplers. 2017-05-06 12:39:04 +02:00
Hans-Kristian Arntzen
e876cdf3ff Merge pull request #177 from brenwill/master
CompilerMSL output [[point_size]] attribute for BuiltInPointSize member by default.
2017-05-06 11:46:28 +02:00
Bill Hollings
f9f87ca391 CompilerMSL output [[point_size]] attribute for BuiltInPointSize member by default.
CompilerMSL::Options::is_rendering_points defaults to true.
2017-05-05 16:13:55 -04:00
Hans-Kristian Arntzen
860a044562 Merge pull request #175 from KhronosGroup/hlsl-fixes
Various HLSL fixes
2017-05-04 10:44:00 +02:00
Hans-Kristian Arntzen
2b4c3db7e3 Don't enable point_size_compat by default. 2017-05-04 10:32:43 +02:00
Hans-Kristian Arntzen
851acf3712 Avoid boolean mix in HLSL.
Update glslang travis checkout as boolean mix support was broken on that commit.
2017-05-04 10:28:30 +02:00