diff --git a/3rdparty/spirv-headers/CMakeLists.txt b/3rdparty/spirv-headers/CMakeLists.txt
deleted file mode 100644
index 167a3e7cb..000000000
--- a/3rdparty/spirv-headers/CMakeLists.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright (c) 2015-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.
-
-#
-# The SPIR-V headers from the SPIR-V Registry
-# https://www.khronos.org/registry/spir-v/
-#
-cmake_minimum_required(VERSION 2.8.11)
-project(SPIRV-Headers)
-
-# There are two ways to use this project.
-#
-# Using this source tree directly from a CMake-based project:
-# 1. Add an add_subdirectory directive to include this sub directory.
-# 2. Use ${SPIRV-Headers_SOURCE_DIR}/include} in a target_include_directories
-# command.
-#
-# Installing the headers first, then using them with an implicit include
-# directory. To install the headers:
-# 1. mkdir build ; cd build
-# 2. cmake ..
-# 3. cmake --build . --target install
-
-file(GLOB_RECURSE HEADER_FILES
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- include/spirv/*)
-foreach(HEADER_FILE ${HEADER_FILES})
- get_filename_component(HEADER_INSTALL_DIR ${HEADER_FILE} PATH)
- install(FILES ${HEADER_FILE} DESTINATION ${HEADER_INSTALL_DIR})
-endforeach()
-
-# legacy
-add_custom_target(install-headers
- COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv
- $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/include/spirv)
-
-option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples"
- ${SPIRV_HEADERS_SKIP_EXAMPLES})
-if(NOT ${SPIRV_HEADERS_SKIP_EXAMPLES})
- set(SPIRV_HEADERS_ENABLE_EXAMPLES ON)
-endif()
-if (SPIRV_HEADERS_ENABLE_EXAMPLES)
- message(STATUS "Building SPIRV-Header examples")
- add_subdirectory(example)
-endif()
diff --git a/3rdparty/spirv-headers/CODE_OF_CONDUCT.md b/3rdparty/spirv-headers/CODE_OF_CONDUCT.md
deleted file mode 100644
index a11610bd3..000000000
--- a/3rdparty/spirv-headers/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1 +0,0 @@
-A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct (https://www.khronos.org/developers/code-of-conduct), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil.
diff --git a/3rdparty/spirv-headers/README.md b/3rdparty/spirv-headers/README.md
deleted file mode 100644
index 846b20d80..000000000
--- a/3rdparty/spirv-headers/README.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# SPIR-V Headers
-
-This repository contains machine-readable files for the
-[SPIR-V Registry](https://www.khronos.org/registry/spir-v/).
-This includes:
-
-* Header files for various languages.
-* JSON files describing the grammar for the SPIR-V core instruction set
- and the extended instruction sets.
-* The XML registry file.
-* A tool to build the headers from the JSON grammar.
-
-Headers are provided in the [include](include) directory, with up-to-date
-headers in the `unified1` subdirectory. Older headers are provided according to
-their version.
-
-In contrast, the XML registry file has a linear history, so it is
-not tied to SPIR-V specification versions.
-
-## How is this repository updated?
-
-When a new version or revision of the SPIR-V specification is published,
-the SPIR-V Working Group will push new commits onto master, updating
-the files under [include](include).
-
-The SPIR-V XML registry file is updated by Khronos whenever a new enum range is allocated.
-
-Pull requests can be made to
-- request allocation of new enum ranges in the XML registry file
-- reserve specific tokens in the JSON grammar
-
-## How to install the headers
-
-```
-mkdir build
-cd build
-cmake ..
-cmake --build . --target install
-```
-
-Then, for example, you will have `/usr/local/include/spirv/unified1/spirv.h`
-
-If you want to install them somewhere else, then use
-`-DCMAKE_INSTALL_PREFIX=/other/path` on the first `cmake` command.
-
-## Using the headers without installing
-
-A CMake-based project can use the headers without installing, as follows:
-
-1. Add an `add_subdirectory` directive to include this source tree.
-2. Use `${SPIRV-Headers_SOURCE_DIR}/include}` in a `target_include_directories`
- directive.
-3. In your C or C++ source code use `#include` directives that explicitly mention
- the `spirv` path component.
-```
-#include "spirv/unified1/GLSL.std.450.h"
-#include "spirv/unified1/OpenCL.std.h"
-#include "spirv/unified1/spirv.hpp"
-```
-
-See also the [example](example/) subdirectory. But since that example is
-*inside* this repostory, it doesn't use and `add_subdirectory` directive.
-
-## Generating the headers from the JSON grammar
-
-This will generally be done by Khronos, for a change to the JSON grammar.
-However, the project for the tool to do this is included in this repository,
-and can be used to test a PR, or even to include the results in the PR.
-This is not required though.
-
-The header-generation project is under the `tools/buildHeaders` directory.
-Use CMake to build the project, in a `build` subdirectory (under `tools/buildHeaders`).
-There is then a bash script at `bin/makeHeaders` that shows how to use the built
-header-generator binary to generate the headers from the JSON grammar.
-(Execute `bin/makeHeaders` from the `tools/buildHeaders` directory.)
-
-Notes:
-- this generator is used in a broader context within Khronos to generate the specification,
- and that influences the languages used, for legacy reasons
-- the C++ structures built may similarly include more than strictly necessary, for the same reason
-
-## FAQ
-
-* *How are different versions published?*
-
- The multiple versions of the headers have been simplified into a
- single `unified1` view. The JSON grammar has a "version" field saying
- what version things first showed up in.
-
-* *How do you handle the evolution of extended instruction sets?*
-
- Extended instruction sets evolve asynchronously from the core spec.
- Right now there is only a single version of both the GLSL and OpenCL
- headers. So we don't yet have a problematic example to resolve.
-
-## License
-
-```
-Copyright (c) 2015-2018 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.
-```
diff --git a/3rdparty/spirv-headers/example/CMakeLists.txt b/3rdparty/spirv-headers/example/CMakeLists.txt
deleted file mode 100644
index dff65d918..000000000
--- a/3rdparty/spirv-headers/example/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-add_library(SPIRV-Headers-example
- ${CMAKE_CURRENT_SOURCE_DIR}/example.cpp)
-target_include_directories(SPIRV-Headers-example
- PRIVATE ${SPIRV-Headers_SOURCE_DIR}/include)
-
-add_library(SPIRV-Headers-example-1.1
- ${CMAKE_CURRENT_SOURCE_DIR}/example-1.1.cpp)
-target_include_directories(SPIRV-Headers-example-1.1
- PRIVATE ${SPIRV-Headers_SOURCE_DIR}/include)
diff --git a/3rdparty/spirv-headers/example/example-1.1.cpp b/3rdparty/spirv-headers/example/example-1.1.cpp
deleted file mode 100644
index 989d35c44..000000000
--- a/3rdparty/spirv-headers/example/example-1.1.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 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.
-
-// Use the SPIR-V 1.1 core instruction set, but with 1.0 versions
-// of the GLSL and OpenCL extended instruction sets.
-#include
-#include
-#include
-
-namespace {
-
-const GLSLstd450 kSin = GLSLstd450Sin;
-const OpenCLLIB::Entrypoints kNative_cos = OpenCLLIB::Native_cos;
-const spv::Op kNop = spv::OpNop;
-
-// This instruction is new in SPIR-V 1.1.
-const spv::Op kNamedBarrierInit = spv::OpNamedBarrierInitialize;
-
-} // anonymous namespace
diff --git a/3rdparty/spirv-headers/example/example.cpp b/3rdparty/spirv-headers/example/example.cpp
deleted file mode 100644
index 222c101d4..000000000
--- a/3rdparty/spirv-headers/example/example.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 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.
-
-#include
-#include
-#include
-
-namespace {
-
-const GLSLstd450 kSin = GLSLstd450Sin;
-const OpenCLLIB::Entrypoints kNative_cos = OpenCLLIB::Native_cos;
-const spv::Op kNop = spv::OpNop;
-
-} // anonymous namespace
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spirv.core.grammar.json b/3rdparty/spirv-headers/include/spirv/unified1/spirv.core.grammar.json
index 285f0a293..13a2618a2 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spirv.core.grammar.json
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spirv.core.grammar.json
@@ -5863,7 +5863,8 @@
"capabilities" : [ "VulkanMemoryModelKHR" ],
"parameters" : [
{ "kind" : "IdScope" }
- ]
+ ],
+ "version" : "None"
},
{
"enumerant" : "MakeTexelVisibleKHR",
@@ -5871,17 +5872,20 @@
"capabilities" : [ "VulkanMemoryModelKHR" ],
"parameters" : [
{ "kind" : "IdScope" }
- ]
+ ],
+ "version" : "None"
},
{
"enumerant" : "NonPrivateTexelKHR",
"value" : "0x0400",
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
},
{
"enumerant" : "VolatileTexelKHR",
"value" : "0x0800",
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
},
{
"enumerant" : "SignExtend",
@@ -6102,17 +6106,26 @@
{
"enumerant" : "OutputMemoryKHR",
"value" : "0x1000",
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
},
{
"enumerant" : "MakeAvailableKHR",
"value" : "0x2000",
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
},
{
"enumerant" : "MakeVisibleKHR",
"value" : "0x4000",
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "Volatile",
+ "value" : "0x8000",
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
}
]
},
@@ -6145,7 +6158,8 @@
"parameters" : [
{ "kind" : "IdScope" }
],
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
},
{
"enumerant" : "MakePointerVisibleKHR",
@@ -6153,12 +6167,14 @@
"parameters" : [
{ "kind" : "IdScope" }
],
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
},
{
"enumerant" : "NonPrivatePointerKHR",
"value" : "0x0020",
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
}
]
},
@@ -6249,42 +6265,50 @@
{
"enumerant" : "TaskNV",
"value" : 5267,
- "capabilities" : [ "MeshShadingNV" ]
+ "capabilities" : [ "MeshShadingNV" ],
+ "version" : "None"
},
{
"enumerant" : "MeshNV",
"value" : 5268,
- "capabilities" : [ "MeshShadingNV" ]
+ "capabilities" : [ "MeshShadingNV" ],
+ "version" : "None"
},
{
"enumerant" : "RayGenerationNV",
"value" : 5313,
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "IntersectionNV",
"value" : 5314,
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "AnyHitNV",
"value" : 5315,
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "ClosestHitNV",
"value" : 5316,
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "MissNV",
"value" : 5317,
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "CallableNV",
"value" : 5318,
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
}
]
},
@@ -6310,7 +6334,8 @@
"enumerant" : "PhysicalStorageBuffer64EXT",
"value" : 5348,
"extensions" : [ "SPV_EXT_physical_storage_buffer" ],
- "capabilities" : [ "PhysicalStorageBufferAddressesEXT" ]
+ "capabilities" : [ "PhysicalStorageBufferAddressesEXT" ],
+ "version" : "None"
}
]
},
@@ -6336,7 +6361,8 @@
{
"enumerant" : "VulkanKHR",
"value" : 3,
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
}
]
},
@@ -6793,43 +6819,50 @@
"enumerant" : "CallableDataNV",
"value" : 5328,
"extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "IncomingCallableDataNV",
"value" : 5329,
"extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "RayPayloadNV",
"value" : 5338,
"extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "HitAttributeNV",
"value" : 5339,
"extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "IncomingRayPayloadNV",
"value" : 5342,
"extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "ShaderRecordBufferNV",
"value" : 5343,
"extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ]
+ "capabilities" : [ "RayTracingNV" ],
+ "version" : "None"
},
{
"enumerant" : "PhysicalStorageBufferEXT",
"value" : 5349,
"extensions" : [ "SPV_EXT_physical_storage_buffer" ],
- "capabilities" : [ "PhysicalStorageBufferAddressesEXT" ]
+ "capabilities" : [ "PhysicalStorageBufferAddressesEXT" ],
+ "version" : "None"
}
]
},
@@ -7814,6 +7847,20 @@
"value" : 5300,
"capabilities" : [ "ShaderNonUniformEXT" ]
},
+ {
+ "enumerant" : "RestrictPointerEXT",
+ "value" : 5355,
+ "capabilities" : [ "PhysicalStorageBufferAddressesEXT" ],
+ "extensions" : [ "SPV_EXT_physical_storage_buffer" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "AliasedPointerEXT",
+ "value" : 5356,
+ "capabilities" : [ "PhysicalStorageBufferAddressesEXT" ],
+ "extensions" : [ "SPV_EXT_physical_storage_buffer" ],
+ "version" : "None"
+ },
{
"enumerant" : "CounterBuffer",
"value" : 5634,
@@ -7849,17 +7896,12 @@
"version" : "None"
},
{
- "enumerant" : "RestrictPointerEXT",
- "value" : 5355,
- "capabilities" : [ "PhysicalStorageBufferAddressesEXT" ],
- "extensions" : [ "SPV_EXT_physical_storage_buffer" ],
- "version" : "None"
- },
- {
- "enumerant" : "AliasedPointerEXT",
- "value" : 5356,
- "capabilities" : [ "PhysicalStorageBufferAddressesEXT" ],
- "extensions" : [ "SPV_EXT_physical_storage_buffer" ],
+ "enumerant" : "UserTypeGOOGLE",
+ "value" : 5636,
+ "parameters" : [
+ { "kind" : "LiteralString", "name" : "'User Type'" }
+ ],
+ "extensions" : [ "SPV_GOOGLE_user_type" ],
"version" : "None"
}
]
@@ -8360,109 +8402,127 @@
"enumerant" : "LaunchIdNV",
"value" : 5319,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "LaunchSizeNV",
"value" : 5320,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "WorldRayOriginNV",
"value" : 5321,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "WorldRayDirectionNV",
"value" : 5322,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "ObjectRayOriginNV",
"value" : 5323,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "ObjectRayDirectionNV",
"value" : 5324,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "RayTminNV",
"value" : 5325,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "RayTmaxNV",
"value" : 5326,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "InstanceCustomIndexNV",
"value" : 5327,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "ObjectToWorldNV",
"value" : 5330,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "WorldToObjectNV",
"value" : 5331,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "HitTNV",
"value" : 5332,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "HitKindNV",
"value" : 5333,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "IncomingRayFlagsNV",
"value" : 5351,
"capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ]
+ "extensions" : [ "SPV_NV_ray_tracing" ],
+ "version" : "None"
},
{
"enumerant" : "WarpsPerSMNV",
"value" : 5374,
"capabilities" : [ "ShaderSMBuiltinsNV" ],
- "extensions" : [ "SPV_NV_shader_sm_builtins" ]
+ "extensions" : [ "SPV_NV_shader_sm_builtins" ],
+ "version" : "None"
},
{
"enumerant" : "SMCountNV",
"value" : 5375,
"capabilities" : [ "ShaderSMBuiltinsNV" ],
- "extensions" : [ "SPV_NV_shader_sm_builtins" ]
+ "extensions" : [ "SPV_NV_shader_sm_builtins" ],
+ "version" : "None"
},
{
"enumerant" : "WarpIDNV",
"value" : 5376,
"capabilities" : [ "ShaderSMBuiltinsNV" ],
- "extensions" : [ "SPV_NV_shader_sm_builtins" ]
+ "extensions" : [ "SPV_NV_shader_sm_builtins" ],
+ "version" : "None"
},
{
"enumerant" : "SMIDNV",
"value" : 5377,
"capabilities" : [ "ShaderSMBuiltinsNV" ],
- "extensions" : [ "SPV_NV_shader_sm_builtins" ]
+ "extensions" : [ "SPV_NV_shader_sm_builtins" ],
+ "version" : "None"
}
]
},
@@ -8493,7 +8553,8 @@
{
"enumerant" : "QueueFamilyKHR",
"value" : 5,
- "capabilities" : [ "VulkanMemoryModelKHR" ]
+ "capabilities" : [ "VulkanMemoryModelKHR" ],
+ "version" : "None"
}
]
},
@@ -9153,6 +9214,44 @@
"extensions" : [ "SPV_NV_mesh_shader" ],
"version" : "None"
},
+ {
+ "enumerant" : "ImageFootprintNV",
+ "value" : 5282,
+ "extensions" : [ "SPV_NV_shader_image_footprint" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "FragmentBarycentricNV",
+ "value" : 5284,
+ "extensions" : [ "SPV_NV_fragment_shader_barycentric" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ComputeDerivativeGroupQuadsNV",
+ "value" : 5288,
+ "extensions" : [ "SPV_NV_compute_shader_derivatives" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "FragmentDensityEXT",
+ "value" : 5291,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_EXT_fragment_invocation_density", "SPV_NV_shading_rate" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ShadingRateNV",
+ "value" : 5291,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_NV_shading_rate", "SPV_EXT_fragment_invocation_density" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "GroupNonUniformPartitionedNV",
+ "value" : 5297,
+ "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ],
+ "version" : "None"
+ },
{
"enumerant" : "ShaderNonUniformEXT",
"value" : 5301,
@@ -9244,6 +9343,66 @@
"extensions" : [ "SPV_NV_ray_tracing" ],
"version" : "None"
},
+ {
+ "enumerant" : "VulkanMemoryModelKHR",
+ "value" : 5345,
+ "extensions" : [ "SPV_KHR_vulkan_memory_model" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "VulkanMemoryModelDeviceScopeKHR",
+ "value" : 5346,
+ "extensions" : [ "SPV_KHR_vulkan_memory_model" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "PhysicalStorageBufferAddressesEXT",
+ "value" : 5347,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_EXT_physical_storage_buffer" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ComputeDerivativeGroupLinearNV",
+ "value" : 5350,
+ "extensions" : [ "SPV_NV_compute_shader_derivatives" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "CooperativeMatrixNV",
+ "value" : 5357,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_NV_cooperative_matrix" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "FragmentShaderSampleInterlockEXT",
+ "value" : 5363,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_EXT_fragment_shader_interlock" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "FragmentShaderShadingRateInterlockEXT",
+ "value" : 5372,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_EXT_fragment_shader_interlock" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ShaderSMBuiltinsNV",
+ "value" : 5373,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_NV_shader_sm_builtins" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "FragmentShaderPixelInterlockEXT",
+ "value" : 5378,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_EXT_fragment_shader_interlock" ],
+ "version" : "None"
+ },
{
"enumerant" : "SubgroupShuffleINTEL",
"value" : 5568,
@@ -9292,104 +9451,6 @@
"value" : 5698,
"extensions" : [ "SPV_INTEL_device_side_avc_motion_estimation" ],
"version" : "None"
- },
- {
- "enumerant" : "GroupNonUniformPartitionedNV",
- "value" : 5297,
- "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ],
- "version" : "None"
- },
- {
- "enumerant" : "VulkanMemoryModelKHR",
- "value" : 5345,
- "extensions" : [ "SPV_KHR_vulkan_memory_model" ],
- "version" : "None"
- },
- {
- "enumerant" : "VulkanMemoryModelDeviceScopeKHR",
- "value" : 5346,
- "extensions" : [ "SPV_KHR_vulkan_memory_model" ],
- "version" : "None"
- },
- {
- "enumerant" : "ImageFootprintNV",
- "value" : 5282,
- "extensions" : [ "SPV_NV_shader_image_footprint" ],
- "version" : "None"
- },
- {
- "enumerant" : "FragmentBarycentricNV",
- "value" : 5284,
- "extensions" : [ "SPV_NV_fragment_shader_barycentric" ],
- "version" : "None"
- },
- {
- "enumerant" : "ComputeDerivativeGroupQuadsNV",
- "value" : 5288,
- "extensions" : [ "SPV_NV_compute_shader_derivatives" ],
- "version" : "None"
- },
- {
- "enumerant" : "ComputeDerivativeGroupLinearNV",
- "value" : 5350,
- "extensions" : [ "SPV_NV_compute_shader_derivatives" ],
- "version" : "None"
- },
- {
- "enumerant" : "FragmentDensityEXT",
- "value" : 5291,
- "capabilities" : [ "Shader" ],
- "extensions" : [ "SPV_EXT_fragment_invocation_density", "SPV_NV_shading_rate" ],
- "version" : "None"
- },
- {
- "enumerant" : "ShadingRateNV",
- "value" : 5291,
- "capabilities" : [ "Shader" ],
- "extensions" : [ "SPV_NV_shading_rate", "SPV_EXT_fragment_invocation_density" ],
- "version" : "None"
- },
- {
- "enumerant" : "PhysicalStorageBufferAddressesEXT",
- "value" : 5347,
- "capabilities" : [ "Shader" ],
- "extensions" : [ "SPV_EXT_physical_storage_buffer" ],
- "version" : "None"
- },
- {
- "enumerant" : "CooperativeMatrixNV",
- "value" : 5357,
- "capabilities" : [ "Shader" ],
- "extensions" : [ "SPV_NV_cooperative_matrix" ],
- "version" : "None"
- },
- {
- "enumerant" : "FragmentShaderSampleInterlockEXT",
- "value" : 5363,
- "capabilities" : [ "Shader" ],
- "extensions" : [ "SPV_EXT_fragment_shader_interlock" ],
- "version" : "None"
- },
- {
- "enumerant" : "FragmentShaderShadingRateInterlockEXT",
- "value" : 5372,
- "capabilities" : [ "Shader" ],
- "extensions" : [ "SPV_EXT_fragment_shader_interlock" ],
- "version" : "None"
- },
- {
- "enumerant" : "FragmentShaderPixelInterlockEXT",
- "value" : 5378,
- "capabilities" : [ "Shader" ],
- "extensions" : [ "SPV_EXT_fragment_shader_interlock" ],
- "version" : "None"
- },
- {
- "enumerant" : "ShaderSMBuiltinsNV",
- "value" : 5373,
- "capabilities" : [ "Shader" ],
- "extensions" : [ "SPV_NV_shader_sm_builtins" ],
- "version" : "None"
}
]
},
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spirv.cs b/3rdparty/spirv-headers/include/spirv/unified1/spirv.cs
index 24470e006..99e95e7ef 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spirv.cs
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spirv.cs
@@ -453,6 +453,7 @@ namespace Spv
HlslCounterBufferGOOGLE = 5634,
HlslSemanticGOOGLE = 5635,
UserSemantic = 5635,
+ UserTypeGOOGLE = 5636,
}
public enum BuiltIn
@@ -633,6 +634,7 @@ namespace Spv
OutputMemoryKHR = 12,
MakeAvailableKHR = 13,
MakeVisibleKHR = 14,
+ Volatile = 15,
}
public enum MemorySemanticsMask
@@ -651,6 +653,7 @@ namespace Spv
OutputMemoryKHR = 0x00001000,
MakeAvailableKHR = 0x00002000,
MakeVisibleKHR = 0x00004000,
+ Volatile = 0x00008000,
}
public enum MemoryAccessShift
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spirv.h b/3rdparty/spirv-headers/include/spirv/unified1/spirv.h
index 99b6fbb9e..67e3ae088 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spirv.h
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spirv.h
@@ -459,6 +459,7 @@ typedef enum SpvDecoration_ {
SpvDecorationHlslCounterBufferGOOGLE = 5634,
SpvDecorationHlslSemanticGOOGLE = 5635,
SpvDecorationUserSemantic = 5635,
+ SpvDecorationUserTypeGOOGLE = 5636,
SpvDecorationMax = 0x7fffffff,
} SpvDecoration;
@@ -636,6 +637,7 @@ typedef enum SpvMemorySemanticsShift_ {
SpvMemorySemanticsOutputMemoryKHRShift = 12,
SpvMemorySemanticsMakeAvailableKHRShift = 13,
SpvMemorySemanticsMakeVisibleKHRShift = 14,
+ SpvMemorySemanticsVolatileShift = 15,
SpvMemorySemanticsMax = 0x7fffffff,
} SpvMemorySemanticsShift;
@@ -654,6 +656,7 @@ typedef enum SpvMemorySemanticsMask_ {
SpvMemorySemanticsOutputMemoryKHRMask = 0x00001000,
SpvMemorySemanticsMakeAvailableKHRMask = 0x00002000,
SpvMemorySemanticsMakeVisibleKHRMask = 0x00004000,
+ SpvMemorySemanticsVolatileMask = 0x00008000,
} SpvMemorySemanticsMask;
typedef enum SpvMemoryAccessShift_ {
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp b/3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp
index 03ba767ca..d6dd5d617 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp
@@ -455,6 +455,7 @@ enum Decoration {
DecorationHlslCounterBufferGOOGLE = 5634,
DecorationHlslSemanticGOOGLE = 5635,
DecorationUserSemantic = 5635,
+ DecorationUserTypeGOOGLE = 5636,
DecorationMax = 0x7fffffff,
};
@@ -632,6 +633,7 @@ enum MemorySemanticsShift {
MemorySemanticsOutputMemoryKHRShift = 12,
MemorySemanticsMakeAvailableKHRShift = 13,
MemorySemanticsMakeVisibleKHRShift = 14,
+ MemorySemanticsVolatileShift = 15,
MemorySemanticsMax = 0x7fffffff,
};
@@ -650,6 +652,7 @@ enum MemorySemanticsMask {
MemorySemanticsOutputMemoryKHRMask = 0x00001000,
MemorySemanticsMakeAvailableKHRMask = 0x00002000,
MemorySemanticsMakeVisibleKHRMask = 0x00004000,
+ MemorySemanticsVolatileMask = 0x00008000,
};
enum MemoryAccessShift {
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp11 b/3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp11
index 8d53ed5da..ea82d53c8 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp11
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp11
@@ -455,6 +455,7 @@ enum class Decoration : unsigned {
HlslCounterBufferGOOGLE = 5634,
HlslSemanticGOOGLE = 5635,
UserSemantic = 5635,
+ UserTypeGOOGLE = 5636,
Max = 0x7fffffff,
};
@@ -632,6 +633,7 @@ enum class MemorySemanticsShift : unsigned {
OutputMemoryKHR = 12,
MakeAvailableKHR = 13,
MakeVisibleKHR = 14,
+ Volatile = 15,
Max = 0x7fffffff,
};
@@ -650,6 +652,7 @@ enum class MemorySemanticsMask : unsigned {
OutputMemoryKHR = 0x00001000,
MakeAvailableKHR = 0x00002000,
MakeVisibleKHR = 0x00004000,
+ Volatile = 0x00008000,
};
enum class MemoryAccessShift : unsigned {
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spirv.json b/3rdparty/spirv-headers/include/spirv/unified1/spirv.json
index ef73efbad..93d3de070 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spirv.json
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spirv.json
@@ -488,7 +488,8 @@
"CounterBuffer": 5634,
"HlslCounterBufferGOOGLE": 5634,
"HlslSemanticGOOGLE": 5635,
- "UserSemantic": 5635
+ "UserSemantic": 5635,
+ "UserTypeGOOGLE": 5636
}
},
{
@@ -653,7 +654,8 @@
"ImageMemory": 11,
"OutputMemoryKHR": 12,
"MakeAvailableKHR": 13,
- "MakeVisibleKHR": 14
+ "MakeVisibleKHR": 14,
+ "Volatile": 15
}
},
{
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spirv.lua b/3rdparty/spirv-headers/include/spirv/unified1/spirv.lua
index a03fa5d4c..b51e847bd 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spirv.lua
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spirv.lua
@@ -428,6 +428,7 @@ spv = {
HlslCounterBufferGOOGLE = 5634,
HlslSemanticGOOGLE = 5635,
UserSemantic = 5635,
+ UserTypeGOOGLE = 5636,
},
BuiltIn = {
@@ -600,6 +601,7 @@ spv = {
OutputMemoryKHR = 12,
MakeAvailableKHR = 13,
MakeVisibleKHR = 14,
+ Volatile = 15,
},
MemorySemanticsMask = {
@@ -617,6 +619,7 @@ spv = {
OutputMemoryKHR = 0x00001000,
MakeAvailableKHR = 0x00002000,
MakeVisibleKHR = 0x00004000,
+ Volatile = 0x00008000,
},
MemoryAccessShift = {
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spirv.py b/3rdparty/spirv-headers/include/spirv/unified1/spirv.py
index 5ef4e99b2..298c2c6ad 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spirv.py
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spirv.py
@@ -428,6 +428,7 @@ spv = {
'HlslCounterBufferGOOGLE' : 5634,
'HlslSemanticGOOGLE' : 5635,
'UserSemantic' : 5635,
+ 'UserTypeGOOGLE' : 5636,
},
'BuiltIn' : {
@@ -600,6 +601,7 @@ spv = {
'OutputMemoryKHR' : 12,
'MakeAvailableKHR' : 13,
'MakeVisibleKHR' : 14,
+ 'Volatile' : 15,
},
'MemorySemanticsMask' : {
@@ -617,6 +619,7 @@ spv = {
'OutputMemoryKHR' : 0x00001000,
'MakeAvailableKHR' : 0x00002000,
'MakeVisibleKHR' : 0x00004000,
+ 'Volatile' : 0x00008000,
},
'MemoryAccessShift' : {
diff --git a/3rdparty/spirv-headers/include/spirv/unified1/spv.d b/3rdparty/spirv-headers/include/spirv/unified1/spv.d
index bde15c350..b3a18ad85 100644
--- a/3rdparty/spirv-headers/include/spirv/unified1/spv.d
+++ b/3rdparty/spirv-headers/include/spirv/unified1/spv.d
@@ -456,6 +456,7 @@ enum Decoration : uint
HlslCounterBufferGOOGLE = 5634,
HlslSemanticGOOGLE = 5635,
UserSemantic = 5635,
+ UserTypeGOOGLE = 5636,
}
enum BuiltIn : uint
@@ -636,6 +637,7 @@ enum MemorySemanticsShift : uint
OutputMemoryKHR = 12,
MakeAvailableKHR = 13,
MakeVisibleKHR = 14,
+ Volatile = 15,
}
enum MemorySemanticsMask : uint
@@ -654,6 +656,7 @@ enum MemorySemanticsMask : uint
OutputMemoryKHR = 0x00001000,
MakeAvailableKHR = 0x00002000,
MakeVisibleKHR = 0x00004000,
+ Volatile = 0x00008000,
}
enum MemoryAccessShift : uint
diff --git a/3rdparty/spirv-headers/tools/buildHeaders/CMakeLists.txt b/3rdparty/spirv-headers/tools/buildHeaders/CMakeLists.txt
deleted file mode 100644
index c6241510e..000000000
--- a/3rdparty/spirv-headers/tools/buildHeaders/CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix" FORCE)
-
-project(buildSpvHeaders)
-
-set(SOURCES
- main.cpp
- jsonToSpirv.cpp
- header.cpp
- jsoncpp/dist/jsoncpp.cpp)
-
-set(HEADERS
- jsonToSpirv.h
- header.h
- jsoncpp/dist/json/json.h)
-
-if(CMAKE_COMPILER_IS_GNUCXX)
- add_definitions(-std=c++11)
-elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- add_definitions(-std=c++11)
-endif()
-
-add_executable(buildSpvHeaders ${SOURCES} ${HEADERS})
-
-install(TARGETS buildSpvHeaders RUNTIME DESTINATION bin)
diff --git a/3rdparty/spirv-headers/tools/buildHeaders/bin/makeHeaders b/3rdparty/spirv-headers/tools/buildHeaders/bin/makeHeaders
deleted file mode 100755
index 47d221864..000000000
--- a/3rdparty/spirv-headers/tools/buildHeaders/bin/makeHeaders
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-cd ../../include/spirv/unified1
-../../../tools/buildHeaders/build/install/bin/buildSpvHeaders -H spirv.core.grammar.json
-dos2unix spirv.* SpirV.* spv.*
diff --git a/3rdparty/spirv-headers/tools/buildHeaders/header.cpp b/3rdparty/spirv-headers/tools/buildHeaders/header.cpp
deleted file mode 100644
index e1e05d037..000000000
--- a/3rdparty/spirv-headers/tools/buildHeaders/header.cpp
+++ /dev/null
@@ -1,835 +0,0 @@
-// Copyright (c) 2014-2019 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.
-
-//
-// Print headers for SPIR-V in several languages.
-//
-// To change the header information, change the C++-built database in doc.*.
-//
-// Then, use "spriv -h " - e.g, spriv.{h,hpp,lua,py,etc}:
-// replace the auto-generated header, or "spirv -H" to generate all
-// supported language headers to predefined names in the current directory.
-//
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "jsoncpp/dist/json/json.h"
-
-#include "header.h"
-#include "jsonToSpirv.h"
-
-// snprintf and _snprintf are not quite the same, but close enough
-// for our use.
-#ifdef _MSC_VER
-#pragma warning(disable:4996)
-#define snprintf _snprintf
-#endif
-
-// This file converts SPIR-V definitions to an internal JSON
-// representation, and then generates language specific
-// data from that single internal form.
-
-// Initially, the internal form is created from C++ data,
-// though this can be changed to a JSON master in time.
-
-namespace {
- class TPrinter {
- protected:
- TPrinter();
-
- static const int DocMagicNumber = 0x07230203;
- static const int DocVersion = 0x00010400;
- static const int DocRevision = 1;
- #define DocRevisionString "1"
- static const std::string DocCopyright;
- static const std::string DocComment1;
- static const std::string DocComment2;
-
- enum enumStyle_t {
- enumNoMask,
- enumCount,
- enumShift,
- enumMask,
- enumHex,
- };
-
- static std::string styleStr(enumStyle_t s) {
- return s == enumShift ? "Shift" :
- s == enumMask ? "Mask" : "";
- }
-
- friend std::ostream& operator<<(std::ostream&, const TPrinter&);
-
- virtual void printAll(std::ostream&) const;
- virtual void printComments(std::ostream&) const;
- virtual void printPrologue(std::ostream&) const { }
- virtual void printDefs(std::ostream&) const;
- virtual void printEpilogue(std::ostream&) const { }
- virtual void printMeta(std::ostream&) const;
- virtual void printTypes(std::ostream&) const { }
- virtual void printHasResultType(std::ostream&) const { };
-
- virtual std::string escapeComment(const std::string& s) const;
-
- // Default printComments() uses these comment strings
- virtual std::string commentBeg() const { return ""; }
- virtual std::string commentEnd(bool isLast) const { return ""; }
- virtual std::string commentBOL() const { return ""; }
- virtual std::string commentEOL(bool isLast) const { return ""; }
-
- typedef std::pair valpair_t;
-
- // for printing enum values
- virtual std::string enumBeg(const std::string&, enumStyle_t) const { return ""; }
- virtual std::string enumEnd(const std::string&, enumStyle_t, bool isLast = false) const {
- return "";
- }
- virtual std::string enumFmt(const std::string&, const valpair_t&,
- enumStyle_t, bool isLast = false) const {
- return "";
- }
- virtual std::string maxEnumFmt(const std::string&, const valpair_t&,
- enumStyle_t) const {
- return "";
- }
-
- virtual std::string fmtConstInt(unsigned val, const std::string& name,
- const char* fmt, bool isLast = false) const {
- return "";
- }
-
- std::vector getSortedVals(const Json::Value&) const;
-
- virtual std::string indent(int count = 1) const {
- return std::string(count * 4, ' '); // default indent level = 4
- }
-
- static std::string fmtNum(const char* fmt, unsigned val) {
- char buff[16]; // ample for 8 hex digits + 0x
- snprintf(buff, sizeof(buff), fmt, val);
- buff[sizeof(buff)-1] = '\0'; // MSVC doesn't promise null termination
- return buff;
- }
-
- static std::string fmtStyleVal(unsigned v, enumStyle_t style);
-
- // If the enum value name would start with a sigit, prepend the enum name.
- // E.g, "3D" -> "Dim3D".
- static std::string prependIfDigit(const std::string& ename, const std::string& vname) {
- return (std::isdigit(vname[0]) ? ename : std::string("")) + vname;
- }
-
- void addComment(Json::Value& node, const std::string& str);
-
- Json::Value spvRoot; // JSON SPIR-V data
- };
-
- // Format value as mask or value
- std::string TPrinter::fmtStyleVal(unsigned v, enumStyle_t style)
- {
- switch (style) {
- case enumMask:
- return fmtNum("0x%08x", 1<
- TPrinter::getSortedVals(const Json::Value& p) const
- {
- std::vector values;
-
- for (auto e = p.begin(); e != p.end(); ++e)
- values.push_back(valpair_t(e->asUInt(), e.name()));
-
- // Use a stable sort because we might have aliases, e.g.
- // SubgropuBallot (might be in future core) vs. SubgroupBallotKHR.
- std::stable_sort(values.begin(), values.end());
-
- return values;
- }
-
- // Escape comment characters if needed
- std::string TPrinter::escapeComment(const std::string& s) const { return s; }
-
- // Format comments in language specific way
- void TPrinter::printComments(std::ostream& out) const
- {
- const int commentCount = spvRoot["spv"]["meta"]["Comment"].size();
- int commentNum = 0;
-
- for (const auto& comment : spvRoot["spv"]["meta"]["Comment"]) {
- out << commentBeg();
-
- for (int line = 0; line < int(comment.size()); ++line)
- out << commentBOL() << escapeComment(comment[line].asString()) <<
- commentEOL((line+1) == comment.size()) << std::endl;
-
- out << commentEnd(++commentNum == commentCount) << std::endl;
- }
- }
-
- // Format header metadata
- void TPrinter::printMeta(std::ostream& out) const
- {
- const Json::Value& meta = spvRoot["spv"]["meta"];
-
- const auto print = [&](const char* name, const char* fmt, bool isLast) {
- out << fmtConstInt(meta[name].asUInt(), name, fmt, isLast);
- };
-
- print("MagicNumber", "0x%08lx", false);
- print("Version", "0x%08lx", false);
- print("Revision", "%d", false);
- print("OpCodeMask", "0x%04x", false);
- print("WordCountShift", "%d", true);
- }
-
- // Format value definitions in language specific way
- void TPrinter::printDefs(std::ostream& out) const
- {
- const Json::Value& enums = spvRoot["spv"]["enum"];
-
- for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) {
- const bool isMask = (*opClass)["Type"].asString() == "Bit";
- const auto opName = (*opClass)["Name"].asString();
- const auto opPrefix = opName == "Op" ? "" : opName;
-
- for (enumStyle_t style = (isMask ? enumShift : enumCount);
- style <= (isMask ? enumMask : enumCount); style = enumStyle_t(int(style)+1)) {
-
- out << enumBeg(opName, style);
-
- if (style == enumMask)
- out << enumFmt(opPrefix, valpair_t(0, "MaskNone"), enumNoMask);
-
- const auto sorted = getSortedVals((*opClass)["Values"]);
-
- std::string maxEnum = maxEnumFmt(opName, valpair_t(0x7FFFFFFF, "Max"), enumHex);
-
- bool printMax = (style != enumMask && maxEnum.size() > 0);
-
- for (const auto& v : sorted)
- out << enumFmt(opPrefix, v, style, !printMax && v.second == sorted.back().second);
-
- if (printMax)
- out << maxEnum;
-
- auto nextOpClass = opClass;
- out << enumEnd(opName, style, ++nextOpClass == enums.end());
- }
- }
- }
-
- void TPrinter::printAll(std::ostream& out) const
- {
- printComments(out);
- printPrologue(out);
- printTypes(out);
- printMeta(out);
- printDefs(out);
- printHasResultType(out);
- printEpilogue(out);
- }
-
- // Stream entire header to output
- std::ostream& operator<<(std::ostream& out, const TPrinter &p)
- {
- p.printAll(out);
- return out;
- }
-
- // JSON printer. Rather than use the default printer, we supply our own so
- // we can control the printing order within various containers.
- class TPrinterJSON final : public TPrinter {
- private:
- void printPrologue(std::ostream& out) const override { out << "{\n" + indent() + "\"spv\":\n" + indent() + "{\n"; }
- void printEpilogue(std::ostream& out) const override { out << indent() + "}\n}\n"; }
-
- std::string escapeComment(const std::string& s) const override {
- std::string newStr;
- for (auto c : s) {
- if (c == '"') {
- newStr += '\\';
- newStr += c;
- } else {
- newStr += c;
- }
- }
- return newStr;
- }
-
- std::string fmtConstInt(unsigned val, const std::string& name,
- const char* fmt, bool isLast) const override {
- return indent(3) + '"' + name + "\": " + fmtNum("%d", val) + (isLast ? "\n" : ",\n");
- }
-
- void printMeta(std::ostream& out) const override
- {
- out << indent(2) + "\"meta\":\n" + indent(2) + "{\n";
- printComments(out);
- TPrinter::printMeta(out);
- out << indent(2) + "},\n";
- }
-
- std::string commentBeg() const override { return indent(4) + "[\n"; }
- std::string commentEnd(bool isLast) const override { return indent(4) + (isLast ? "]" : "],"); }
- std::string commentBOL() const override { return indent(5) + '"'; }
- std::string commentEOL(bool isLast) const override { return (isLast ? "\"" : "\","); }
-
- void printComments(std::ostream& out) const override
- {
- out << indent(3) + "\"Comment\":\n" + indent(3) + "[\n";
- TPrinter::printComments(out);
- out << indent(3) + "],\n";
- }
-
- void printDefs(std::ostream& out) const override
- {
- out << indent(2) + "\"enum\":\n" + indent(2) + "[\n";
- TPrinter::printDefs(out);
- out << indent(2) + "]\n";
- }
-
- void printAll(std::ostream& out) const override
- {
- printPrologue(out);
- printMeta(out);
- printDefs(out);
- printEpilogue(out);
- }
-
- std::string enumBeg(const std::string& s, enumStyle_t style) const override {
- if (style == enumMask)
- return "";
- return indent(3) + "{\n" +
- indent(4) + "\"Name\": \"" + s + "\",\n" +
- indent(4) + "\"Type\": " + (style == enumShift ? "\"Bit\"" : "\"Value\"") + ",\n" +
- indent(4) + "\"Values\":\n" +
- indent(4) + "{\n";
- }
-
- std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
- if (style == enumMask)
- return "";
- return indent(4) + "}\n" +
- indent(3) + "}" + (isLast ? "" : ",") + "\n";
- }
-
- std::string enumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style, bool isLast) const override {
- if (style == enumMask || style == enumNoMask)
- return "";
- return indent(5) + '"' + prependIfDigit(s, v.second) + "\": " + fmtNum("%d", v.first) +
- (isLast ? "\n" : ",\n");
- }
- };
-
- // base for C and C++
- class TPrinterCBase : public TPrinter {
- protected:
- virtual void printPrologue(std::ostream& out) const override {
- out << "#ifndef spirv_" << headerGuardSuffix() << std::endl
- << "#define spirv_" << headerGuardSuffix() << std::endl
- << std::endl;
- }
-
- void printMeta(std::ostream& out) const override {
- out << "#define SPV_VERSION 0x" << std::hex << DocVersion << std::dec << "\n";
- out << "#define SPV_REVISION " << DocRevision << "\n";
- out << "\n";
-
- return TPrinter::printMeta(out);
- }
-
- virtual void printEpilogue(std::ostream& out) const override {
- out << "#endif" << std::endl;
- }
-
- virtual void printTypes(std::ostream& out) const override {
- out << "typedef unsigned int " << pre() << "Id;\n\n";
- }
-
- virtual std::string fmtConstInt(unsigned val, const std::string& name,
- const char* fmt, bool isLast) const override
- {
- return std::string("static const unsigned int ") + pre() + name +
- " = " + fmtNum(fmt, val) + (isLast ? ";\n\n" : ";\n");
- }
-
- virtual std::string pre() const { return ""; } // C name prefix
- virtual std::string headerGuardSuffix() const = 0;
-
- virtual std::string fmtEnumUse(const std::string& opPrefix, const std::string& name) const { return pre() + name; }
-
- virtual void printHasResultType(std::ostream& out) const
- {
- const Json::Value& enums = spvRoot["spv"]["enum"];
-
- std::set seenValues;
-
- for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) {
- const auto opName = (*opClass)["Name"].asString();
- if (opName != "Op") {
- continue;
- }
-
- out << "#ifdef SPV_ENABLE_UTILITY_CODE" << std::endl;
- out << "inline void " << pre() << "HasResultAndType(" << pre() << opName << " opcode, bool *hasResult, bool *hasResultType) {" << std::endl;
- out << " *hasResult = *hasResultType = false;" << std::endl;
- out << " switch (opcode) {" << std::endl;
- out << " default: /* unknown opcode */ break;" << std::endl;
-
- for (auto& inst : spv::InstructionDesc) {
-
- // Filter out duplicate enum values, which would break the switch statement.
- // These are probably just extension enums promoted to core.
- if (seenValues.find(inst.value) != seenValues.end()) {
- continue;
- }
- seenValues.insert(inst.value);
-
- std::string name = inst.name;
- out << " case " << fmtEnumUse("Op", name) << ": *hasResult = " << (inst.hasResult() ? "true" : "false") << "; *hasResultType = " << (inst.hasType() ? "true" : "false") << "; break;" << std::endl;
- }
-
- out << " }" << std::endl;
- out << "}" << std::endl;
- out << "#endif /* SPV_ENABLE_UTILITY_CODE */" << std::endl << std::endl;
- }
- }
- };
-
- // C printer
- class TPrinterC final : public TPrinterCBase {
- private:
- std::string commentBeg() const override { return "/*\n"; }
- std::string commentEnd(bool isLast) const override { return "*/\n"; }
- std::string commentBOL() const override { return "** "; }
-
- std::string enumBeg(const std::string& s, enumStyle_t style) const override {
- return std::string("typedef enum ") + pre() + s + styleStr(style) + "_ {\n";
- }
-
- std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
- return "} " + pre() + s + styleStr(style) + ";\n\n";
- }
-
- std::string enumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style, bool isLast) const override {
- return indent() + pre() + s + v.second + styleStr(style) + " = " + fmtStyleVal(v.first, style) + ",\n";
- }
-
- std::string maxEnumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style) const override {
- return enumFmt(s, v, style, true);
- }
-
- std::string pre() const override { return "Spv"; } // C name prefix
- std::string headerGuardSuffix() const override { return "H"; }
- };
-
- // C++ printer
- class TPrinterCPP : public TPrinterCBase {
- private:
- void printPrologue(std::ostream& out) const override {
- TPrinterCBase::printPrologue(out);
- out << "namespace spv {\n\n";
- }
-
- void printEpilogue(std::ostream& out) const override {
- const Json::Value& enums = spvRoot["spv"]["enum"];
-
- // Create overloaded operator| for mask types
- out << "// Overload operator| for mask bit combining\n\n";
-
- for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) {
- const bool isMask = (*opClass)["Type"].asString() == "Bit";
- const auto opName = (*opClass)["Name"].asString();
-
- if (isMask) {
- const auto typeName = opName + styleStr(enumMask);
-
- out << "inline " + typeName + " operator|(" + typeName + " a, " + typeName + " b) { return " +
- typeName + "(unsigned(a) | unsigned(b)); }\n";
- }
- }
-
- out << "\n} // end namespace spv\n\n";
- out << "#endif // #ifndef spirv_" << headerGuardSuffix() << std::endl;
- }
-
- std::string commentBOL() const override { return "// "; }
-
-
- virtual std::string enumBeg(const std::string& s, enumStyle_t style) const override {
- return std::string("enum ") + s + styleStr(style) + " {\n";
- }
-
- std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
- return "};\n\n";
- }
-
- virtual std::string enumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style, bool isLast) const override {
- return indent() + s + v.second + styleStr(style) + " = " + fmtStyleVal(v.first, style) + ",\n";
- }
-
- virtual std::string maxEnumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style) const override {
- return enumFmt(s, v, style, true);
- }
-
- // The C++ and C++11 headers define types with the same name. So they
- // should use the same header guard.
- std::string headerGuardSuffix() const override { return "HPP"; }
-
- std::string operators;
- };
-
- // C++11 printer (uses enum classes)
- class TPrinterCPP11 final : public TPrinterCPP {
- private:
- std::string enumBeg(const std::string& s, enumStyle_t style) const override {
- return std::string("enum class ") + s + styleStr(style) + " : unsigned {\n";
- }
-
- std::string enumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style, bool isLast) const override {
- return indent() + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
- }
-
- std::string maxEnumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style) const override {
- return enumFmt(s, v, style, true);
- }
-
- // Add type prefix for scoped enum
- virtual std::string fmtEnumUse(const std::string& opPrefix, const std::string& name) const { return opPrefix + "::" + name; }
-
- std::string headerGuardSuffix() const override { return "HPP"; }
- };
-
- // LUA printer
- class TPrinterLua final : public TPrinter {
- private:
- void printPrologue(std::ostream& out) const override { out << "spv = {\n"; }
-
- void printEpilogue(std::ostream& out) const override { out << "}\n"; }
-
- std::string commentBOL() const override { return "-- "; }
-
- std::string enumBeg(const std::string& s, enumStyle_t style) const override {
- return indent() + s + styleStr(style) + " = {\n";
- }
-
- std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
- return indent() + "},\n\n";
- }
-
- std::string enumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style, bool isLast) const override {
- return indent(2) + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
- }
-
- virtual std::string fmtConstInt(unsigned val, const std::string& name,
- const char* fmt, bool isLast) const override
- {
- return indent() + name + " = " + fmtNum(fmt, val) + (isLast ? ",\n\n" : ",\n");
- }
- };
-
- // Python printer
- class TPrinterPython final : public TPrinter {
- private:
- void printPrologue(std::ostream& out) const override { out << "spv = {\n"; }
-
- void printEpilogue(std::ostream& out) const override { out << "}\n"; }
-
- std::string commentBOL() const override { return "# "; }
-
- std::string enumBeg(const std::string& s, enumStyle_t style) const override {
- return indent() + "'" + s + styleStr(style) + "'" + " : {\n";
- }
-
- std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
- return indent() + "},\n\n";
- }
-
- std::string enumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style, bool isLast) const override {
- return indent(2) + "'" + prependIfDigit(s, v.second) + "'" + " : " + fmtStyleVal(v.first, style) + ",\n";
- }
-
- std::string fmtConstInt(unsigned val, const std::string& name,
- const char* fmt, bool isLast) const override
- {
- return indent() + "'" + name + "'" + " : " + fmtNum(fmt, val) + (isLast ? ",\n\n" : ",\n");
- }
- };
-
- // C# printer
- class TPrinterCSharp final : public TPrinter {
- private:
- std::string commentBOL() const override { return "// "; }
-
- void printPrologue(std::ostream& out) const override {
- out << "namespace Spv\n{\n\n";
- out << indent() << "public static class Specification\n";
- out << indent() << "{\n";
- }
-
- void printEpilogue(std::ostream& out) const override {
- out << indent() << "}\n";
- out << "}\n";
- }
-
- std::string enumBeg(const std::string& s, enumStyle_t style) const override {
- return indent(2) + "public enum " + s + styleStr(style) + "\n" + indent(2) + "{\n";
- }
-
- std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
- return indent(2) + "}" + + (isLast ? "\n" : "\n\n");
- }
-
- std::string enumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style, bool isLast) const override {
- return indent(3) + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
- }
-
- std::string fmtConstInt(unsigned val, const std::string& name,
- const char* fmt, bool isLast) const override {
- return indent(2) + std::string("public const uint ") + name +
- " = " + fmtNum(fmt, val) + (isLast ? ";\n\n" : ";\n");
- }
- };
-
- // D printer
- class TPrinterD final : public TPrinter {
- private:
- std::string commentBeg() const override { return "/+\n"; }
- std::string commentBOL() const override { return " + "; }
- std::string commentEnd(bool isLast) const override { return " +/\n"; }
-
- void printPrologue(std::ostream& out) const override {
- out << "module spv;\n\n";
- }
-
- void printEpilogue(std::ostream& out) const override {
- }
-
- std::string enumBeg(const std::string& s, enumStyle_t style) const override {
- return "enum " + s + styleStr(style) + " : uint\n{\n";
- }
-
- std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
- return std::string("}\n\n");
- }
-
- std::string enumFmt(const std::string& s, const valpair_t& v,
- enumStyle_t style, bool isLast) const override {
- return indent() + prependIfDigit("_", v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
- }
-
- std::string fmtConstInt(unsigned val, const std::string& name,
- const char* fmt, bool isLast) const override {
- return std::string("enum uint ") + name +
- " = " + fmtNum(fmt, val) + (isLast ? ";\n\n" : ";\n");
- }
- };
-
-} // namespace
-
-namespace spv {
- void PrintAllHeaders()
- {
- // TODO: Once MSVC 2012 is no longer a factor, use brace initializers here
- std::vector> langInfo;
-
- langInfo.push_back(std::make_pair(ELangC, "spirv.h"));
- langInfo.push_back(std::make_pair(ELangCPP, "spirv.hpp"));
- langInfo.push_back(std::make_pair(ELangCPP11, "spirv.hpp11"));
- langInfo.push_back(std::make_pair(ELangJSON, "spirv.json"));
- langInfo.push_back(std::make_pair(ELangLua, "spirv.lua"));
- langInfo.push_back(std::make_pair(ELangPython, "spirv.py"));
- langInfo.push_back(std::make_pair(ELangCSharp, "spirv.cs"));
- langInfo.push_back(std::make_pair(ELangD, "spv.d"));
-
- for (const auto& lang : langInfo) {
- std::ofstream out(lang.second, std::ios::out);
-
- if ((out.rdstate() & std::ifstream::failbit)) {
- std::cerr << "Unable to open file: " << lang.second << std::endl;
- } else {
- PrintHeader(lang.first, out);
- }
- }
- }
-
- // Print header for given language to given output stream
- void PrintHeader(TLanguage lang, std::ostream& out)
- {
- typedef std::unique_ptr TPrinterPtr;
- TPrinterPtr p;
-
- switch (lang) {
- case ELangC: p = TPrinterPtr(new TPrinterC); break;
- case ELangCPP: p = TPrinterPtr(new TPrinterCPP); break;
- case ELangCPP11: p = TPrinterPtr(new TPrinterCPP11); break;
- case ELangJSON: p = TPrinterPtr(new TPrinterJSON); break;
- case ELangLua: p = TPrinterPtr(new TPrinterLua); break;
- case ELangPython: p = TPrinterPtr(new TPrinterPython); break;
- case ELangCSharp: p = TPrinterPtr(new TPrinterCSharp); break;
- case ELangD: p = TPrinterPtr(new TPrinterD); break;
- case ELangAll: PrintAllHeaders(); break;
- default:
- std::cerr << "Unknown language." << std::endl;
- return;
- }
-
- // Print the data in the requested format
- if (p)
- out << *p << std::endl;
-
- // object is auto-deleted
- }
-
-} // namespace spv
diff --git a/3rdparty/spirv-headers/tools/buildHeaders/header.h b/3rdparty/spirv-headers/tools/buildHeaders/header.h
deleted file mode 100644
index 9c34b2112..000000000
--- a/3rdparty/spirv-headers/tools/buildHeaders/header.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2014-2019 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.
-
-//
-// Print headers for SPIR-V in several languages.
-//
-
-#pragma once
-#ifndef header
-#define header
-
-#include
-
-namespace spv {
- // Languages supported
- enum TLanguage {
- ELangC, // C
- ELangCPP, // C++03
- ELangCPP11, // C++11
- ELangJSON, // JSON
- ELangLua, // Lua
- ELangPython, // Python
- ELangCSharp, // CSharp
- ELangD, // D
-
- ELangAll, // print headers in all languages to files
- };
-
- // Generate header for requested language
- void PrintHeader(TLanguage, std::ostream&);
-} // namespace spv
-
-#endif // header
diff --git a/3rdparty/spirv-headers/tools/buildHeaders/jsonToSpirv.cpp b/3rdparty/spirv-headers/tools/buildHeaders/jsonToSpirv.cpp
deleted file mode 100644
index e6cab4895..000000000
--- a/3rdparty/spirv-headers/tools/buildHeaders/jsonToSpirv.cpp
+++ /dev/null
@@ -1,454 +0,0 @@
-// Copyright (c) 2014-2019 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.
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "jsoncpp/dist/json/json.h"
-
-#include "jsonToSpirv.h"
-
-namespace spv {
-
-// The set of objects that hold all the instruction/operand
-// parameterization information.
-InstructionValues InstructionDesc;
-
-// Note: There is no entry for OperandOpcode. Use InstructionDesc instead.
-EnumDefinition OperandClassParams[OperandOpcode];
-EnumValues SourceLanguageParams;
-EnumValues ExecutionModelParams;
-EnumValues AddressingParams;
-EnumValues MemoryParams;
-EnumValues ExecutionModeParams;
-EnumValues StorageParams;
-EnumValues SamplerAddressingModeParams;
-EnumValues SamplerFilterModeParams;
-EnumValues ImageFormatParams;
-EnumValues ImageChannelOrderParams;
-EnumValues ImageChannelDataTypeParams;
-EnumValues ImageOperandsParams;
-EnumValues FPFastMathParams;
-EnumValues FPRoundingModeParams;
-EnumValues LinkageTypeParams;
-EnumValues DecorationParams;
-EnumValues BuiltInParams;
-EnumValues DimensionalityParams;
-EnumValues FuncParamAttrParams;
-EnumValues AccessQualifierParams;
-EnumValues GroupOperationParams;
-EnumValues LoopControlParams;
-EnumValues SelectionControlParams;
-EnumValues FunctionControlParams;
-EnumValues MemorySemanticsParams;
-EnumValues MemoryAccessParams;
-EnumValues ScopeParams;
-EnumValues KernelEnqueueFlagsParams;
-EnumValues KernelProfilingInfoParams;
-EnumValues CapabilityParams;
-
-std::pair ReadFile(const std::string& path)
-{
- std::ifstream fstream(path, std::ios::in);
- if (fstream) {
- std::string contents;
- fstream.seekg(0, std::ios::end);
- contents.reserve((unsigned int)fstream.tellg());
- fstream.seekg(0, std::ios::beg);
- contents.assign((std::istreambuf_iterator(fstream)),
- std::istreambuf_iterator());
- return std::make_pair(true, contents);
- }
- return std::make_pair(false, "");
-}
-
-struct ClassOptionality {
- OperandClass type;
- bool optional;
-};
-
-// Converts the |operandKind| and |quantifier| pair used to describe operands
-// in the JSON grammar to OperandClass and optionality used in this repo.
-ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, const std::string& quantifier)
-{
- assert(quantifier.empty() || quantifier == "?" || quantifier == "*");
-
- if (operandKind == "IdRef") {
- if (quantifier.empty())
- return {OperandId, false};
- else if (quantifier == "?")
- return {OperandId, true};
- else
- return {OperandVariableIds, false};
- } else if (operandKind == "LiteralInteger") {
- if (quantifier.empty())
- return {OperandLiteralNumber, false};
- if (quantifier == "?")
- return {OperandOptionalLiteral, true};
- else
- return {OperandVariableLiterals, false};
- } else if (operandKind == "LiteralString") {
- if (quantifier.empty())
- return {OperandLiteralString, false};
- else if (quantifier == "?")
- return {OperandLiteralString, true};
- else {
- return {OperandOptionalLiteralStrings, false};
- }
- } else if (operandKind == "PairLiteralIntegerIdRef") {
- // Used by OpSwitch in the grammar
- return {OperandVariableLiteralId, false};
- } else if (operandKind == "PairIdRefLiteralInteger") {
- // Used by OpGroupMemberDecorate in the grammar
- return {OperandVariableIdLiteral, false};
- } else if (operandKind == "PairIdRefIdRef") {
- // Used by OpPhi in the grammar
- return {OperandVariableIds, false};
- } else {
- OperandClass type = OperandNone;
- if (operandKind == "IdMemorySemantics" || operandKind == "MemorySemantics") {
- type = OperandMemorySemantics;
- } else if (operandKind == "IdScope" || operandKind == "Scope") {
- type = OperandScope;
- } else if (operandKind == "LiteralExtInstInteger") {
- type = OperandLiteralNumber;
- } else if (operandKind == "LiteralSpecConstantOpInteger") {
- type = OperandLiteralNumber;
- } else if (operandKind == "LiteralContextDependentNumber") {
- type = OperandVariableLiterals;
- } else if (operandKind == "SourceLanguage") {
- type = OperandSource;
- } else if (operandKind == "ExecutionModel") {
- type = OperandExecutionModel;
- } else if (operandKind == "AddressingModel") {
- type = OperandAddressing;
- } else if (operandKind == "MemoryModel") {
- type = OperandMemory;
- } else if (operandKind == "ExecutionMode") {
- type = OperandExecutionMode;
- } else if (operandKind == "StorageClass") {
- type = OperandStorage;
- } else if (operandKind == "Dim") {
- type = OperandDimensionality;
- } else if (operandKind == "SamplerAddressingMode") {
- type = OperandSamplerAddressingMode;
- } else if (operandKind == "SamplerFilterMode") {
- type = OperandSamplerFilterMode;
- } else if (operandKind == "ImageFormat") {
- type = OperandSamplerImageFormat;
- } else if (operandKind == "ImageChannelOrder") {
- type = OperandImageChannelOrder;
- } else if (operandKind == "ImageChannelDataType") {
- type = OperandImageChannelDataType;
- } else if (operandKind == "FPRoundingMode") {
- type = OperandFPRoundingMode;
- } else if (operandKind == "LinkageType") {
- type = OperandLinkageType;
- } else if (operandKind == "AccessQualifier") {
- type = OperandAccessQualifier;
- } else if (operandKind == "FunctionParameterAttribute") {
- type = OperandFuncParamAttr;
- } else if (operandKind == "Decoration") {
- type = OperandDecoration;
- } else if (operandKind == "BuiltIn") {
- type = OperandBuiltIn;
- } else if (operandKind == "GroupOperation") {
- type = OperandGroupOperation;
- } else if (operandKind == "KernelEnqueueFlags") {
- type = OperandKernelEnqueueFlags;
- } else if (operandKind == "KernelProfilingInfo") {
- type = OperandKernelProfilingInfo;
- } else if (operandKind == "Capability") {
- type = OperandCapability;
- } else if (operandKind == "ImageOperands") {
- type = OperandImageOperands;
- } else if (operandKind == "FPFastMathMode") {
- type = OperandFPFastMath;
- } else if (operandKind == "SelectionControl") {
- type = OperandSelect;
- } else if (operandKind == "LoopControl") {
- type = OperandLoop;
- } else if (operandKind == "FunctionControl") {
- type = OperandFunction;
- } else if (operandKind == "MemoryAccess") {
- type = OperandMemoryOperands;
- }
-
- if (type == OperandNone) {
- std::cerr << "Unhandled operand kind found: " << operandKind << std::endl;
- exit(1);
- }
- return {type, !quantifier.empty()};
- }
-}
-
-bool IsTypeOrResultId(const std::string& str, bool* isType, bool* isResult)
-{
- if (str == "IdResultType")
- return *isType = true;
- if (str == "IdResult")
- return *isResult = true;
- return false;
-}
-
-// Given a number string, returns the position of the only bits set in the number.
-// So it requires the number is a power of two.
-unsigned int NumberStringToBit(const std::string& str)
-{
- char* parseEnd;
- unsigned int value = (unsigned int)std::strtol(str.c_str(), &parseEnd, 16);
- assert(!(value & (value - 1)) && "input number is not a power of 2");
- unsigned int bit = 0;
- for (; value; value >>= 1) ++bit;
- return bit;
-}
-
-bool ExcludeInstruction(unsigned op, bool buildingHeaders)
-{
- // Some instructions in the grammar don't need to be reflected
- // in the specification.
-
- if (buildingHeaders)
- return false;
-
- if (op >= 5699 /* OpVmeImageINTEL */ && op <= 5816 /* OpSubgroupAvcSicGetInterRawSadsINTEL */)
- return true;
-
- return false;
-}
-
-void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
-{
- // only do this once.
- static bool initialized = false;
- if (initialized)
- return;
- initialized = true;
-
- // Read the JSON grammar file.
- bool fileReadOk = false;
- std::string content;
- std::tie(fileReadOk, content) = ReadFile(jsonPath);
- if (!fileReadOk) {
- std::cerr << "Failed to read JSON grammar file: "
- << jsonPath << std::endl;
- exit(1);
- }
-
- // Decode the JSON grammar file.
- Json::Reader reader;
- Json::Value root;
- if (!reader.parse(content, root)) {
- std::cerr << "Failed to parse JSON grammar:\n"
- << reader.getFormattedErrorMessages();
- exit(1);
- }
-
- // Layouts for all instructions.
-
- // A lambda for returning capabilities from a JSON object as strings.
- const auto getCaps = [](const Json::Value& object) {
- EnumCaps result;
- const auto& caps = object["capabilities"];
- if (!caps.empty()) {
- assert(caps.isArray());
- for (const auto& cap : caps) {
- result.emplace_back(cap.asString());
- }
- }
- return result;
- };
-
- // A lambda for returning extensions from a JSON object as strings.
- const auto getExts = [](const Json::Value& object) {
- Extensions result;
- const auto& exts = object["extensions"];
- if (!exts.empty()) {
- assert(exts.isArray());
- for (const auto& ext : exts) {
- result.emplace_back(ext.asString());
- }
- }
- return result;
- };
-
- const Json::Value insts = root["instructions"];
- for (const auto& inst : insts) {
- const unsigned int opcode = inst["opcode"].asUInt();
- if (ExcludeInstruction(opcode, buildingHeaders))
- continue;
- const std::string name = inst["opname"].asString();
- EnumCaps caps = getCaps(inst);
- std::string version = inst["version"].asString();
- std::string lastVersion = inst["lastVersion"].asString();
- Extensions exts = getExts(inst);
- OperandParameters operands;
- bool defResultId = false;
- bool defTypeId = false;
- for (const auto& operand : inst["operands"]) {
- const std::string kind = operand["kind"].asString();
- const std::string quantifier = operand.get("quantifier", "").asString();
- const std::string doc = operand.get("name", "").asString();
- if (!IsTypeOrResultId(kind, &defTypeId, &defResultId)) {
- const auto p = ToOperandClassAndOptionality(kind, quantifier);
- operands.push(p.type, doc, p.optional);
- }
- }
- InstructionDesc.emplace_back(
- std::move(EnumValue(opcode, name,
- std::move(caps), std::move(version), std::move(lastVersion), std::move(exts),
- std::move(operands))),
- defTypeId, defResultId);
- }
-
- // Specific additional context-dependent operands
-
- // Populate dest with EnumValue objects constructed from source.
- const auto populateEnumValues = [&getCaps,&getExts](EnumValues* dest, const Json::Value& source, bool bitEnum) {
- // A lambda for determining the numeric value to be used for a given
- // enumerant in JSON form, and whether that value is a 0 in a bitfield.
- auto getValue = [&bitEnum](const Json::Value& enumerant) {
- std::pair result{0u,false};
- if (!bitEnum) {
- result.first = enumerant["value"].asUInt();
- } else {
- const unsigned int bit = NumberStringToBit(enumerant["value"].asString());
- if (bit == 0)
- result.second = true;
- else
- result.first = bit - 1; // This is the *shift* amount.
- }
- return result;
- };
-
- for (const auto& enumerant : source["enumerants"]) {
- unsigned value;
- bool skip_zero_in_bitfield;
- std::tie(value, skip_zero_in_bitfield) = getValue(enumerant);
- if (skip_zero_in_bitfield)
- continue;
- EnumCaps caps(getCaps(enumerant));
- std::string version = enumerant["version"].asString();
- std::string lastVersion = enumerant["lastVersion"].asString();
- Extensions exts(getExts(enumerant));
- OperandParameters params;
- const Json::Value& paramsJson = enumerant["parameters"];
- if (!paramsJson.empty()) { // This enumerant has parameters.
- assert(paramsJson.isArray());
- for (const auto& param : paramsJson) {
- const std::string kind = param["kind"].asString();
- const std::string doc = param.get("name", "").asString();
- const auto p = ToOperandClassAndOptionality(kind, ""); // All parameters are required!
- params.push(p.type, doc);
- }
- }
- dest->emplace_back(
- value, enumerant["enumerant"].asString(),
- std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), std::move(params));
- }
- };
-
- const auto establishOperandClass = [&populateEnumValues](
- const std::string& enumName, spv::OperandClass operandClass,
- spv::EnumValues* enumValues, const Json::Value& operandEnum, const std::string& category) {
- assert(category == "BitEnum" || category == "ValueEnum");
- bool bitEnum = (category == "BitEnum");
- populateEnumValues(enumValues, operandEnum, bitEnum);
- OperandClassParams[operandClass].set(enumName, enumValues, bitEnum);
- };
-
- const Json::Value operandEnums = root["operand_kinds"];
- for (const auto& operandEnum : operandEnums) {
- const std::string enumName = operandEnum["kind"].asString();
- const std::string category = operandEnum["category"].asString();
- if (enumName == "SourceLanguage") {
- establishOperandClass(enumName, OperandSource, &SourceLanguageParams, operandEnum, category);
- } else if (enumName == "Decoration") {
- establishOperandClass(enumName, OperandDecoration, &DecorationParams, operandEnum, category);
- } else if (enumName == "ExecutionMode") {
- establishOperandClass(enumName, OperandExecutionMode, &ExecutionModeParams, operandEnum, category);
- } else if (enumName == "Capability") {
- establishOperandClass(enumName, OperandCapability, &CapabilityParams, operandEnum, category);
- } else if (enumName == "AddressingModel") {
- establishOperandClass(enumName, OperandAddressing, &AddressingParams, operandEnum, category);
- } else if (enumName == "MemoryModel") {
- establishOperandClass(enumName, OperandMemory, &MemoryParams, operandEnum, category);
- } else if (enumName == "MemorySemantics") {
- establishOperandClass(enumName, OperandMemorySemantics, &MemorySemanticsParams, operandEnum, category);
- } else if (enumName == "ExecutionModel") {
- establishOperandClass(enumName, OperandExecutionModel, &ExecutionModelParams, operandEnum, category);
- } else if (enumName == "StorageClass") {
- establishOperandClass(enumName, OperandStorage, &StorageParams, operandEnum, category);
- } else if (enumName == "SamplerAddressingMode") {
- establishOperandClass(enumName, OperandSamplerAddressingMode, &SamplerAddressingModeParams, operandEnum, category);
- } else if (enumName == "SamplerFilterMode") {
- establishOperandClass(enumName, OperandSamplerFilterMode, &SamplerFilterModeParams, operandEnum, category);
- } else if (enumName == "ImageFormat") {
- establishOperandClass(enumName, OperandSamplerImageFormat, &ImageFormatParams, operandEnum, category);
- } else if (enumName == "ImageChannelOrder") {
- establishOperandClass(enumName, OperandImageChannelOrder, &ImageChannelOrderParams, operandEnum, category);
- } else if (enumName == "ImageChannelDataType") {
- establishOperandClass(enumName, OperandImageChannelDataType, &ImageChannelDataTypeParams, operandEnum, category);
- } else if (enumName == "ImageOperands") {
- establishOperandClass(enumName, OperandImageOperands, &ImageOperandsParams, operandEnum, category);
- } else if (enumName == "FPFastMathMode") {
- establishOperandClass(enumName, OperandFPFastMath, &FPFastMathParams, operandEnum, category);
- } else if (enumName == "FPRoundingMode") {
- establishOperandClass(enumName, OperandFPRoundingMode, &FPRoundingModeParams, operandEnum, category);
- } else if (enumName == "LinkageType") {
- establishOperandClass(enumName, OperandLinkageType, &LinkageTypeParams, operandEnum, category);
- } else if (enumName == "FunctionParameterAttribute") {
- establishOperandClass(enumName, OperandFuncParamAttr, &FuncParamAttrParams, operandEnum, category);
- } else if (enumName == "AccessQualifier") {
- establishOperandClass(enumName, OperandAccessQualifier, &AccessQualifierParams, operandEnum, category);
- } else if (enumName == "BuiltIn") {
- establishOperandClass(enumName, OperandBuiltIn, &BuiltInParams, operandEnum, category);
- } else if (enumName == "SelectionControl") {
- establishOperandClass(enumName, OperandSelect, &SelectionControlParams, operandEnum, category);
- } else if (enumName == "LoopControl") {
- establishOperandClass(enumName, OperandLoop, &LoopControlParams, operandEnum, category);
- } else if (enumName == "FunctionControl") {
- establishOperandClass(enumName, OperandFunction, &FunctionControlParams, operandEnum, category);
- } else if (enumName == "Dim") {
- establishOperandClass(enumName, OperandDimensionality, &DimensionalityParams, operandEnum, category);
- } else if (enumName == "MemoryAccess") {
- establishOperandClass(enumName, OperandMemoryOperands, &MemoryAccessParams, operandEnum, category);
- } else if (enumName == "Scope") {
- establishOperandClass(enumName, OperandScope, &ScopeParams, operandEnum, category);
- } else if (enumName == "GroupOperation") {
- establishOperandClass(enumName, OperandGroupOperation, &GroupOperationParams, operandEnum, category);
- } else if (enumName == "KernelEnqueueFlags") {
- establishOperandClass(enumName, OperandKernelEnqueueFlags, &KernelEnqueueFlagsParams, operandEnum, category);
- } else if (enumName == "KernelProfilingInfo") {
- establishOperandClass(enumName, OperandKernelProfilingInfo, &KernelProfilingInfoParams, operandEnum, category);
- }
- }
-}
-
-}; // end namespace spv
diff --git a/3rdparty/spirv-headers/tools/buildHeaders/jsonToSpirv.h b/3rdparty/spirv-headers/tools/buildHeaders/jsonToSpirv.h
deleted file mode 100644
index beec01c50..000000000
--- a/3rdparty/spirv-headers/tools/buildHeaders/jsonToSpirv.h
+++ /dev/null
@@ -1,280 +0,0 @@
-// Copyright (c) 2014-2019 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.
-
-#pragma once
-#ifndef JSON_TO_SPIRV
-#define JSON_TO_SPIRV
-
-#include
-#include
-#include
-#include
-
-namespace spv {
-
- // Reads the file in the given |path|. Returns true and the contents of the
-// file on success; otherwise, returns false and an empty string.
-std::pair ReadFile(const std::string& path);
-
-// Fill in all the parameters
-void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders);
-
-// For parameterizing operands.
-enum OperandClass {
- OperandNone,
- OperandId,
- OperandVariableIds,
- OperandOptionalLiteral,
- OperandOptionalLiteralString,
- OperandOptionalLiteralStrings,
- OperandVariableLiterals,
- OperandVariableIdLiteral,
- OperandVariableLiteralId,
- OperandLiteralNumber,
- OperandLiteralString,
- OperandSource,
- OperandExecutionModel,
- OperandAddressing,
- OperandMemory,
- OperandExecutionMode,
- OperandStorage,
- OperandDimensionality,
- OperandSamplerAddressingMode,
- OperandSamplerFilterMode,
- OperandSamplerImageFormat,
- OperandImageChannelOrder,
- OperandImageChannelDataType,
- OperandImageOperands,
- OperandFPFastMath,
- OperandFPRoundingMode,
- OperandLinkageType,
- OperandAccessQualifier,
- OperandFuncParamAttr,
- OperandDecoration,
- OperandBuiltIn,
- OperandSelect,
- OperandLoop,
- OperandFunction,
- OperandMemorySemantics,
- OperandMemoryOperands,
- OperandScope,
- OperandGroupOperation,
- OperandKernelEnqueueFlags,
- OperandKernelProfilingInfo,
- OperandCapability,
-
- OperandOpcode,
-
- OperandCount
-};
-
-// Any specific enum can have a set of capabilities that allow it:
-typedef std::vector EnumCaps;
-
-// A set of extensions.
-typedef std::vector Extensions;
-
-// Parameterize a set of operands with their OperandClass(es) and descriptions.
-class OperandParameters {
-public:
- OperandParameters() { }
- void push(OperandClass oc, const std::string& d, bool opt = false)
- {
- opClass.push_back(oc);
- desc.push_back(d);
- optional.push_back(opt);
- }
- void setOptional();
- OperandClass getClass(int op) const { return opClass[op]; }
- const char* getDesc(int op) const { return desc[op].c_str(); }
- bool isOptional(int op) const { return optional[op]; }
- int getNum() const { return (int)opClass.size(); }
-
-protected:
- std::vector opClass;
- std::vector desc;
- std::vector optional;
-};
-
-// An ordered sequence of EValue. We'll preserve the order found in the
-// JSON file. You can look up a value by enum or by name. If there are
-// duplicate values, then take the first. We assume names are unique.
-// The EValue must have an unsigned |value| field and a string |name| field.
-template
-class EnumValuesContainer {
-public:
- using ContainerType = std::vector;
- using iterator = typename ContainerType::iterator;
- using const_iterator = typename ContainerType::const_iterator;
-
- EnumValuesContainer() {}
-
- // Constructs an EValue in place as a new element at the end of the
- // sequence.
- template
- void emplace_back(Args&&... args) {
- values.emplace_back(std::forward(args)...);
- }
-
- // Returns the first EValue in the sequence with the given value.
- // More than one EValue might have the same value.
- EValue& operator[](unsigned value) {
- auto where = std::find_if(begin(), end(), [&value](const EValue& e) {
- return value == e.value;
- });
- assert((where != end()) && "Could not find enum in the enum list");
- return *where;
- }
- // gets *all* entries for the value, including the first one
- void gatherAliases(unsigned value, std::vector& aliases) {
- std::for_each(begin(), end(), [&](EValue& e) {
- if (value == e.value)
- aliases.push_back(&e);});
- }
- // Returns the EValue with the given name. We assume uniqueness
- // by name.
- EValue& at(std::string name) {
- auto where = std::find_if(begin(), end(), [&name](const EValue& e) {
- return name == e.name;
- });
- assert((where != end()) && "Could not find name in the enum list");
- return *where;
- }
-
- iterator begin() { return values.begin(); }
- iterator end() { return values.end(); }
-
-private:
- ContainerType values;
-};
-
-// A single enumerant value. Corresponds to a row in an enumeration table
-// in the spec.
-class EnumValue {
-public:
- EnumValue() : value(0), desc(nullptr) {}
- EnumValue(unsigned int the_value, const std::string& the_name, EnumCaps&& the_caps,
- const std::string& the_firstVersion, const std::string& the_lastVersion,
- Extensions&& the_extensions, OperandParameters&& the_operands) :
- value(the_value), name(the_name), capabilities(std::move(the_caps)),
- firstVersion(std::move(the_firstVersion)), lastVersion(std::move(the_lastVersion)),
- extensions(std::move(the_extensions)), operands(std::move(the_operands)), desc(nullptr) { }
-
- // For ValueEnum, the value from the JSON file.
- // For BitEnum, the index of the bit position represented by this mask.
- // (That is, what you shift 1 by to get the mask.)
- unsigned value;
- std::string name;
- EnumCaps capabilities;
- std::string firstVersion;
- std::string lastVersion;
- // A feature only be enabled by certain extensions.
- // An empty list means the feature does not require an extension.
- // Normally, only Capability enums are enabled by extension. In turn,
- // other enums and instructions are enabled by those capabilities.
- Extensions extensions;
- OperandParameters operands;
- const char* desc;
-};
-
-using EnumValues = EnumValuesContainer;
-
-// Parameterize a set of enumerants that form an enum
-class EnumDefinition {
-public:
- EnumDefinition() :
- desc(0), bitmask(false), enumValues(nullptr) { }
- void set(const std::string& enumName, EnumValues* enumValuesArg, bool mask = false)
- {
- codeName = enumName;
- bitmask = mask;
- enumValues = enumValuesArg;
- }
- // Returns the first EnumValue in the sequence with the given value.
- // More than one EnumValue might have the same value. Only valid
- // if enumValues has been populated.
- EnumValue& operator[](unsigned value) {
- assert(enumValues != nullptr);
- return (*enumValues)[value];
- }
- // Returns the name of the first EnumValue with the given value.
- // Assumes enumValues has been populated.
- const char* getName(unsigned value) {
- return (*this)[value].name.c_str();
- }
-
- using iterator = EnumValues::iterator;
- iterator begin() { return enumValues->begin(); }
- iterator end() { return enumValues->end(); }
-
- std::string codeName; // name to use when declaring headers for code
- const char* desc;
- bool bitmask; // true if these enumerants combine into a bitmask
- EnumValues* enumValues; // parameters for each individual enumerant
-};
-
-// Parameterize an instruction's logical format, including its known set of operands,
-// per OperandParameters above.
-class InstructionValue : public EnumValue {
-public:
- InstructionValue(EnumValue&& e, bool has_type, bool has_result)
- : EnumValue(std::move(e)),
- opDesc("TBD"),
- opClass(0),
- typePresent(has_type),
- resultPresent(has_result),
- alias(this) { }
- InstructionValue(const InstructionValue& v)
- {
- *this = v;
- alias = this;
- }
-
- bool hasResult() const { return resultPresent != 0; }
- bool hasType() const { return typePresent != 0; }
- void setAlias(const InstructionValue& a) { alias = &a; }
- const InstructionValue& getAlias() const { return *alias; }
- bool isAlias() const { return alias != this; }
-
- const char* opDesc;
- int opClass;
-
-protected:
- int typePresent : 1;
- int resultPresent : 1;
- const InstructionValue* alias; // correct only after discovering the aliases; otherwise points to this
-};
-
-using InstructionValues = EnumValuesContainer;
-
-// Parameterization info for all instructions.
-extern InstructionValues InstructionDesc;
-
-// These hold definitions of the enumerants used for operands.
-// This is indexed by OperandClass, but not including OperandOpcode.
-extern EnumDefinition OperandClassParams[];
-
-}; // end namespace spv
-
-#endif // JSON_TO_SPIRV
diff --git a/3rdparty/spirv-headers/tools/buildHeaders/jsoncpp/dist/json/json-forwards.h b/3rdparty/spirv-headers/tools/buildHeaders/jsoncpp/dist/json/json-forwards.h
deleted file mode 100644
index ccbdb2b13..000000000
--- a/3rdparty/spirv-headers/tools/buildHeaders/jsoncpp/dist/json/json-forwards.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).
-/// It is intended to be used with #include "json/json-forwards.h"
-/// This header provides forward declaration for all JsonCpp types.
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: LICENSE
-// //////////////////////////////////////////////////////////////////////
-
-/*
-The JsonCpp library's source code, including accompanying documentation,
-tests and demonstration applications, are licensed under the following
-conditions...
-
-The author (Baptiste Lepilleur) explicitly disclaims copyright in all
-jurisdictions which recognize such a disclaimer. In such jurisdictions,
-this software is released into the Public Domain.
-
-In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
-2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
-released under the terms of the MIT License (see below).
-
-In jurisdictions which recognize Public Domain property, the user of this
-software may choose to accept it either as 1) Public Domain, 2) under the
-conditions of the MIT License (see below), or 3) under the terms of dual
-Public Domain/MIT License conditions described here, as they choose.
-
-The MIT License is about as close to Public Domain as a license can get, and is
-described in clear, concise terms at:
-
- http://en.wikipedia.org/wiki/MIT_License
-
-The full text of the MIT License follows:
-
-========================================================================
-Copyright (c) 2007-2010 Baptiste Lepilleur
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-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 Software.
-
-THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-========================================================================
-(END LICENSE TEXT)
-
-The MIT license is compatible with both the GPL and commercial
-software, affording one all of the rights of Public Domain with the
-minor nuisance of being required to keep the above copyright notice
-and license text in the source code. Note also that by accepting the
-Public Domain "license" you can re-license your copy using whatever
-license you like.
-
-*/
-
-// //////////////////////////////////////////////////////////////////////
-// End of content of file: LICENSE
-// //////////////////////////////////////////////////////////////////////
-
-
-
-
-
-#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
-# define JSON_FORWARD_AMALGATED_H_INCLUDED
-/// If defined, indicates that the source file is amalgated
-/// to prevent private header inclusion.
-#define JSON_IS_AMALGAMATION
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: include/json/config.h
-// //////////////////////////////////////////////////////////////////////
-
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_CONFIG_H_INCLUDED
-#define JSON_CONFIG_H_INCLUDED
-
-/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
-
-/// If defined, indicates that json may leverage CppTL library
-//# define JSON_USE_CPPTL 1
-/// If defined, indicates that cpptl vector based map should be used instead of
-/// std::map
-/// as Value container.
-//# define JSON_USE_CPPTL_SMALLMAP 1
-
-// If non-zero, the library uses exceptions to report bad input instead of C
-// assertion macros. The default is to use exceptions.
-#ifndef JSON_USE_EXCEPTION
-#define JSON_USE_EXCEPTION 1
-#endif
-
-/// If defined, indicates that the source file is amalgated
-/// to prevent private header inclusion.
-/// Remarks: it is automatically defined in the generated amalgated header.
-// #define JSON_IS_AMALGAMATION
-
-#ifdef JSON_IN_CPPTL
-#include
-#ifndef JSON_USE_CPPTL
-#define JSON_USE_CPPTL 1
-#endif
-#endif
-
-#ifdef JSON_IN_CPPTL
-#define JSON_API CPPTL_API
-#elif defined(JSON_DLL_BUILD)
-#if defined(_MSC_VER)
-#define JSON_API __declspec(dllexport)
-#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
-#endif // if defined(_MSC_VER)
-#elif defined(JSON_DLL)
-#if defined(_MSC_VER)
-#define JSON_API __declspec(dllimport)
-#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
-#endif // if defined(_MSC_VER)
-#endif // ifdef JSON_IN_CPPTL
-#if !defined(JSON_API)
-#define JSON_API
-#endif
-
-// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
-// integer
-// Storages, and 64 bits integer support is disabled.
-// #define JSON_NO_INT64 1
-
-#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
-// Microsoft Visual Studio 6 only support conversion from __int64 to double
-// (no conversion from unsigned __int64).
-#define JSON_USE_INT64_DOUBLE_CONVERSION 1
-// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
-// characters in the debug information)
-// All projects I've ever seen with VS6 were using this globally (not bothering
-// with pragma push/pop).
-#pragma warning(disable : 4786)
-#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
-
-#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
-/// Indicates that the following function is deprecated.
-#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
-#elif defined(__clang__) && defined(__has_feature)
-#if __has_feature(attribute_deprecated_with_message)
-#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
-#endif
-#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
-#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
-#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
-#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
-#endif
-
-#if !defined(JSONCPP_DEPRECATED)
-#define JSONCPP_DEPRECATED(message)
-#endif // if !defined(JSONCPP_DEPRECATED)
-
-namespace Json {
-typedef int Int;
-typedef unsigned int UInt;
-#if defined(JSON_NO_INT64)
-typedef int LargestInt;
-typedef unsigned int LargestUInt;
-#undef JSON_HAS_INT64
-#else // if defined(JSON_NO_INT64)
-// For Microsoft Visual use specific types as long long is not supported
-#if defined(_MSC_VER) // Microsoft Visual Studio
-typedef __int64 Int64;
-typedef unsigned __int64 UInt64;
-#else // if defined(_MSC_VER) // Other platforms, use long long
-typedef long long int Int64;
-typedef unsigned long long int UInt64;
-#endif // if defined(_MSC_VER)
-typedef Int64 LargestInt;
-typedef UInt64 LargestUInt;
-#define JSON_HAS_INT64
-#endif // if defined(JSON_NO_INT64)
-} // end namespace Json
-
-#endif // JSON_CONFIG_H_INCLUDED
-
-// //////////////////////////////////////////////////////////////////////
-// End of content of file: include/json/config.h
-// //////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: include/json/forwards.h
-// //////////////////////////////////////////////////////////////////////
-
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_FORWARDS_H_INCLUDED
-#define JSON_FORWARDS_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-#include "config.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-
-namespace Json {
-
-// writer.h
-class FastWriter;
-class StyledWriter;
-
-// reader.h
-class Reader;
-
-// features.h
-class Features;
-
-// value.h
-typedef unsigned int ArrayIndex;
-class StaticString;
-class Path;
-class PathArgument;
-class Value;
-class ValueIteratorBase;
-class ValueIterator;
-class ValueConstIterator;
-
-} // namespace Json
-
-#endif // JSON_FORWARDS_H_INCLUDED
-
-// //////////////////////////////////////////////////////////////////////
-// End of content of file: include/json/forwards.h
-// //////////////////////////////////////////////////////////////////////
-
-
-
-
-
-#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
diff --git a/3rdparty/spirv-headers/tools/buildHeaders/jsoncpp/dist/json/json.h b/3rdparty/spirv-headers/tools/buildHeaders/jsoncpp/dist/json/json.h
deleted file mode 100644
index e01991e0f..000000000
--- a/3rdparty/spirv-headers/tools/buildHeaders/jsoncpp/dist/json/json.h
+++ /dev/null
@@ -1,2017 +0,0 @@
-/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/).
-/// It is intended to be used with #include "json/json.h"
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: LICENSE
-// //////////////////////////////////////////////////////////////////////
-
-/*
-The JsonCpp library's source code, including accompanying documentation,
-tests and demonstration applications, are licensed under the following
-conditions...
-
-The author (Baptiste Lepilleur) explicitly disclaims copyright in all
-jurisdictions which recognize such a disclaimer. In such jurisdictions,
-this software is released into the Public Domain.
-
-In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
-2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
-released under the terms of the MIT License (see below).
-
-In jurisdictions which recognize Public Domain property, the user of this
-software may choose to accept it either as 1) Public Domain, 2) under the
-conditions of the MIT License (see below), or 3) under the terms of dual
-Public Domain/MIT License conditions described here, as they choose.
-
-The MIT License is about as close to Public Domain as a license can get, and is
-described in clear, concise terms at:
-
- http://en.wikipedia.org/wiki/MIT_License
-
-The full text of the MIT License follows:
-
-========================================================================
-Copyright (c) 2007-2010 Baptiste Lepilleur
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-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 Software.
-
-THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-========================================================================
-(END LICENSE TEXT)
-
-The MIT license is compatible with both the GPL and commercial
-software, affording one all of the rights of Public Domain with the
-minor nuisance of being required to keep the above copyright notice
-and license text in the source code. Note also that by accepting the
-Public Domain "license" you can re-license your copy using whatever
-license you like.
-
-*/
-
-// //////////////////////////////////////////////////////////////////////
-// End of content of file: LICENSE
-// //////////////////////////////////////////////////////////////////////
-
-
-
-
-
-#ifndef JSON_AMALGATED_H_INCLUDED
-# define JSON_AMALGATED_H_INCLUDED
-/// If defined, indicates that the source file is amalgated
-/// to prevent private header inclusion.
-#define JSON_IS_AMALGAMATION
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: include/json/version.h
-// //////////////////////////////////////////////////////////////////////
-
-// DO NOT EDIT. This file is generated by CMake from "version"
-// and "version.h.in" files.
-// Run CMake configure step to update it.
-#ifndef JSON_VERSION_H_INCLUDED
-# define JSON_VERSION_H_INCLUDED
-
-# define JSONCPP_VERSION_STRING "1.6.2"
-# define JSONCPP_VERSION_MAJOR 1
-# define JSONCPP_VERSION_MINOR 6
-# define JSONCPP_VERSION_PATCH 2
-# define JSONCPP_VERSION_QUALIFIER
-# define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8))
-
-#endif // JSON_VERSION_H_INCLUDED
-
-// //////////////////////////////////////////////////////////////////////
-// End of content of file: include/json/version.h
-// //////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: include/json/config.h
-// //////////////////////////////////////////////////////////////////////
-
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_CONFIG_H_INCLUDED
-#define JSON_CONFIG_H_INCLUDED
-
-/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
-
-/// If defined, indicates that json may leverage CppTL library
-//# define JSON_USE_CPPTL 1
-/// If defined, indicates that cpptl vector based map should be used instead of
-/// std::map
-/// as Value container.
-//# define JSON_USE_CPPTL_SMALLMAP 1
-
-// If non-zero, the library uses exceptions to report bad input instead of C
-// assertion macros. The default is to use exceptions.
-#ifndef JSON_USE_EXCEPTION
-#define JSON_USE_EXCEPTION 1
-#endif
-
-/// If defined, indicates that the source file is amalgated
-/// to prevent private header inclusion.
-/// Remarks: it is automatically defined in the generated amalgated header.
-// #define JSON_IS_AMALGAMATION
-
-#ifdef JSON_IN_CPPTL
-#include
-#ifndef JSON_USE_CPPTL
-#define JSON_USE_CPPTL 1
-#endif
-#endif
-
-#ifdef JSON_IN_CPPTL
-#define JSON_API CPPTL_API
-#elif defined(JSON_DLL_BUILD)
-#if defined(_MSC_VER)
-#define JSON_API __declspec(dllexport)
-#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
-#endif // if defined(_MSC_VER)
-#elif defined(JSON_DLL)
-#if defined(_MSC_VER)
-#define JSON_API __declspec(dllimport)
-#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
-#endif // if defined(_MSC_VER)
-#endif // ifdef JSON_IN_CPPTL
-#if !defined(JSON_API)
-#define JSON_API
-#endif
-
-// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
-// integer
-// Storages, and 64 bits integer support is disabled.
-// #define JSON_NO_INT64 1
-
-#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
-// Microsoft Visual Studio 6 only support conversion from __int64 to double
-// (no conversion from unsigned __int64).
-#define JSON_USE_INT64_DOUBLE_CONVERSION 1
-// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
-// characters in the debug information)
-// All projects I've ever seen with VS6 were using this globally (not bothering
-// with pragma push/pop).
-#pragma warning(disable : 4786)
-#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
-
-#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
-/// Indicates that the following function is deprecated.
-#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
-#elif defined(__clang__) && defined(__has_feature)
-#if __has_feature(attribute_deprecated_with_message)
-#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
-#endif
-#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
-#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
-#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
-#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
-#endif
-
-#if !defined(JSONCPP_DEPRECATED)
-#define JSONCPP_DEPRECATED(message)
-#endif // if !defined(JSONCPP_DEPRECATED)
-
-namespace Json {
-typedef int Int;
-typedef unsigned int UInt;
-#if defined(JSON_NO_INT64)
-typedef int LargestInt;
-typedef unsigned int LargestUInt;
-#undef JSON_HAS_INT64
-#else // if defined(JSON_NO_INT64)
-// For Microsoft Visual use specific types as long long is not supported
-#if defined(_MSC_VER) // Microsoft Visual Studio
-typedef __int64 Int64;
-typedef unsigned __int64 UInt64;
-#else // if defined(_MSC_VER) // Other platforms, use long long
-typedef long long int Int64;
-typedef unsigned long long int UInt64;
-#endif // if defined(_MSC_VER)
-typedef Int64 LargestInt;
-typedef UInt64 LargestUInt;
-#define JSON_HAS_INT64
-#endif // if defined(JSON_NO_INT64)
-} // end namespace Json
-
-#endif // JSON_CONFIG_H_INCLUDED
-
-// //////////////////////////////////////////////////////////////////////
-// End of content of file: include/json/config.h
-// //////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: include/json/forwards.h
-// //////////////////////////////////////////////////////////////////////
-
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_FORWARDS_H_INCLUDED
-#define JSON_FORWARDS_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-#include "config.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-
-namespace Json {
-
-// writer.h
-class FastWriter;
-class StyledWriter;
-
-// reader.h
-class Reader;
-
-// features.h
-class Features;
-
-// value.h
-typedef unsigned int ArrayIndex;
-class StaticString;
-class Path;
-class PathArgument;
-class Value;
-class ValueIteratorBase;
-class ValueIterator;
-class ValueConstIterator;
-
-} // namespace Json
-
-#endif // JSON_FORWARDS_H_INCLUDED
-
-// //////////////////////////////////////////////////////////////////////
-// End of content of file: include/json/forwards.h
-// //////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: include/json/features.h
-// //////////////////////////////////////////////////////////////////////
-
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
-#define CPPTL_JSON_FEATURES_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-#include "forwards.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-
-namespace Json {
-
-/** \brief Configuration passed to reader and writer.
- * This configuration object can be used to force the Reader or Writer
- * to behave in a standard conforming way.
- */
-class JSON_API Features {
-public:
- /** \brief A configuration that allows all features and assumes all strings
- * are UTF-8.
- * - C & C++ comments are allowed
- * - Root object can be any JSON value
- * - Assumes Value strings are encoded in UTF-8
- */
- static Features all();
-
- /** \brief A configuration that is strictly compatible with the JSON
- * specification.
- * - Comments are forbidden.
- * - Root object must be either an array or an object value.
- * - Assumes Value strings are encoded in UTF-8
- */
- static Features strictMode();
-
- /** \brief Initialize the configuration like JsonConfig::allFeatures;
- */
- Features();
-
- /// \c true if comments are allowed. Default: \c true.
- bool allowComments_;
-
- /// \c true if root must be either an array or an object value. Default: \c
- /// false.
- bool strictRoot_;
-
- /// \c true if dropped null placeholders are allowed. Default: \c false.
- bool allowDroppedNullPlaceholders_;
-
- /// \c true if numeric object key are allowed. Default: \c false.
- bool allowNumericKeys_;
-};
-
-} // namespace Json
-
-#endif // CPPTL_JSON_FEATURES_H_INCLUDED
-
-// //////////////////////////////////////////////////////////////////////
-// End of content of file: include/json/features.h
-// //////////////////////////////////////////////////////////////////////
-
-
-
-
-
-
-// //////////////////////////////////////////////////////////////////////
-// Beginning of content of file: include/json/value.h
-// //////////////////////////////////////////////////////////////////////
-
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef CPPTL_JSON_H_INCLUDED
-#define CPPTL_JSON_H_INCLUDED
-
-#if !defined(JSON_IS_AMALGAMATION)
-#include "forwards.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-#include
-#include
-#include
-
-#ifndef JSON_USE_CPPTL_SMALLMAP
-#include