diff --git a/deps/SPIRV-Cross/.clang-format b/deps/SPIRV-Cross/.clang-format
deleted file mode 100755
index 443f90b774..0000000000
--- a/deps/SPIRV-Cross/.clang-format
+++ /dev/null
@@ -1,167 +0,0 @@
-# The style used for all options not specifically set in the configuration.
-BasedOnStyle: LLVM
-
-# The extra indent or outdent of access modifiers, e.g. public:.
-AccessModifierOffset: -4
-
-# If true, aligns escaped newlines as far left as possible. Otherwise puts them into the right-most column.
-AlignEscapedNewlinesLeft: true
-
-# If true, aligns trailing comments.
-AlignTrailingComments: false
-
-# Allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false.
-AllowAllParametersOfDeclarationOnNextLine: false
-
-# Allows contracting simple braced statements to a single line.
-AllowShortBlocksOnASingleLine: false
-
-# If true, short case labels will be contracted to a single line.
-AllowShortCaseLabelsOnASingleLine: false
-
-# Dependent on the value, int f() { return 0; } can be put on a single line. Possible values: None, Inline, All.
-AllowShortFunctionsOnASingleLine: None
-
-# If true, if (a) return; can be put on a single line.
-AllowShortIfStatementsOnASingleLine: false
-
-# If true, while (true) continue; can be put on a single line.
-AllowShortLoopsOnASingleLine: false
-
-# If true, always break after function definition return types.
-AlwaysBreakAfterDefinitionReturnType: false
-
-# If true, always break before multiline string literals.
-AlwaysBreakBeforeMultilineStrings: false
-
-# If true, always break after the template<...> of a template declaration.
-AlwaysBreakTemplateDeclarations: true
-
-# If false, a function call's arguments will either be all on the same line or will have one line each.
-BinPackArguments: true
-
-# If false, a function declaration's or function definition's parameters will either all be on the same line
-# or will have one line each.
-BinPackParameters: true
-
-# The way to wrap binary operators. Possible values: None, NonAssignment, All.
-BreakBeforeBinaryOperators: None
-
-# The brace breaking style to use. Possible values: Attach, Linux, Stroustrup, Allman, GNU.
-BreakBeforeBraces: Allman
-
-# If true, ternary operators will be placed after line breaks.
-BreakBeforeTernaryOperators: false
-
-# Always break constructor initializers before commas and align the commas with the colon.
-BreakConstructorInitializersBeforeComma: true
-
-# The column limit. A column limit of 0 means that there is no column limit.
-ColumnLimit: 120
-
-# A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.
-CommentPragmas: '^ *'
-
-# If the constructor initializers don't fit on a line, put each initializer on its own line.
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
-
-# The number of characters to use for indentation of constructor initializer lists.
-ConstructorInitializerIndentWidth: 4
-
-# Indent width for line continuations.
-ContinuationIndentWidth: 4
-
-# If true, format braced lists as best suited for C++11 braced lists.
-Cpp11BracedListStyle: false
-
-# Disables formatting at all.
-DisableFormat: false
-
-# A vector of macros that should be interpreted as foreach loops instead of as function calls.
-#ForEachMacros: ''
-
-# Indent case labels one level from the switch statement.
-# When false, use the same indentation level as for the switch statement.
-# Switch statement body is always indented one level more than case labels.
-IndentCaseLabels: false
-
-# The number of columns to use for indentation.
-IndentWidth: 4
-
-# Indent if a function definition or declaration is wrapped after the type.
-IndentWrappedFunctionNames: false
-
-# If true, empty lines at the start of blocks are kept.
-KeepEmptyLinesAtTheStartOfBlocks: true
-
-# Language, this format style is targeted at. Possible values: None, Cpp, Java, JavaScript, Proto.
-Language: Cpp
-
-# The maximum number of consecutive empty lines to keep.
-MaxEmptyLinesToKeep: 1
-
-# The indentation used for namespaces. Possible values: None, Inner, All.
-NamespaceIndentation: None
-
-# The penalty for breaking a function call after "call(".
-PenaltyBreakBeforeFirstCallParameter: 19
-
-# The penalty for each line break introduced inside a comment.
-PenaltyBreakComment: 300
-
-# The penalty for breaking before the first <<.
-PenaltyBreakFirstLessLess: 120
-
-# The penalty for each line break introduced inside a string literal.
-PenaltyBreakString: 1000
-
-# The penalty for each character outside of the column limit.
-PenaltyExcessCharacter: 1000000
-
-# Penalty for putting the return type of a function onto its own line.
-PenaltyReturnTypeOnItsOwnLine: 1000000000
-
-# Pointer and reference alignment style. Possible values: Left, Right, Middle.
-PointerAlignment: Right
-
-# If true, a space may be inserted after C style casts.
-SpaceAfterCStyleCast: false
-
-# If false, spaces will be removed before assignment operators.
-SpaceBeforeAssignmentOperators: true
-
-# Defines in which cases to put a space before opening parentheses. Possible values: Never, ControlStatements, Always.
-SpaceBeforeParens: ControlStatements
-
-# If true, spaces may be inserted into '()'.
-SpaceInEmptyParentheses: false
-
-# The number of spaces before trailing line comments (// - comments).
-SpacesBeforeTrailingComments: 1
-
-# If true, spaces will be inserted after '<' and before '>' in template argument lists.
-SpacesInAngles: false
-
-# If true, spaces may be inserted into C style casts.
-SpacesInCStyleCastParentheses: false
-
-# If true, spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals).
-SpacesInContainerLiterals: false
-
-# If true, spaces will be inserted after '(' and before ')'.
-SpacesInParentheses: false
-
-# If true, spaces will be inserted after '[' and befor']'.
-SpacesInSquareBrackets: false
-
-# Format compatible with this standard, e.g. use A > instead of A> for LS_Cpp03. Possible values: Cpp03, Cpp11, Auto.
-Standard: Cpp11
-
-# The number of columns used for tab stops.
-TabWidth: 4
-
-# The way to use tab characters in the resulting file. Possible values: Never, ForIndentation, Always.
-UseTab: ForIndentation
-
-# Do not reflow comments
-ReflowComments: false
diff --git a/deps/SPIRV-Cross/.gitignore b/deps/SPIRV-Cross/.gitignore
deleted file mode 100644
index b89f729741..0000000000
--- a/deps/SPIRV-Cross/.gitignore
+++ /dev/null
@@ -1,19 +0,0 @@
-*.o
-*.d
-*.txt
-/test
-/spirv-cross
-*.spv
-/obj
-/msvc/x64
-/msvc/Debug
-/msvc/Release
-*.suo
-*.sdf
-*.opensdf
-*.shader
-*.a
-*.bc
-/external
-
-!CMakeLists.txt
diff --git a/deps/SPIRV-Cross/.travis.yml b/deps/SPIRV-Cross/.travis.yml
deleted file mode 100644
index 21af2a0203..0000000000
--- a/deps/SPIRV-Cross/.travis.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-language: cpp
-os:
- - linux
- - osx
-osx_image: xcode8.2
-
-# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
-sudo: required
-dist: trusty
-
-# We check out glslang and SPIRV-Tools at specific revisions to avoid test output mismatches
-env:
- - GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92 SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
-
-before_script:
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install python3; fi
- - git clone https://github.com/KhronosGroup/glslang.git glslang
- - git clone https://github.com/KhronosGroup/SPIRV-Tools SPIRV-Tools
- - git clone https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Tools/external/spirv-headers
-
-script:
- - git -C glslang checkout $GLSLANG_REV
- - git -C SPIRV-Tools checkout $SPIRV_TOOLS_REV
- - cd glslang && cmake . && make -j2 && cd ..
- - cd SPIRV-Tools && cmake . && make -j2 && cd ..
- - make -j2
- - PATH=./glslang/StandAlone:./SPIRV-Tools/tools:$PATH
- - ./test_shaders.py shaders
- - ./test_shaders.py --msl shaders-msl
- - ./test_shaders.py --hlsl shaders-hlsl
- - ./test_shaders.py shaders --opt
- - ./test_shaders.py --msl shaders-msl --opt
- - ./test_shaders.py --hlsl shaders-hlsl --opt
diff --git a/deps/SPIRV-Cross/CMakeLists.txt b/deps/SPIRV-Cross/CMakeLists.txt
deleted file mode 100644
index cd3f677475..0000000000
--- a/deps/SPIRV-Cross/CMakeLists.txt
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 2016 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-cmake_minimum_required(VERSION 2.8)
-project(SPIRV-Cross)
-enable_testing()
-
-option(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS "Instead of throwing exceptions assert" OFF)
-
-if(${CMAKE_GENERATOR} MATCHES "Makefile")
- if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
- message(FATAL_ERROR "Build out of tree to avoid overwriting Makefile")
- endif()
-endif()
-
-set(spirv-compiler-options "")
-set(spirv-compiler-defines "")
-
-if(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
- set(spirv-compiler-defines ${spirv-compiler-defines} SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
-endif()
-
-# To specify special debug or optimization options, use
-# -DCMAKE_CXX_COMPILE_FLAGS
-# However, we require the C++11 dialect.
-if (NOT "${MSVC}")
- set(spirv-compiler-options ${spirv-compiler-options} -std=c++11 -Wall -Wextra -Werror -Wshadow)
- set(spirv-compiler-defines ${spirv-compiler-defines} __STDC_LIMIT_MACROS)
-
- if(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
- set(spirv-compiler-options ${spirv-compiler-options} -fno-exceptions)
- endif()
-endif()
-
-macro(extract_headers out_abs file_list)
- set(${out_abs}) # absolute paths
- foreach(_a ${file_list})
- # get_filename_component only returns the longest extension, so use a regex
- string(REGEX REPLACE ".*\\.(h|hpp)" "\\1" ext ${_a})
- if(("${ext}" STREQUAL "h") OR ("${ext}" STREQUAL "hpp"))
- list(APPEND ${out_abs} "${_a}")
- endif()
- endforeach()
-endmacro()
-
-macro(spirv_cross_add_library name config_name)
- add_library(${name} ${ARGN})
- extract_headers(hdrs "${ARGN}")
- target_include_directories(${name} PUBLIC
- $
- $)
- set_target_properties(${name} PROPERTIES
- PUBLIC_HEADERS "${hdrs}")
- target_compile_options(${name} PRIVATE ${spirv-compiler-options})
- target_compile_definitions(${name} PRIVATE ${spirv-compiler-defines})
- install(TARGETS ${name}
- EXPORT ${config_name}Config
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- PUBLIC_HEADER DESTINATION include/spirv_cross)
- install(FILES ${hdrs} DESTINATION include/spirv_cross)
- install(EXPORT ${config_name}Config DESTINATION share/${config_name}/cmake)
- export(TARGETS ${targets} FILE ${config_name}Config.cmake)
-endmacro()
-
-
-spirv_cross_add_library(spirv-cross-core spirv_cross_core STATIC
- ${CMAKE_CURRENT_SOURCE_DIR}/GLSL.std.450.h
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_common.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_cfg.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_cfg.cpp)
-
-spirv_cross_add_library(spirv-cross-glsl spirv_cross_glsl STATIC
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_glsl.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_glsl.hpp)
-
-spirv_cross_add_library(spirv-cross-cpp spirv_cross_cpp STATIC
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_cpp.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_cpp.cpp)
-
-spirv_cross_add_library(spirv-cross-msl spirv_cross_msl STATIC
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_msl.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_msl.cpp)
-
-spirv_cross_add_library(spirv-cross-hlsl spirv_cross_hlsl STATIC
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_hlsl.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/spirv_hlsl.cpp)
-
-add_executable(spirv-cross main.cpp)
-target_compile_options(spirv-cross PRIVATE ${spirv-compiler-options})
-target_compile_definitions(spirv-cross PRIVATE ${spirv-compiler-defines})
-
-install(TARGETS spirv-cross RUNTIME DESTINATION bin)
-target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-hlsl spirv-cross-cpp spirv-cross-msl spirv-cross-core)
-target_link_libraries(spirv-cross-glsl spirv-cross-core)
-target_link_libraries(spirv-cross-msl spirv-cross-glsl)
-target_link_libraries(spirv-cross-hlsl spirv-cross-glsl)
-target_link_libraries(spirv-cross-cpp spirv-cross-glsl)
-
-# Set up tests, using only the simplest modes of the test_shaders
-# script. You have to invoke the script manually to:
-# - Update the reference files
-# - Get cycle counts from malisc
-# - Keep failing outputs
-find_package(PythonInterp)
-if (${PYTHONINTERP_FOUND})
- if (${PYTHON_VERSION_MAJOR} GREATER 2)
- add_test(NAME spirv-cross-test
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py
- ${CMAKE_CURRENT_SOURCE_DIR}/shaders)
- add_test(NAME spirv-cross-test-metal
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal
- ${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl)
- add_test(NAME spirv-cross-test-hlsl
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl
- ${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl)
- add_test(NAME spirv-cross-test-opt
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --opt
- ${CMAKE_CURRENT_SOURCE_DIR}/shaders)
- add_test(NAME spirv-cross-test-metal-opt
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --metal --opt
- ${CMAKE_CURRENT_SOURCE_DIR}/shaders-msl)
- add_test(NAME spirv-cross-test-hlsl-opt
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --hlsl --opt
- ${CMAKE_CURRENT_SOURCE_DIR}/shaders-hlsl)
- endif()
-else()
- message(WARNING "Testing disabled. Could not find python3. If you have python3 installed try running "
- "cmake with -DPYTHON_EXECUTABLE:FILEPATH=/path/to/python3 to help it find the executable")
-endif()
diff --git a/deps/SPIRV-Cross/GLSL.std.450.h b/deps/SPIRV-Cross/GLSL.std.450.h
deleted file mode 100644
index 54cc00e9a8..0000000000
--- a/deps/SPIRV-Cross/GLSL.std.450.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-** Copyright (c) 2014-2016 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a copy
-** of this software and/or associated documentation files (the "Materials"),
-** to deal in the Materials without restriction, including without limitation
-** the rights to use, copy, modify, merge, publish, distribute, sublicense,
-** and/or sell copies of the Materials, and to permit persons to whom the
-** Materials are furnished to do so, subject to the following conditions:
-**
-** The above copyright notice and this permission notice shall be included in
-** all copies or substantial portions of the Materials.
-**
-** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
-** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
-** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
-** IN THE MATERIALS.
-*/
-
-#ifndef GLSLstd450_H
-#define GLSLstd450_H
-
-static const int GLSLstd450Version = 100;
-static const int GLSLstd450Revision = 3;
-
-enum GLSLstd450 {
- GLSLstd450Bad = 0, // Don't use
-
- GLSLstd450Round = 1,
- GLSLstd450RoundEven = 2,
- GLSLstd450Trunc = 3,
- GLSLstd450FAbs = 4,
- GLSLstd450SAbs = 5,
- GLSLstd450FSign = 6,
- GLSLstd450SSign = 7,
- GLSLstd450Floor = 8,
- GLSLstd450Ceil = 9,
- GLSLstd450Fract = 10,
-
- GLSLstd450Radians = 11,
- GLSLstd450Degrees = 12,
- GLSLstd450Sin = 13,
- GLSLstd450Cos = 14,
- GLSLstd450Tan = 15,
- GLSLstd450Asin = 16,
- GLSLstd450Acos = 17,
- GLSLstd450Atan = 18,
- GLSLstd450Sinh = 19,
- GLSLstd450Cosh = 20,
- GLSLstd450Tanh = 21,
- GLSLstd450Asinh = 22,
- GLSLstd450Acosh = 23,
- GLSLstd450Atanh = 24,
- GLSLstd450Atan2 = 25,
-
- GLSLstd450Pow = 26,
- GLSLstd450Exp = 27,
- GLSLstd450Log = 28,
- GLSLstd450Exp2 = 29,
- GLSLstd450Log2 = 30,
- GLSLstd450Sqrt = 31,
- GLSLstd450InverseSqrt = 32,
-
- GLSLstd450Determinant = 33,
- GLSLstd450MatrixInverse = 34,
-
- GLSLstd450Modf = 35, // second operand needs an OpVariable to write to
- GLSLstd450ModfStruct = 36, // no OpVariable operand
- GLSLstd450FMin = 37,
- GLSLstd450UMin = 38,
- GLSLstd450SMin = 39,
- GLSLstd450FMax = 40,
- GLSLstd450UMax = 41,
- GLSLstd450SMax = 42,
- GLSLstd450FClamp = 43,
- GLSLstd450UClamp = 44,
- GLSLstd450SClamp = 45,
- GLSLstd450FMix = 46,
- GLSLstd450IMix = 47, // Reserved
- GLSLstd450Step = 48,
- GLSLstd450SmoothStep = 49,
-
- GLSLstd450Fma = 50,
- GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to
- GLSLstd450FrexpStruct = 52, // no OpVariable operand
- GLSLstd450Ldexp = 53,
-
- GLSLstd450PackSnorm4x8 = 54,
- GLSLstd450PackUnorm4x8 = 55,
- GLSLstd450PackSnorm2x16 = 56,
- GLSLstd450PackUnorm2x16 = 57,
- GLSLstd450PackHalf2x16 = 58,
- GLSLstd450PackDouble2x32 = 59,
- GLSLstd450UnpackSnorm2x16 = 60,
- GLSLstd450UnpackUnorm2x16 = 61,
- GLSLstd450UnpackHalf2x16 = 62,
- GLSLstd450UnpackSnorm4x8 = 63,
- GLSLstd450UnpackUnorm4x8 = 64,
- GLSLstd450UnpackDouble2x32 = 65,
-
- GLSLstd450Length = 66,
- GLSLstd450Distance = 67,
- GLSLstd450Cross = 68,
- GLSLstd450Normalize = 69,
- GLSLstd450FaceForward = 70,
- GLSLstd450Reflect = 71,
- GLSLstd450Refract = 72,
-
- GLSLstd450FindILsb = 73,
- GLSLstd450FindSMsb = 74,
- GLSLstd450FindUMsb = 75,
-
- GLSLstd450InterpolateAtCentroid = 76,
- GLSLstd450InterpolateAtSample = 77,
- GLSLstd450InterpolateAtOffset = 78,
-
- GLSLstd450NMin = 79,
- GLSLstd450NMax = 80,
- GLSLstd450NClamp = 81,
-
- GLSLstd450Count
-};
-
-#endif // #ifndef GLSLstd450_H
diff --git a/deps/SPIRV-Cross/LICENSE b/deps/SPIRV-Cross/LICENSE
deleted file mode 100644
index d645695673..0000000000
--- a/deps/SPIRV-Cross/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/deps/SPIRV-Cross/Makefile b/deps/SPIRV-Cross/Makefile
deleted file mode 100644
index 0564b650ad..0000000000
--- a/deps/SPIRV-Cross/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-TARGET := spirv-cross
-
-SOURCES := $(wildcard spirv_*.cpp)
-CLI_SOURCES := main.cpp
-
-OBJECTS := $(SOURCES:.cpp=.o)
-CLI_OBJECTS := $(CLI_SOURCES:.cpp=.o)
-
-STATIC_LIB := lib$(TARGET).a
-
-DEPS := $(OBJECTS:.o=.d) $(CLI_OBJECTS:.o=.d)
-
-CXXFLAGS += -std=c++11 -Wall -Wextra -Wshadow -D__STDC_LIMIT_MACROS
-
-ifeq ($(DEBUG), 1)
- CXXFLAGS += -O0 -g
-else
- CXXFLAGS += -O2 -DNDEBUG
-endif
-
-ifeq ($(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS), 1)
- CXXFLAGS += -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS -fno-exceptions
-endif
-
-all: $(TARGET)
-
--include $(DEPS)
-
-$(TARGET): $(CLI_OBJECTS) $(STATIC_LIB)
- $(CXX) -o $@ $(CLI_OBJECTS) $(STATIC_LIB) $(LDFLAGS)
-
-$(STATIC_LIB): $(OBJECTS)
- $(AR) rcs $@ $(OBJECTS)
-
-%.o: %.cpp
- $(CXX) -c -o $@ $< $(CXXFLAGS) -MMD
-
-clean:
- rm -f $(TARGET) $(OBJECTS) $(CLI_OBJECTS) $(STATIC_LIB) $(DEPS)
-
-.PHONY: clean
diff --git a/deps/SPIRV-Cross/README.md b/deps/SPIRV-Cross/README.md
deleted file mode 100644
index e1409a4bf7..0000000000
--- a/deps/SPIRV-Cross/README.md
+++ /dev/null
@@ -1,350 +0,0 @@
-# SPIRV-Cross
-
-SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.
-
-[](https://travis-ci.org/KhronosGroup/SPIRV-Cross)
-
-## Features
-
- - Convert SPIR-V to readable, usable and efficient GLSL
- - Convert SPIR-V to readable, usable and efficient Metal Shading Language (MSL) [EXPERIMENTAL]
- - Convert SPIR-V to readable, usable and efficient HLSL [EXPERIMENTAL]
- - Convert SPIR-V to debuggable C++ [EXPERIMENTAL]
- - Reflection API to simplify the creation of Vulkan pipeline layouts
- - Reflection API to modify and tweak OpDecorations
- - Supports "all" of vertex, fragment, tessellation, geometry and compute shaders.
-
-SPIRV-Cross tries hard to emit readable and clean output from the SPIR-V.
-The goal is to emit GLSL or MSL that looks like it was written by a human and not awkward IR/assembly-like code.
-
-NOTE: Individual features are expected to be mostly complete, but it is possible that certain obscure GLSL features are not yet supported.
-However, most missing features are expected to be "trivial" improvements at this stage.
-
-## Building
-
-SPIRV-Cross has been tested on Linux, OSX and Windows.
-
-The make and CMake build flavors offer the option to treat exceptions as assertions. To disable exceptions for make just append SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=1 to the command line. For CMake append -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=ON. By default exceptions are enabled.
-
-### Linux and macOS
-
-Just run `make` on the command line. A recent GCC (4.8+) or Clang (3.x+) compiler is required as SPIRV-Cross uses C++11 extensively.
-
-### Windows
-
-MinGW-w64 based compilation works with `make`, and an MSVC 2013 solution is also included.
-
-## Usage
-
-### Using the C++ API
-
-To perform reflection and convert to other shader languages you can use the SPIRV-Cross API.
-For example:
-
-```
-#include "spirv_glsl.hpp"
-#include
-#include
-
-extern std::vector load_spirv_file();
-
-int main()
-{
- // Read SPIR-V from disk or similar.
- std::vector spirv_binary = load_spirv_file();
-
- spirv_cross::CompilerGLSL glsl(std::move(spirv_binary));
-
- // The SPIR-V is now parsed, and we can perform reflection on it.
- spirv_cross::ShaderResources resources = glsl.get_shader_resources();
-
- // Get all sampled images in the shader.
- for (auto &resource : resources.sampled_images)
- {
- unsigned set = glsl.get_decoration(resource.id, spv::DecorationDescriptorSet);
- unsigned binding = glsl.get_decoration(resource.id, spv::DecorationBinding);
- printf("Image %s at set = %u, binding = %u\n", resource.name.c_str(), set, binding);
-
- // Modify the decoration to prepare it for GLSL.
- glsl.unset_decoration(resource.id, spv::DecorationDescriptorSet);
-
- // Some arbitrary remapping if we want.
- glsl.set_decoration(resource.id, spv::DecorationBinding, set * 16 + binding);
- }
-
- // Set some options.
- spirv_cross::CompilerGLSL::Options options;
- options.version = 310;
- options.es = true;
- glsl.set_options(options);
-
- // Compile to GLSL, ready to give to GL driver.
- std::string source = glsl.compile();
-}
-```
-
-#### Integrating SPIRV-Cross in a custom build system
-
-To add SPIRV-Cross to your own codebase, just copy the source and header files from root directory
-and build the relevant .cpp files you need. Make sure to build with C++11 support, e.g. `-std=c++11` in GCC and Clang.
-Alternatively, the Makefile generates a libspirv-cross.a static library during build that can be linked in.
-
-### Creating a SPIR-V file from GLSL with glslang
-
-```
-glslangValidator -H -V -o test.spv test.frag
-```
-
-### Converting a SPIR-V file to GLSL ES
-
-```
-glslangValidator -H -V -o test.spv shaders/comp/basic.comp
-./spirv-cross --version 310 --es test.spv
-```
-
-#### Converting to desktop GLSL
-
-```
-glslangValidator -H -V -o test.spv shaders/comp/basic.comp
-./spirv-cross --version 330 test.spv --output test.comp
-```
-
-#### Disable prettifying optimizations
-
-```
-glslangValidator -H -V -o test.spv shaders/comp/basic.comp
-./spirv-cross --version 310 --es test.spv --output test.comp --force-temporary
-```
-
-### Using shaders generated from C++ backend
-
-Please see `samples/cpp` where some GLSL shaders are compiled to SPIR-V, decompiled to C++ and run with test data.
-Reading through the samples should explain how to use the C++ interface.
-A simple Makefile is included to build all shaders in the directory.
-
-### Implementation notes
-
-When using SPIR-V and SPIRV-Cross as an intermediate step for cross-compiling between high level languages there are some considerations to take into account,
-as not all features used by one high-level language are necessarily supported natively by the target shader language.
-SPIRV-Cross aims to provide the tools needed to handle these scenarios in a clean and robust way, but some manual action is required to maintain compatibility.
-
-#### HLSL source to GLSL
-
-##### HLSL entry points
-
-When using SPIR-V shaders compiled from HLSL, there are some extra things you need to take care of.
-First make sure that the entry point is used correctly.
-If you forget to set the entry point correctly in glslangValidator (-e MyFancyEntryPoint),
-you will likely encounter this error message:
-
-```
-Cannot end a function before ending the current block.
-Likely cause: If this SPIR-V was created from glslang HLSL, make sure the entry point is valid.
-```
-
-##### Vertex/Fragment interface linking
-
-HLSL relies on semantics in order to effectively link together shader stages. In the SPIR-V generated by glslang, the transformation from HLSL to GLSL ends up looking like
-
-```
-struct VSOutput {
- // SV_Position is rerouted to gl_Position
- float4 position : SV_Position;
- float4 coord : TEXCOORD0;
-};
-
-VSOutput main(...) {}
-```
-
-```
-struct VSOutput {
- float4 coord;
-}
-layout(location = 0) out VSOutput _magicNameGeneratedByGlslang;
-```
-
-While this works, be aware of the type of the struct which is used in the vertex stage and the fragment stage.
-There may be issues if the structure type name differs in vertex stage and fragment stage.
-
-You can make use of the reflection interface to force the name of the struct type.
-
-```
-// Something like this for both vertex outputs and fragment inputs.
-compiler.set_name(varying_resource.base_type_id, "VertexFragmentLinkage");
-```
-
-Some platform may require identical variable name for both vertex outputs and fragment inputs. (for example MacOSX)
-to rename varaible base on location, please add
-```
---rename-interface-variable
-```
-
-#### HLSL source to legacy GLSL/ESSL
-
-HLSL tends to emit varying struct types to pass data between vertex and fragment.
-This is not supported in legacy GL/GLES targets, so to support this, varying structs are flattened.
-This is done automatically, but the API user might need to be aware that this is happening in order to support all cases.
-
-Modern GLES code like this:
-```
-struct Output {
- vec4 a;
- vec2 b;
-};
-out Output vout;
-```
-
-Is transformed into:
-```
-struct Output {
- vec4 a;
- vec2 b;
-};
-varying vec4 Output_a;
-varying vec2 Output_b;
-```
-
-Note that now, both the struct name and the member names will participate in the linking interface between vertex and fragment, so
-API users might want to ensure that both the struct names and member names match so that vertex outputs and fragment inputs can link properly.
-
-
-#### Separate image samplers (HLSL/Vulkan) for backends which do not support it (GLSL)
-
-Another thing you need to remember is when using samplers and textures in HLSL these are separable, and not directly compatible with GLSL. If you need to use this with desktop GL/GLES, you need to call `Compiler::build_combined_image_samplers` first before calling `Compiler::compile`, or you will get an exception.
-
-```
-// From main.cpp
-// Builds a mapping for all combinations of images and samplers.
-compiler->build_combined_image_samplers();
-
-// Give the remapped combined samplers new names.
-// Here you can also set up decorations if you want (binding = #N).
-for (auto &remap : compiler->get_combined_image_samplers())
-{
- compiler->set_name(remap.combined_id, join("SPIRV_Cross_Combined", compiler->get_name(remap.image_id),
- compiler->get_name(remap.sampler_id)));
-}
-```
-
-If your target is Vulkan GLSL, `--vulkan-semantics` will emit separate image samplers as you'd expect.
-The command line client calls `Compiler::build_combined_image_samplers` automatically, but if you're calling the library, you'll need to do this yourself.
-
-#### Descriptor sets (Vulkan GLSL) for backends which do not support them (HLSL/GLSL/Metal)
-
-Descriptor sets are unique to Vulkan, so make sure that descriptor set + binding is remapped to a flat binding scheme (set always 0), so that other APIs can make sense of the bindings.
-This can be done with `Compiler::set_decoration(id, spv::DecorationDescriptorSet)`.
-
-#### Linking by name for targets which do not support explicit locations (legacy GLSL/ESSL)
-
-Modern GLSL and HLSL sources (and SPIR-V) relies on explicit layout(location) qualifiers to guide the linking process between shader stages,
-but older GLSL relies on symbol names to perform the linking. When emitting shaders with older versions, these layout statements will be removed,
-so it is important that the API user ensures that the names of I/O variables are sanitized so that linking will work properly.
-The reflection API can rename variables, struct types and struct members to deal with these scenarios using `Compiler::set_name` and friends.
-
-#### Clip-space conventions
-
-SPIRV-Cross can perform some common clip space conversions on gl_Position/SV_Position by enabling `CompilerGLSL::Options.vertex.fixup_clipspace`.
-While this can be convenient, it is recommended to modify the projection matrices instead as that can achieve the same result.
-
-For GLSL targets, enabling this will convert a shader which assumes `[0, w]` depth range (Vulkan / D3D / Metal) into `[-w, w]` range.
-For MSL and HLSL targets, enabling this will convert a shader in `[-w, w]` depth range (OpenGL) to `[0, w]` depth range.
-
-By default, the CLI will not enable `fixup_clipspace`, but in the API you might want to set an explicit value using `CompilerGLSL::set_options()`.
-
-Y-flipping of gl_Position and similar is also supported.
-The use of this is discouraged, because relying on vertex shader Y-flipping tends to get quite messy.
-To enable this, set `CompilerGLSL::Options.vertex.flip_vert_y` or `--flip-vert-y` in CLI.
-
-## Contributing
-
-Contributions to SPIRV-Cross are welcome. See Testing and Licensing sections for details.
-
-### Testing
-
-SPIRV-Cross maintains a test suite of shaders with reference output of how the output looks after going through a roundtrip through
-glslangValidator then back through SPIRV-Cross again. The reference files are stored inside the repository in order to be able to track regressions.
-
-All pull requests should ensure that test output does not change unexpectedly. This can be tested with:
-
-```
-./test_shaders.py shaders
-./test_shaders.py shaders --opt
-./test_shaders.py shaders-hlsl --hlsl
-./test_shaders.py shaders-hlsl --hlsl --opt
-./test_shaders.py shaders-msl --msl
-./test_shaders.py shaders-msl --msl --opt
-```
-
-although there are a couple of convenience script for doing this:
-
-```
-./checkout_glslang_spirv_tools.sh # Checks out glslang and SPIRV-Tools at a fixed revision which matches the reference output.
-./test_shaders.sh # Runs over all changes and makes sure that there are no deltas compared to reference files.
-```
-
-However, when improving SPIRV-Cross there are of course legitimate cases where reference output should change.
-In these cases, run:
-
-```
-./update_test_shaders.sh
-```
-
-to update the reference files and include these changes as part of the pull request.
-Always make sure you are running the correct version of glslangValidator as well as SPIRV-Tools when updating reference files.
-See `checkout_glslang_spirv_tools.sh`.
-
-In short, the master branch should always be able to run `./test_shaders.py shaders` and friends without failure.
-SPIRV-Cross uses Travis CI to test all pull requests, so it is not strictly needed to perform testing yourself if you have problems running it locally.
-A pull request which does not pass testing on Travis will not be accepted however.
-
-When adding support for new features to SPIRV-Cross, a new shader and reference file should be added which covers usage of the new shader features in question.
-
-### Licensing
-
-Contributors of new files should add a copyright header at the top of every new source code file with their copyright
-along with the Apache 2.0 licensing stub.
-
-### Formatting
-
-SPIRV-Cross uses `clang-format` to automatically format code.
-Please use `clang-format` with the style sheet found in `.clang-format` to automatically format code before submitting a pull request.
-
-To make things easy, the `format_all.sh` script can be used to format all
-source files in the library. In this directory, run the following from the
-command line:
-
- ./format_all.sh
-
-## ABI concerns
-
-### SPIR-V headers
-
-The current repository uses the latest SPIR-V and GLSL.std.450 headers.
-SPIR-V files created from older headers could have ABI issues.
-
-## Regression testing
-
-In shaders/ a collection of shaders are maintained for purposes of regression testing.
-The current reference output is contained in reference/.
-`./test_shaders.py shaders` can be run to perform regression testing.
-
-See `./test_shaders.py --help` for more.
-
-### Metal backend
-
-To test the roundtrip path GLSL -> SPIR-V -> MSL, `--msl` can be added, e.g. `./test_shaders.py --msl shaders-msl`.
-
-### HLSL backend
-
-To test the roundtrip path GLSL -> SPIR-V -> HLSL, `--hlsl` can be added, e.g. `./test_shaders.py --hlsl shaders-hlsl`.
-
-### Updating regression tests
-
-When legitimate changes are found, use `--update` flag to update regression files.
-Otherwise, `./test_shaders.py` will fail with error code.
-
-### Mali Offline Compiler cycle counts
-
-To obtain a CSV of static shader cycle counts before and after going through spirv-cross, add
-`--malisc` flag to `./test_shaders`. This requires the Mali Offline Compiler to be installed in PATH.
-
diff --git a/deps/SPIRV-Cross/checkout_glslang_spirv_tools.sh b/deps/SPIRV-Cross/checkout_glslang_spirv_tools.sh
deleted file mode 100644
index a4674c14e1..0000000000
--- a/deps/SPIRV-Cross/checkout_glslang_spirv_tools.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92
-SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
-
-if [ -d external/glslang ]; then
- echo "Updating glslang to revision $GLSLANG_REV."
- cd external/glslang
- git fetch origin
- git checkout $GLSLANG_REV
-else
- echo "Cloning glslang revision $GLSLANG_REV."
- mkdir -p external
- cd external
- git clone git://github.com/KhronosGroup/glslang.git
- cd glslang
- git checkout $GLSLANG_REV
-fi
-cd ../..
-
-echo "Building glslang."
-mkdir -p external/glslang-build
-cd external/glslang-build
-cmake ../glslang -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles"
-make -j$(nproc)
-cd ../..
-
-if [ -d external/spirv-tools ]; then
- echo "Updating SPIRV-Tools to revision $SPIRV_TOOLS_REV."
- cd external/spirv-tools
- git fetch origin
- git checkout $SPIRV_TOOLS_REV
-else
- echo "Cloning SPIRV-Tools revision $SPIRV_TOOLS_REV."
- mkdir -p external
- cd external
- git clone git://github.com/KhronosGroup/SPIRV-Tools.git spirv-tools
- cd spirv-tools
- git checkout $SPIRV_TOOLS_REV
-
- if [ -d external/spirv-headers ]; then
- cd external/spirv-headers
- git pull origin master
- cd ../..
- else
- git clone git://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
- fi
-fi
-cd ../..
-
-echo "Building SPIRV-Tools."
-mkdir -p external/spirv-tools-build
-cd external/spirv-tools-build
-cmake ../spirv-tools -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles"
-make -j$(nproc)
-cd ../..
-
diff --git a/deps/SPIRV-Cross/format_all.sh b/deps/SPIRV-Cross/format_all.sh
deleted file mode 100755
index 05efeb3eae..0000000000
--- a/deps/SPIRV-Cross/format_all.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-for file in spirv_*.{cpp,hpp} include/spirv_cross/*.{hpp,h} samples/cpp/*.cpp main.cpp
-do
- echo "Formatting file: $file ..."
- clang-format -style=file -i $file
-done
diff --git a/deps/SPIRV-Cross/include/spirv_cross/barrier.hpp b/deps/SPIRV-Cross/include/spirv_cross/barrier.hpp
deleted file mode 100644
index bfcd228431..0000000000
--- a/deps/SPIRV-Cross/include/spirv_cross/barrier.hpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2015-2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SPIRV_CROSS_BARRIER_HPP
-#define SPIRV_CROSS_BARRIER_HPP
-
-#include
-#include
-
-namespace spirv_cross
-{
-class Barrier
-{
-public:
- Barrier()
- {
- count.store(0);
- iteration.store(0);
- }
-
- void set_release_divisor(unsigned divisor)
- {
- this->divisor = divisor;
- }
-
- static inline void memoryBarrier()
- {
- std::atomic_thread_fence(std::memory_order_seq_cst);
- }
-
- void reset_counter()
- {
- count.store(0);
- iteration.store(0);
- }
-
- void wait()
- {
- unsigned target_iteration = iteration.load(std::memory_order_relaxed) + 1;
- // Overflows cleanly.
- unsigned target_count = divisor * target_iteration;
-
- // Barriers don't enforce memory ordering.
- // Be as relaxed about the barrier as we possibly can!
- unsigned c = count.fetch_add(1u, std::memory_order_relaxed);
-
- if (c + 1 == target_count)
- {
- iteration.store(target_iteration, std::memory_order_relaxed);
- }
- else
- {
- // If we have more threads than the CPU, don't hog the CPU for very long periods of time.
- while (iteration.load(std::memory_order_relaxed) != target_iteration)
- std::this_thread::yield();
- }
- }
-
-private:
- unsigned divisor = 1;
- std::atomic count;
- std::atomic iteration;
-};
-}
-
-#endif
diff --git a/deps/SPIRV-Cross/include/spirv_cross/external_interface.h b/deps/SPIRV-Cross/include/spirv_cross/external_interface.h
deleted file mode 100644
index 1d26f1e1e4..0000000000
--- a/deps/SPIRV-Cross/include/spirv_cross/external_interface.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2015-2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SPIRV_CROSS_EXTERNAL_INTERFACE_H
-#define SPIRV_CROSS_EXTERNAL_INTERFACE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-
-typedef struct spirv_cross_shader spirv_cross_shader_t;
-
-struct spirv_cross_interface
-{
- spirv_cross_shader_t *(*construct)(void);
- void (*destruct)(spirv_cross_shader_t *thiz);
- void (*invoke)(spirv_cross_shader_t *thiz);
-};
-
-void spirv_cross_set_stage_input(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size);
-
-void spirv_cross_set_stage_output(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size);
-
-void spirv_cross_set_push_constant(spirv_cross_shader_t *thiz, void *data, size_t size);
-
-void spirv_cross_set_uniform_constant(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size);
-
-void spirv_cross_set_resource(spirv_cross_shader_t *thiz, unsigned set, unsigned binding, void **data, size_t size);
-
-const struct spirv_cross_interface *spirv_cross_get_interface(void);
-
-typedef enum spirv_cross_builtin {
- SPIRV_CROSS_BUILTIN_POSITION = 0,
- SPIRV_CROSS_BUILTIN_FRAG_COORD = 1,
- SPIRV_CROSS_BUILTIN_WORK_GROUP_ID = 2,
- SPIRV_CROSS_BUILTIN_NUM_WORK_GROUPS = 3,
- SPIRV_CROSS_NUM_BUILTINS
-} spirv_cross_builtin;
-
-void spirv_cross_set_builtin(spirv_cross_shader_t *thiz, spirv_cross_builtin builtin, void *data, size_t size);
-
-#define SPIRV_CROSS_NUM_DESCRIPTOR_SETS 4
-#define SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS 16
-#define SPIRV_CROSS_NUM_STAGE_INPUTS 16
-#define SPIRV_CROSS_NUM_STAGE_OUTPUTS 16
-#define SPIRV_CROSS_NUM_UNIFORM_CONSTANTS 32
-
-enum spirv_cross_format
-{
- SPIRV_CROSS_FORMAT_R8_UNORM = 0,
- SPIRV_CROSS_FORMAT_R8G8_UNORM = 1,
- SPIRV_CROSS_FORMAT_R8G8B8_UNORM = 2,
- SPIRV_CROSS_FORMAT_R8G8B8A8_UNORM = 3,
-
- SPIRV_CROSS_NUM_FORMATS
-};
-
-enum spirv_cross_wrap
-{
- SPIRV_CROSS_WRAP_CLAMP_TO_EDGE = 0,
- SPIRV_CROSS_WRAP_REPEAT = 1,
-
- SPIRV_CROSS_NUM_WRAP
-};
-
-enum spirv_cross_filter
-{
- SPIRV_CROSS_FILTER_NEAREST = 0,
- SPIRV_CROSS_FILTER_LINEAR = 1,
-
- SPIRV_CROSS_NUM_FILTER
-};
-
-enum spirv_cross_mipfilter
-{
- SPIRV_CROSS_MIPFILTER_BASE = 0,
- SPIRV_CROSS_MIPFILTER_NEAREST = 1,
- SPIRV_CROSS_MIPFILTER_LINEAR = 2,
-
- SPIRV_CROSS_NUM_MIPFILTER
-};
-
-struct spirv_cross_miplevel
-{
- const void *data;
- unsigned width, height;
- size_t stride;
-};
-
-struct spirv_cross_sampler_info
-{
- const struct spirv_cross_miplevel *mipmaps;
- unsigned num_mipmaps;
-
- enum spirv_cross_format format;
- enum spirv_cross_wrap wrap_s;
- enum spirv_cross_wrap wrap_t;
- enum spirv_cross_filter min_filter;
- enum spirv_cross_filter mag_filter;
- enum spirv_cross_mipfilter mip_filter;
-};
-
-typedef struct spirv_cross_sampler_2d spirv_cross_sampler_2d_t;
-spirv_cross_sampler_2d_t *spirv_cross_create_sampler_2d(const struct spirv_cross_sampler_info *info);
-void spirv_cross_destroy_sampler_2d(spirv_cross_sampler_2d_t *samp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/deps/SPIRV-Cross/include/spirv_cross/image.hpp b/deps/SPIRV-Cross/include/spirv_cross/image.hpp
deleted file mode 100644
index 73de894f88..0000000000
--- a/deps/SPIRV-Cross/include/spirv_cross/image.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2015-2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SPIRV_CROSS_IMAGE_HPP
-#define SPIRV_CROSS_IMAGE_HPP
-
-#ifndef GLM_SWIZZLE
-#define GLM_SWIZZLE
-#endif
-
-#ifndef GLM_FORCE_RADIANS
-#define GLM_FORCE_RADIANS
-#endif
-
-#include
-
-namespace spirv_cross
-{
-template
-struct image2DBase
-{
- virtual ~image2DBase() = default;
- inline virtual T load(glm::ivec2 coord) const
- {
- return T(0, 0, 0, 1);
- }
- inline virtual void store(glm::ivec2 coord, const T &v)
- {
- }
-};
-
-typedef image2DBase image2D;
-typedef image2DBase iimage2D;
-typedef image2DBase uimage2D;
-
-template
-inline T imageLoad(const image2DBase &image, glm::ivec2 coord)
-{
- return image.load(coord);
-}
-
-template
-void imageStore(image2DBase &image, glm::ivec2 coord, const T &value)
-{
- image.store(coord, value);
-}
-}
-
-#endif
diff --git a/deps/SPIRV-Cross/include/spirv_cross/internal_interface.hpp b/deps/SPIRV-Cross/include/spirv_cross/internal_interface.hpp
deleted file mode 100644
index e56223dfdb..0000000000
--- a/deps/SPIRV-Cross/include/spirv_cross/internal_interface.hpp
+++ /dev/null
@@ -1,603 +0,0 @@
-/*
- * Copyright 2015-2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SPIRV_CROSS_INTERNAL_INTERFACE_HPP
-#define SPIRV_CROSS_INTERNAL_INTERFACE_HPP
-
-// This file must only be included by the shader generated by spirv-cross!
-
-#ifndef GLM_FORCE_SWIZZLE
-#define GLM_FORCE_SWIZZLE
-#endif
-
-#ifndef GLM_FORCE_RADIANS
-#define GLM_FORCE_RADIANS
-#endif
-
-#include
-
-#include "barrier.hpp"
-#include "external_interface.h"
-#include "image.hpp"
-#include "sampler.hpp"
-#include "thread_group.hpp"
-#include
-#include
-
-namespace internal
-{
-// Adaptor helpers to adapt GLSL access chain syntax to C++.
-// Don't bother with arrays of arrays on uniforms ...
-// Would likely need horribly complex variadic template munging.
-
-template
-struct Interface
-{
- enum
- {
- ArraySize = 1,
- Size = sizeof(T)
- };
-
- Interface()
- : ptr(0)
- {
- }
- T &get()
- {
- assert(ptr);
- return *ptr;
- }
-
- T *ptr;
-};
-
-// For array types, return a pointer instead.
-template
-struct Interface
-{
- enum
- {
- ArraySize = U,
- Size = U * sizeof(T)
- };
-
- Interface()
- : ptr(0)
- {
- }
- T *get()
- {
- assert(ptr);
- return ptr;
- }
-
- T *ptr;
-};
-
-// For case when array size is 1, avoid double dereference.
-template
-struct PointerInterface
-{
- enum
- {
- ArraySize = 1,
- Size = sizeof(T *)
- };
- enum
- {
- PreDereference = true
- };
-
- PointerInterface()
- : ptr(0)
- {
- }
-
- T &get()
- {
- assert(ptr);
- return *ptr;
- }
-
- T *ptr;
-};
-
-// Automatically converts a pointer down to reference to match GLSL syntax.
-template
-struct DereferenceAdaptor
-{
- DereferenceAdaptor(T **ptr)
- : ptr(ptr)
- {
- }
- T &operator[](unsigned index) const
- {
- return *(ptr[index]);
- }
- T **ptr;
-};
-
-// We can't have a linear array of T* since T* can be an abstract type in case of samplers.
-// We also need a list of pointers since we can have run-time length SSBOs.
-template
-struct PointerInterface
-{
- enum
- {
- ArraySize = U,
- Size = sizeof(T *) * U
- };
- enum
- {
- PreDereference = false
- };
- PointerInterface()
- : ptr(0)
- {
- }
-
- DereferenceAdaptor get()
- {
- assert(ptr);
- return DereferenceAdaptor(ptr);
- }
-
- T **ptr;
-};
-
-// Resources can be more abstract and be unsized,
-// so we need to have an array of pointers for those cases.
-template
-struct Resource : PointerInterface
-{
-};
-
-// POD with no unknown sizes, so we can express these as flat arrays.
-template
-struct UniformConstant : Interface
-{
-};
-template
-struct StageInput : Interface
-{
-};
-template
-struct StageOutput : Interface
-{
-};
-template
-struct PushConstant : Interface
-{
-};
-}
-
-struct spirv_cross_shader
-{
- struct PPSize
- {
- PPSize()
- : ptr(0)
- , size(0)
- {
- }
- void **ptr;
- size_t size;
- };
-
- struct PPSizeResource
- {
- PPSizeResource()
- : ptr(0)
- , size(0)
- , pre_dereference(false)
- {
- }
- void **ptr;
- size_t size;
- bool pre_dereference;
- };
-
- PPSizeResource resources[SPIRV_CROSS_NUM_DESCRIPTOR_SETS][SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS];
- PPSize stage_inputs[SPIRV_CROSS_NUM_STAGE_INPUTS];
- PPSize stage_outputs[SPIRV_CROSS_NUM_STAGE_OUTPUTS];
- PPSize uniform_constants[SPIRV_CROSS_NUM_UNIFORM_CONSTANTS];
- PPSize push_constant;
- PPSize builtins[SPIRV_CROSS_NUM_BUILTINS];
-
- template
- void register_builtin(spirv_cross_builtin builtin, const U &value)
- {
- assert(!builtins[builtin].ptr);
-
- builtins[builtin].ptr = (void **)&value.ptr;
- builtins[builtin].size = sizeof(*value.ptr) * U::ArraySize;
- }
-
- void set_builtin(spirv_cross_builtin builtin, void *data, size_t size)
- {
- assert(builtins[builtin].ptr);
- assert(size >= builtins[builtin].size);
-
- *builtins[builtin].ptr = data;
- }
-
- template
- void register_resource(const internal::Resource &value, unsigned set, unsigned binding)
- {
- assert(set < SPIRV_CROSS_NUM_DESCRIPTOR_SETS);
- assert(binding < SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS);
- assert(!resources[set][binding].ptr);
-
- resources[set][binding].ptr = (void **)&value.ptr;
- resources[set][binding].size = internal::Resource::Size;
- resources[set][binding].pre_dereference = internal::Resource::PreDereference;
- }
-
- template
- void register_stage_input(const internal::StageInput &value, unsigned location)
- {
- assert(location < SPIRV_CROSS_NUM_STAGE_INPUTS);
- assert(!stage_inputs[location].ptr);
-
- stage_inputs[location].ptr = (void **)&value.ptr;
- stage_inputs[location].size = internal::StageInput::Size;
- }
-
- template
- void register_stage_output(const internal::StageOutput &value, unsigned location)
- {
- assert(location < SPIRV_CROSS_NUM_STAGE_OUTPUTS);
- assert(!stage_outputs[location].ptr);
-
- stage_outputs[location].ptr = (void **)&value.ptr;
- stage_outputs[location].size = internal::StageOutput::Size;
- }
-
- template
- void register_uniform_constant(const internal::UniformConstant &value, unsigned location)
- {
- assert(location < SPIRV_CROSS_NUM_UNIFORM_CONSTANTS);
- assert(!uniform_constants[location].ptr);
-
- uniform_constants[location].ptr = (void **)&value.ptr;
- uniform_constants[location].size = internal::UniformConstant::Size;
- }
-
- template
- void register_push_constant(const internal::PushConstant &value)
- {
- assert(!push_constant.ptr);
-
- push_constant.ptr = (void **)&value.ptr;
- push_constant.size = internal::PushConstant::Size;
- }
-
- void set_stage_input(unsigned location, void *data, size_t size)
- {
- assert(location < SPIRV_CROSS_NUM_STAGE_INPUTS);
- assert(stage_inputs[location].ptr);
- assert(size >= stage_inputs[location].size);
-
- *stage_inputs[location].ptr = data;
- }
-
- void set_stage_output(unsigned location, void *data, size_t size)
- {
- assert(location < SPIRV_CROSS_NUM_STAGE_OUTPUTS);
- assert(stage_outputs[location].ptr);
- assert(size >= stage_outputs[location].size);
-
- *stage_outputs[location].ptr = data;
- }
-
- void set_uniform_constant(unsigned location, void *data, size_t size)
- {
- assert(location < SPIRV_CROSS_NUM_UNIFORM_CONSTANTS);
- assert(uniform_constants[location].ptr);
- assert(size >= uniform_constants[location].size);
-
- *uniform_constants[location].ptr = data;
- }
-
- void set_push_constant(void *data, size_t size)
- {
- assert(push_constant.ptr);
- assert(size >= push_constant.size);
-
- *push_constant.ptr = data;
- }
-
- void set_resource(unsigned set, unsigned binding, void **data, size_t size)
- {
- assert(set < SPIRV_CROSS_NUM_DESCRIPTOR_SETS);
- assert(binding < SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS);
- assert(resources[set][binding].ptr);
- assert(size >= resources[set][binding].size);
-
- // We're using the regular PointerInterface, dereference ahead of time.
- if (resources[set][binding].pre_dereference)
- *resources[set][binding].ptr = *data;
- else
- *resources[set][binding].ptr = data;
- }
-};
-
-namespace spirv_cross
-{
-template
-struct BaseShader : spirv_cross_shader
-{
- void invoke()
- {
- static_cast(this)->main();
- }
-};
-
-struct FragmentResources
-{
- internal::StageOutput gl_FragCoord;
- void init(spirv_cross_shader &s)
- {
- s.register_builtin(SPIRV_CROSS_BUILTIN_FRAG_COORD, gl_FragCoord);
- }
-#define gl_FragCoord __res->gl_FragCoord.get()
-};
-
-template
-struct FragmentShader : BaseShader>
-{
- inline void main()
- {
- impl.main();
- }
-
- FragmentShader()
- {
- resources.init(*this);
- impl.__res = &resources;
- }
-
- T impl;
- Res resources;
-};
-
-struct VertexResources
-{
- internal::StageOutput gl_Position;
- void init(spirv_cross_shader &s)
- {
- s.register_builtin(SPIRV_CROSS_BUILTIN_POSITION, gl_Position);
- }
-#define gl_Position __res->gl_Position.get()
-};
-
-template
-struct VertexShader : BaseShader>
-{
- inline void main()
- {
- impl.main();
- }
-
- VertexShader()
- {
- resources.init(*this);
- impl.__res = &resources;
- }
-
- T impl;
- Res resources;
-};
-
-struct TessEvaluationResources
-{
- inline void init(spirv_cross_shader &)
- {
- }
-};
-
-template
-struct TessEvaluationShader : BaseShader>
-{
- inline void main()
- {
- impl.main();
- }
-
- TessEvaluationShader()
- {
- resources.init(*this);
- impl.__res = &resources;
- }
-
- T impl;
- Res resources;
-};
-
-struct TessControlResources
-{
- inline void init(spirv_cross_shader &)
- {
- }
-};
-
-template
-struct TessControlShader : BaseShader>
-{
- inline void main()
- {
- impl.main();
- }
-
- TessControlShader()
- {
- resources.init(*this);
- impl.__res = &resources;
- }
-
- T impl;
- Res resources;
-};
-
-struct GeometryResources
-{
- inline void init(spirv_cross_shader &)
- {
- }
-};
-
-template
-struct GeometryShader : BaseShader>
-{
- inline void main()
- {
- impl.main();
- }
-
- GeometryShader()
- {
- resources.init(*this);
- impl.__res = &resources;
- }
-
- T impl;
- Res resources;
-};
-
-struct ComputeResources
-{
- internal::StageInput gl_WorkGroupID__;
- internal::StageInput gl_NumWorkGroups__;
- void init(spirv_cross_shader &s)
- {
- s.register_builtin(SPIRV_CROSS_BUILTIN_WORK_GROUP_ID, gl_WorkGroupID__);
- s.register_builtin(SPIRV_CROSS_BUILTIN_NUM_WORK_GROUPS, gl_NumWorkGroups__);
- }
-#define gl_WorkGroupID __res->gl_WorkGroupID__.get()
-#define gl_NumWorkGroups __res->gl_NumWorkGroups__.get()
-
- Barrier barrier__;
-#define barrier() __res->barrier__.wait()
-};
-
-struct ComputePrivateResources
-{
- uint32_t gl_LocalInvocationIndex__;
-#define gl_LocalInvocationIndex __priv_res.gl_LocalInvocationIndex__
- glm::uvec3 gl_LocalInvocationID__;
-#define gl_LocalInvocationID __priv_res.gl_LocalInvocationID__
- glm::uvec3 gl_GlobalInvocationID__;
-#define gl_GlobalInvocationID __priv_res.gl_GlobalInvocationID__
-};
-
-template
-struct ComputeShader : BaseShader>
-{
- inline void main()
- {
- resources.barrier__.reset_counter();
-
- for (unsigned z = 0; z < WorkGroupZ; z++)
- for (unsigned y = 0; y < WorkGroupY; y++)
- for (unsigned x = 0; x < WorkGroupX; x++)
- impl[z][y][x].__priv_res.gl_GlobalInvocationID__ =
- glm::uvec3(WorkGroupX, WorkGroupY, WorkGroupZ) * resources.gl_WorkGroupID__.get() +
- glm::uvec3(x, y, z);
-
- group.run();
- group.wait();
- }
-
- ComputeShader()
- : group(&impl[0][0][0])
- {
- resources.init(*this);
- resources.barrier__.set_release_divisor(WorkGroupX * WorkGroupY * WorkGroupZ);
-
- unsigned i = 0;
- for (unsigned z = 0; z < WorkGroupZ; z++)
- {
- for (unsigned y = 0; y < WorkGroupY; y++)
- {
- for (unsigned x = 0; x < WorkGroupX; x++)
- {
- impl[z][y][x].__priv_res.gl_LocalInvocationID__ = glm::uvec3(x, y, z);
- impl[z][y][x].__priv_res.gl_LocalInvocationIndex__ = i++;
- impl[z][y][x].__res = &resources;
- }
- }
- }
- }
-
- T impl[WorkGroupZ][WorkGroupY][WorkGroupX];
- ThreadGroup group;
- Res resources;
-};
-
-inline void memoryBarrierShared()
-{
- Barrier::memoryBarrier();
-}
-inline void memoryBarrier()
-{
- Barrier::memoryBarrier();
-}
-// TODO: Rest of the barriers.
-
-// Atomics
-template
-inline T atomicAdd(T &v, T a)
-{
- static_assert(sizeof(std::atomic) == sizeof(T), "Cannot cast properly to std::atomic.");
-
- // We need explicit memory barriers in GLSL to enfore any ordering.
- // FIXME: Can we really cast this? There is no other way I think ...
- return std::atomic_fetch_add_explicit(reinterpret_cast *>(&v), a, std::memory_order_relaxed);
-}
-}
-
-void spirv_cross_set_stage_input(spirv_cross_shader_t *shader, unsigned location, void *data, size_t size)
-{
- shader->set_stage_input(location, data, size);
-}
-
-void spirv_cross_set_stage_output(spirv_cross_shader_t *shader, unsigned location, void *data, size_t size)
-{
- shader->set_stage_output(location, data, size);
-}
-
-void spirv_cross_set_uniform_constant(spirv_cross_shader_t *shader, unsigned location, void *data, size_t size)
-{
- shader->set_uniform_constant(location, data, size);
-}
-
-void spirv_cross_set_resource(spirv_cross_shader_t *shader, unsigned set, unsigned binding, void **data, size_t size)
-{
- shader->set_resource(set, binding, data, size);
-}
-
-void spirv_cross_set_push_constant(spirv_cross_shader_t *shader, void *data, size_t size)
-{
- shader->set_push_constant(data, size);
-}
-
-void spirv_cross_set_builtin(spirv_cross_shader_t *shader, spirv_cross_builtin builtin, void *data, size_t size)
-{
- shader->set_builtin(builtin, data, size);
-}
-
-#endif
diff --git a/deps/SPIRV-Cross/include/spirv_cross/sampler.hpp b/deps/SPIRV-Cross/include/spirv_cross/sampler.hpp
deleted file mode 100644
index a95d489e2d..0000000000
--- a/deps/SPIRV-Cross/include/spirv_cross/sampler.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2015-2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SPIRV_CROSS_SAMPLER_HPP
-#define SPIRV_CROSS_SAMPLER_HPP
-
-#include
-
-namespace spirv_cross
-{
-struct spirv_cross_sampler_2d
-{
- inline virtual ~spirv_cross_sampler_2d()
- {
- }
-};
-
-template
-struct sampler2DBase : spirv_cross_sampler_2d
-{
- sampler2DBase(const spirv_cross_sampler_info *info)
- {
- mips.insert(mips.end(), info->mipmaps, info->mipmaps + info->num_mipmaps);
- format = info->format;
- wrap_s = info->wrap_s;
- wrap_t = info->wrap_t;
- min_filter = info->min_filter;
- mag_filter = info->mag_filter;
- mip_filter = info->mip_filter;
- }
-
- inline virtual T sample(glm::vec2 uv, float bias)
- {
- return sampleLod(uv, bias);
- }
-
- inline virtual T sampleLod(glm::vec2 uv, float lod)
- {
- if (mag_filter == SPIRV_CROSS_FILTER_NEAREST)
- {
- uv.x = wrap(uv.x, wrap_s, mips[0].width);
- uv.y = wrap(uv.y, wrap_t, mips[0].height);
- glm::vec2 uv_full = uv * glm::vec2(mips[0].width, mips[0].height);
-
- int x = int(uv_full.x);
- int y = int(uv_full.y);
- return sample(x, y, 0);
- }
- else
- {
- return T(0, 0, 0, 1);
- }
- }
-
- inline float wrap(float v, spirv_cross_wrap wrap, unsigned size)
- {
- switch (wrap)
- {
- case SPIRV_CROSS_WRAP_REPEAT:
- return v - glm::floor(v);
- case SPIRV_CROSS_WRAP_CLAMP_TO_EDGE:
- {
- float half = 0.5f / size;
- return glm::clamp(v, half, 1.0f - half);
- }
-
- default:
- return 0.0f;
- }
- }
-
- std::vector mips;
- spirv_cross_format format;
- spirv_cross_wrap wrap_s;
- spirv_cross_format wrap_t;
- spirv_cross_filter min_filter;
- spirv_cross_filter mag_filter;
- spirv_cross_mipfilter mip_filter;
-};
-
-typedef sampler2DBase sampler2D;
-typedef sampler2DBase isampler2D;
-typedef sampler2DBase usampler2D;
-
-template
-inline T texture(const sampler2DBase &samp, const glm::vec2 &uv, float bias = 0.0f)
-{
- return samp.sample(uv, bias);
-}
-}
-
-#endif
diff --git a/deps/SPIRV-Cross/include/spirv_cross/thread_group.hpp b/deps/SPIRV-Cross/include/spirv_cross/thread_group.hpp
deleted file mode 100644
index 377f098b4f..0000000000
--- a/deps/SPIRV-Cross/include/spirv_cross/thread_group.hpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2015-2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SPIRV_CROSS_THREAD_GROUP_HPP
-#define SPIRV_CROSS_THREAD_GROUP_HPP
-
-#include
-#include
-#include
-
-namespace spirv_cross
-{
-template
-class ThreadGroup
-{
-public:
- ThreadGroup(T *impl)
- {
- for (unsigned i = 0; i < Size; i++)
- workers[i].start(&impl[i]);
- }
-
- void run()
- {
- for (auto &worker : workers)
- worker.run();
- }
-
- void wait()
- {
- for (auto &worker : workers)
- worker.wait();
- }
-
-private:
- struct Thread
- {
- enum State
- {
- Idle,
- Running,
- Dying
- };
- State state = Idle;
-
- void start(T *impl)
- {
- worker = std::thread([impl, this] {
- for (;;)
- {
- {
- std::unique_lock l{ lock };
- cond.wait(l, [this] { return state != Idle; });
- if (state == Dying)
- break;
- }
-
- impl->main();
-
- std::lock_guard l{ lock };
- state = Idle;
- cond.notify_one();
- }
- });
- }
-
- void wait()
- {
- std::unique_lock l{ lock };
- cond.wait(l, [this] { return state == Idle; });
- }
-
- void run()
- {
- std::lock_guard l{ lock };
- state = Running;
- cond.notify_one();
- }
-
- ~Thread()
- {
- if (worker.joinable())
- {
- {
- std::lock_guard l{ lock };
- state = Dying;
- cond.notify_one();
- }
- worker.join();
- }
- }
- std::thread worker;
- std::condition_variable cond;
- std::mutex lock;
- };
- Thread workers[Size];
-};
-}
-
-#endif
diff --git a/deps/SPIRV-Cross/jni/Android.mk b/deps/SPIRV-Cross/jni/Android.mk
deleted file mode 100644
index ca5014d63a..0000000000
--- a/deps/SPIRV-Cross/jni/Android.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS += -std=c++11 -Wall -Wextra
-LOCAL_MODULE := spirv-cross
-LOCAL_SRC_FILES := ../spirv_cfg.cpp ../spirv_cross.cpp ../spirv_glsl.cpp ../spirv_msl.cpp ../spirv_cpp.cpp
-LOCAL_CPP_FEATURES := exceptions
-LOCAL_ARM_MODE := arm
-LOCAL_CFLAGS := -D__STDC_LIMIT_MACROS
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/deps/SPIRV-Cross/jni/Application.mk b/deps/SPIRV-Cross/jni/Application.mk
deleted file mode 100644
index 9a2e77f2d1..0000000000
--- a/deps/SPIRV-Cross/jni/Application.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-APP_STL := c++_static
-APP_ABI := armeabi-v7a
diff --git a/deps/SPIRV-Cross/main.cpp b/deps/SPIRV-Cross/main.cpp
deleted file mode 100644
index 49fc8653b3..0000000000
--- a/deps/SPIRV-Cross/main.cpp
+++ /dev/null
@@ -1,923 +0,0 @@
-/*
- * Copyright 2015-2017 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "spirv_cpp.hpp"
-#include "spirv_glsl.hpp"
-#include "spirv_hlsl.hpp"
-#include "spirv_msl.hpp"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#ifdef _MSC_VER
-#pragma warning(disable : 4996)
-#endif
-
-using namespace spv;
-using namespace spirv_cross;
-using namespace std;
-
-#ifdef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
-static inline void THROW(const char *str)
-{
- fprintf(stderr, "SPIRV-Cross will abort: %s\n", str);
- fflush(stderr);
- abort();
-}
-#else
-#define THROW(x) throw runtime_error(x)
-#endif
-
-struct CLIParser;
-struct CLICallbacks
-{
- void add(const char *cli, const function &func)
- {
- callbacks[cli] = func;
- }
- unordered_map> callbacks;
- function error_handler;
- function default_handler;
-};
-
-struct CLIParser
-{
- CLIParser(CLICallbacks cbs_, int argc_, char *argv_[])
- : cbs(move(cbs_))
- , argc(argc_)
- , argv(argv_)
- {
- }
-
- bool parse()
- {
-#ifndef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
- try
-#endif
- {
- while (argc && !ended_state)
- {
- const char *next = *argv++;
- argc--;
-
- if (*next != '-' && cbs.default_handler)
- {
- cbs.default_handler(next);
- }
- else
- {
- auto itr = cbs.callbacks.find(next);
- if (itr == ::end(cbs.callbacks))
- {
- THROW("Invalid argument");
- }
-
- itr->second(*this);
- }
- }
-
- return true;
- }
-#ifndef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
- catch (...)
- {
- if (cbs.error_handler)
- {
- cbs.error_handler();
- }
- return false;
- }
-#endif
- }
-
- void end()
- {
- ended_state = true;
- }
-
- uint32_t next_uint()
- {
- if (!argc)
- {
- THROW("Tried to parse uint, but nothing left in arguments");
- }
-
- uint32_t val = stoul(*argv);
- if (val > numeric_limits::max())
- {
- THROW("next_uint() out of range");
- }
-
- argc--;
- argv++;
-
- return val;
- }
-
- double next_double()
- {
- if (!argc)
- {
- THROW("Tried to parse double, but nothing left in arguments");
- }
-
- double val = stod(*argv);
-
- argc--;
- argv++;
-
- return val;
- }
-
- const char *next_string()
- {
- if (!argc)
- {
- THROW("Tried to parse string, but nothing left in arguments");
- }
-
- const char *ret = *argv;
- argc--;
- argv++;
- return ret;
- }
-
- CLICallbacks cbs;
- int argc;
- char **argv;
- bool ended_state = false;
-};
-
-static vector read_spirv_file(const char *path)
-{
- FILE *file = fopen(path, "rb");
- if (!file)
- {
- fprintf(stderr, "Failed to open SPIRV file: %s\n", path);
- return {};
- }
-
- fseek(file, 0, SEEK_END);
- long len = ftell(file) / sizeof(uint32_t);
- rewind(file);
-
- vector spirv(len);
- if (fread(spirv.data(), sizeof(uint32_t), len, file) != size_t(len))
- spirv.clear();
-
- fclose(file);
- return spirv;
-}
-
-static bool write_string_to_file(const char *path, const char *string)
-{
- FILE *file = fopen(path, "w");
- if (!file)
- {
- fprintf(stderr, "Failed to write file: %s\n", path);
- return false;
- }
-
- fprintf(file, "%s", string);
- fclose(file);
- return true;
-}
-
-static void print_resources(const Compiler &compiler, const char *tag, const vector &resources)
-{
- fprintf(stderr, "%s\n", tag);
- fprintf(stderr, "=============\n\n");
- bool print_ssbo = !strcmp(tag, "ssbos");
-
- for (auto &res : resources)
- {
- auto &type = compiler.get_type(res.type_id);
- auto mask = compiler.get_decoration_mask(res.id);
-
- if (print_ssbo && compiler.buffer_is_hlsl_counter_buffer(res.id))
- continue;
-
- // If we don't have a name, use the fallback for the type instead of the variable
- // for SSBOs and UBOs since those are the only meaningful names to use externally.
- // Push constant blocks are still accessed by name and not block name, even though they are technically Blocks.
- bool is_push_constant = compiler.get_storage_class(res.id) == StorageClassPushConstant;
- bool is_block = (compiler.get_decoration_mask(type.self) &
- ((1ull << DecorationBlock) | (1ull << DecorationBufferBlock))) != 0;
- bool is_sized_block = is_block && (compiler.get_storage_class(res.id) == StorageClassUniform ||
- compiler.get_storage_class(res.id) == StorageClassUniformConstant);
- uint32_t fallback_id = !is_push_constant && is_block ? res.base_type_id : res.id;
-
- uint32_t block_size = 0;
- if (is_sized_block)
- block_size = uint32_t(compiler.get_declared_struct_size(compiler.get_type(res.base_type_id)));
-
- string array;
- for (auto arr : type.array)
- array = join("[", arr ? convert_to_string(arr) : "", "]") + array;
-
- fprintf(stderr, " ID %03u : %s%s", res.id,
- !res.name.empty() ? res.name.c_str() : compiler.get_fallback_name(fallback_id).c_str(), array.c_str());
-
- if (mask & (1ull << DecorationLocation))
- fprintf(stderr, " (Location : %u)", compiler.get_decoration(res.id, DecorationLocation));
- if (mask & (1ull << DecorationDescriptorSet))
- fprintf(stderr, " (Set : %u)", compiler.get_decoration(res.id, DecorationDescriptorSet));
- if (mask & (1ull << DecorationBinding))
- fprintf(stderr, " (Binding : %u)", compiler.get_decoration(res.id, DecorationBinding));
- if (mask & (1ull << DecorationInputAttachmentIndex))
- fprintf(stderr, " (Attachment : %u)", compiler.get_decoration(res.id, DecorationInputAttachmentIndex));
- if (mask & (1ull << DecorationNonReadable))
- fprintf(stderr, " writeonly");
- if (mask & (1ull << DecorationNonWritable))
- fprintf(stderr, " readonly");
- if (is_sized_block)
- fprintf(stderr, " (BlockSize : %u bytes)", block_size);
-
- uint32_t counter_id = 0;
- if (print_ssbo && compiler.buffer_get_hlsl_counter_buffer(res.id, counter_id))
- fprintf(stderr, " (HLSL counter buffer ID: %u)", counter_id);
- fprintf(stderr, "\n");
- }
- fprintf(stderr, "=============\n\n");
-}
-
-static const char *execution_model_to_str(spv::ExecutionModel model)
-{
- switch (model)
- {
- case spv::ExecutionModelVertex:
- return "vertex";
- case spv::ExecutionModelTessellationControl:
- return "tessellation control";
- case ExecutionModelTessellationEvaluation:
- return "tessellation evaluation";
- case ExecutionModelGeometry:
- return "geometry";
- case ExecutionModelFragment:
- return "fragment";
- case ExecutionModelGLCompute:
- return "compute";
- default:
- return "???";
- }
-}
-
-static void print_resources(const Compiler &compiler, const ShaderResources &res)
-{
- uint64_t modes = compiler.get_execution_mode_mask();
-
- fprintf(stderr, "Entry points:\n");
- auto entry_points = compiler.get_entry_points();
- for (auto &e : entry_points)
- fprintf(stderr, " %s (%s)\n", e.c_str(), execution_model_to_str(compiler.get_entry_point(e).model));
- fprintf(stderr, "\n");
-
- fprintf(stderr, "Execution modes:\n");
- for (unsigned i = 0; i < 64; i++)
- {
- if (!(modes & (1ull << i)))
- continue;
-
- auto mode = static_cast(i);
- uint32_t arg0 = compiler.get_execution_mode_argument(mode, 0);
- uint32_t arg1 = compiler.get_execution_mode_argument(mode, 1);
- uint32_t arg2 = compiler.get_execution_mode_argument(mode, 2);
-
- switch (static_cast(i))
- {
- case ExecutionModeInvocations:
- fprintf(stderr, " Invocations: %u\n", arg0);
- break;
-
- case ExecutionModeLocalSize:
- fprintf(stderr, " LocalSize: (%u, %u, %u)\n", arg0, arg1, arg2);
- break;
-
- case ExecutionModeOutputVertices:
- fprintf(stderr, " OutputVertices: %u\n", arg0);
- break;
-
-#define CHECK_MODE(m) \
- case ExecutionMode##m: \
- fprintf(stderr, " %s\n", #m); \
- break
- CHECK_MODE(SpacingEqual);
- CHECK_MODE(SpacingFractionalEven);
- CHECK_MODE(SpacingFractionalOdd);
- CHECK_MODE(VertexOrderCw);
- CHECK_MODE(VertexOrderCcw);
- CHECK_MODE(PixelCenterInteger);
- CHECK_MODE(OriginUpperLeft);
- CHECK_MODE(OriginLowerLeft);
- CHECK_MODE(EarlyFragmentTests);
- CHECK_MODE(PointMode);
- CHECK_MODE(Xfb);
- CHECK_MODE(DepthReplacing);
- CHECK_MODE(DepthGreater);
- CHECK_MODE(DepthLess);
- CHECK_MODE(DepthUnchanged);
- CHECK_MODE(LocalSizeHint);
- CHECK_MODE(InputPoints);
- CHECK_MODE(InputLines);
- CHECK_MODE(InputLinesAdjacency);
- CHECK_MODE(Triangles);
- CHECK_MODE(InputTrianglesAdjacency);
- CHECK_MODE(Quads);
- CHECK_MODE(Isolines);
- CHECK_MODE(OutputPoints);
- CHECK_MODE(OutputLineStrip);
- CHECK_MODE(OutputTriangleStrip);
- CHECK_MODE(VecTypeHint);
- CHECK_MODE(ContractionOff);
-
- default:
- break;
- }
- }
- fprintf(stderr, "\n");
-
- print_resources(compiler, "subpass inputs", res.subpass_inputs);
- print_resources(compiler, "inputs", res.stage_inputs);
- print_resources(compiler, "outputs", res.stage_outputs);
- print_resources(compiler, "textures", res.sampled_images);
- print_resources(compiler, "separate images", res.separate_images);
- print_resources(compiler, "separate samplers", res.separate_samplers);
- print_resources(compiler, "images", res.storage_images);
- print_resources(compiler, "ssbos", res.storage_buffers);
- print_resources(compiler, "ubos", res.uniform_buffers);
- print_resources(compiler, "push", res.push_constant_buffers);
- print_resources(compiler, "counters", res.atomic_counters);
-}
-
-static void print_push_constant_resources(const Compiler &compiler, const vector &res)
-{
- for (auto &block : res)
- {
- auto ranges = compiler.get_active_buffer_ranges(block.id);
- fprintf(stderr, "Active members in buffer: %s\n",
- !block.name.empty() ? block.name.c_str() : compiler.get_fallback_name(block.id).c_str());
-
- fprintf(stderr, "==================\n\n");
- for (auto &range : ranges)
- {
- const auto &name = compiler.get_member_name(block.base_type_id, range.index);
-
- fprintf(stderr, "Member #%3u (%s): Offset: %4u, Range: %4u\n", range.index,
- !name.empty() ? name.c_str() : compiler.get_fallback_member_name(range.index).c_str(),
- unsigned(range.offset), unsigned(range.range));
- }
- fprintf(stderr, "==================\n\n");
- }
-}
-
-static void print_spec_constants(const Compiler &compiler)
-{
- auto spec_constants = compiler.get_specialization_constants();
- fprintf(stderr, "Specialization constants\n");
- fprintf(stderr, "==================\n\n");
- for (auto &c : spec_constants)
- fprintf(stderr, "ID: %u, Spec ID: %u\n", c.id, c.constant_id);
- fprintf(stderr, "==================\n\n");
-}
-
-static void print_capabilities_and_extensions(const Compiler &compiler)
-{
- fprintf(stderr, "Capabilities\n");
- fprintf(stderr, "============\n");
- for (auto &capability : compiler.get_declared_capabilities())
- fprintf(stderr, "Capability: %u\n", static_cast(capability));
- fprintf(stderr, "============\n\n");
-
- fprintf(stderr, "Extensions\n");
- fprintf(stderr, "============\n");
- for (auto &ext : compiler.get_declared_extensions())
- fprintf(stderr, "Extension: %s\n", ext.c_str());
- fprintf(stderr, "============\n\n");
-}
-
-struct PLSArg
-{
- PlsFormat format;
- string name;
-};
-
-struct Remap
-{
- string src_name;
- string dst_name;
- unsigned components;
-};
-
-struct VariableTypeRemap
-{
- string variable_name;
- string new_variable_type;
-};
-
-struct InterfaceVariableRename
-{
- StorageClass storageClass;
- uint32_t location;
- string variable_name;
-};
-
-struct CLIArguments
-{
- const char *input = nullptr;
- const char *output = nullptr;
- const char *cpp_interface_name = nullptr;
- uint32_t version = 0;
- uint32_t shader_model = 0;
- uint32_t msl_version = 0;
- bool es = false;
- bool set_version = false;
- bool set_shader_model = false;
- bool set_msl_version = false;
- bool set_es = false;
- bool dump_resources = false;
- bool force_temporary = false;
- bool flatten_ubo = false;
- bool fixup = false;
- bool yflip = false;
- bool sso = false;
- vector pls_in;
- vector pls_out;
- vector remaps;
- vector extensions;
- vector variable_type_remaps;
- vector interface_variable_renames;
- vector hlsl_attr_remap;
- string entry;
-
- vector> entry_point_rename;
-
- uint32_t iterations = 1;
- bool cpp = false;
- bool msl = false;
- bool hlsl = false;
- bool hlsl_compat = false;
- bool vulkan_semantics = false;
- bool flatten_multidimensional_arrays = false;
- bool use_420pack_extension = true;
- bool remove_unused = false;
-};
-
-static void print_help()
-{
- fprintf(stderr, "Usage: spirv-cross [--output