Commit Graph

86 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
88ce958a51 Add ray-tracing reflection to main.cpp and C API. 2019-03-27 10:21:30 +01:00
Hans-Kristian Arntzen
0474848d4a GLSL: Support emitting push constant block as a plain UBO. 2019-03-19 10:58:52 +01:00
Hans-Kristian Arntzen
e47a77d596 MSL: Implement Metal 2.0 indirect argument buffers. 2019-03-15 11:01:27 +01:00
Hans-Kristian Arntzen
074f765a83 Explicitly pass down paths to glslang/spirv-tools.
Windows and CMake really cannot get along with %PATH%, sigh ...
2019-03-07 12:36:16 +01:00
Hans-Kristian Arntzen
79d995caab Gracefully fall back in test suite if we haven't built deps. 2019-03-07 10:22:58 +01:00
Hans-Kristian Arntzen
f0ad0f1015 Add ubsan and msan. 2019-03-05 11:15:08 +01:00
Hans-Kristian Arntzen
5341a189ff Add support for sanitizing address and threads. 2019-03-05 10:11:04 +01:00
Hans-Kristian Arntzen
afef135dd8 Add a simple SPIR-V for purposes of smoke testing the C API. 2019-03-04 11:37:01 +01:00
Hans-Kristian Arntzen
3699ead741 Add C sample code to the README. 2019-03-04 11:33:01 +01:00
Hans-Kristian Arntzen
ee11bb3bc6 Add a C API smoke test. 2019-03-04 11:14:33 +01:00
Hans-Kristian Arntzen
e74c21a39b Review fixups. 2019-03-04 10:08:31 +01:00
Hans-Kristian Arntzen
9bbdccddb7 Add a stable C API for SPIRV-Cross.
This adds a new C API for SPIRV-Cross which is intended to be stable,
both API and ABI wise.

The C++ API has been refactored a bit to make the C wrapper easier and
cleaner to write. Especially the vertex attribute / resource interfaces
for MSL has been rewritten to avoid taking mutable pointers into the
interface. This would be very annoying to wrap and it didn't fit well
with the rest of the C++ API to begin with. While doing this, I went
ahead and removed all the old deprecated interfaces.

The CMake build system has also seen an overhaul.
It is now possible to build static/shared/CLI separately with -D
options.
The shared library only exposes the C API, as it is the only ABI-stable
API. pkg-configs as well as CMake modules are exported and installed for
the shared library configuration.
2019-03-01 11:53:51 +01:00
Hans-Kristian Arntzen
6157bf3cae Add Windows support in Travis CI.
- Add new Windows support
- Use CMake/CTest instead of Make + shell scripts
- Use --parallel in CTest
- Fix CTest on Windows
- Cleanups in test_shaders.py
- Force specific commit for SPIRV-Headers
- Fix Inf/NaN odd-ball case by moving to ASM
2018-10-27 00:22:30 +02:00
Hans-Kristian Arntzen
5bcf02f7c9 Hoist out parsing module from spirv_cross::Compiler.
This is a large refactor which splits out the SPIR-V parser from
Compiler and moves it into its more appropriately named Parser module.

The Parser is responsible for building a ParsedIR structure which is
then consumed by one or more compilers.

Compiler can take a ParsedIR by value or move reference. This should
allow for optimal case for both multiple compilations and single
compilation scenarios.
2018-10-19 12:01:31 +02:00
Jian Yang
df6574d764 fix typo in CMakeLists.txt 2018-08-04 14:40:06 +08:00
Brad Davis
709d3c60f2 Working on reflection output 2018-06-20 09:20:45 -07:00
Hans-Kristian Arntzen
d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2018-04-18 16:53:43 +02:00
grovesNL
94cd77799f Move rename_interface_variable to util 2018-03-01 23:47:08 -07:00
Hans-Kristian Arntzen
3088701f59 Hook up --opt tests in Travis. 2017-11-23 09:50:11 +01:00
Geoffroy Aubey
3a0b20fd71 Add compile options and compile defines to spirv-cross target. 2017-09-28 00:19:01 +02:00
Joao Paulo Magalhaes
87df893ba9 Add missing parenthesis from the merge. 2017-05-31 10:20:28 +02:00
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
56df3bf5fe Add HLSL testing to ctest. 2017-01-28 08:58:39 +01:00
Robert Konrad
98eadc086e Add HLSL to cmake file 2017-01-25 17:20:43 +01:00
Hans-Kristian Arntzen
1c28ec6885 Add basic setup for regression testing Metal output. 2017-01-24 14:04:55 +01:00
Hans-Kristian Arntzen
ce3fe29557 MSVC maintenance. 2017-01-12 10:57:44 +01:00
Panagiotis Christopoulos Charitos
7f69f9395e Rework after review 2016-12-15 20:46:10 +01:00
Panagiotis Christopoulos Charitos
946f7796c1 Add an option to disable exceptions
Some refactoring in the no-exceptions case

Grooming the no-exceptions patch for pull request
2016-12-15 17:49:01 +01:00
Hans-Kristian Arntzen
9075262787 Use -D__STDC_LIMIT_MACROS.
Avoids random #ifndef.
2016-11-25 23:40:28 +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
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
dad4a34072 Start adding CFG analysis.
Not complete yet, but partly working ...
2016-11-17 16:58:05 +01: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
8869a167d6 Drop --vulkan flag to test_shaders.py
We can infer shader types from file extensions.
2016-05-11 20:02:31 +02:00
David Neto
59d6898fd0 Add a CMakeLists.txt file for use by cmake, ctest
This enables out-of-tree builds, and the use of other build tools.

This will not overwrite Makefile if you are building in the
source tree.  To use makefiles generated from CMake, you must
build out of the source tree.

Usage: If SPIRV-Cross source is in $SPIRV_CROSS_ROOT, then to
build with ninja in a different directory:

   cmake -G Ninja $SPIRV_CROSS_ROOT
   ninja

   # Run tests, if enabled
   ctest

Tests will be enabled if you have python3.
2016-05-11 10:04:22 -04:00