Commit 0f9a2dc9 by Ben Clayton

Squashed 'third_party/SPIRV-Headers/' changes from e4322e3be..af64a9e82

af64a9e82 Versioning: Complete the versioning change in recent commits. 5f3a03023 Merge pull request #133 from nhaehnle/buildHeader-spv15 809512f36 buildHeaders: update version to SPIR-V 1.5 b252a5095 Merge pull request #131 from lukaszgotszaldintel/new_branch 842ec9067 Merge pull request #128 from amdrexu/bugfix 1cdfc756f Merge pull request #129 from ehsannas/update_doc 7b1b05e78 Improve the doc on using Bazel. 836e001d7 Merge pull request #127 from ehsannas/add_bazel_build 3f9bad6fc add cmake option SPIRV_HEADERS_SKIP_INSTALL c98d953a3 Bump the SPIR-V version to 1.5 ab22babed Update documentation. 4163b3639 Add a Bazel build file. 601d73872 Add SPV_KHR_physical_storage_buffer. 63d4d272f SPIR-V 1.5. 38cafab37 Minor tweak for Rev. 2 of SPIR-V 1.4. 059a49598 Merge branch 'printing-classes' cca9cc7f3 Grammar: Add instruction-printing classes. git-subtree-dir: third_party/SPIRV-Headers git-subtree-split: af64a9e826bf5bb5fcd2434dd71be1e41e922563
parent f3e0560d
package(
default_visibility = ["//visibility:public"],
)
licenses(["notice"])
exports_files(["LICENSE"])
filegroup(
name = "spirv_core_grammar_1.0",
srcs = ["include/spirv/1.0/spirv.core.grammar.json"],
)
filegroup(
name = "spirv_glsl_grammar_1.0",
srcs = ["include/spirv/1.0/extinst.glsl.std.450.grammar.json"],
)
filegroup(
name = "spirv_opencl_grammar_1.0",
srcs = ["include/spirv/1.0/extinst.opencl.std.100.grammar.json"],
)
filegroup(
name = "spirv_core_grammar_1.1",
srcs = ["include/spirv/1.1/spirv.core.grammar.json"],
)
filegroup(
name = "spirv_glsl_grammar_1.1",
srcs = ["include/spirv/1.1/extinst.glsl.std.450.grammar.json"],
)
filegroup(
name = "spirv_opencl_grammar_1.1",
srcs = ["include/spirv/1.1/extinst.opencl.std.100.grammar.json"],
)
filegroup(
name = "spirv_core_grammar_1.2",
srcs = ["include/spirv/1.2/spirv.core.grammar.json"],
)
filegroup(
name = "spirv_glsl_grammar_1.2",
srcs = ["include/spirv/1.2/extinst.glsl.std.450.grammar.json"],
)
filegroup(
name = "spirv_opencl_grammar_1.2",
srcs = ["include/spirv/1.2/extinst.opencl.std.100.grammar.json"],
)
filegroup(
name = "spirv_core_grammar_unified1",
srcs = ["include/spirv/unified1/spirv.core.grammar.json"],
)
filegroup(
name = "spirv_glsl_grammar_unified1",
srcs = ["include/spirv/unified1/extinst.glsl.std.450.grammar.json"],
)
filegroup(
name = "spirv_opencl_grammar_unified1",
srcs = ["include/spirv/unified1/extinst.opencl.std.100.grammar.json"],
)
filegroup(
name = "spirv_xml_registry",
srcs = ["include/spirv/spir-v.xml"],
)
cc_library(
name = "spirv_common_headers",
hdrs = [
"include/spirv/1.0/GLSL.std.450.h",
"include/spirv/1.0/OpenCL.std.h",
"include/spirv/1.1/GLSL.std.450.h",
"include/spirv/1.1/OpenCL.std.h",
"include/spirv/1.2/GLSL.std.450.h",
"include/spirv/1.2/OpenCL.std.h",
"include/spirv/unified1/GLSL.std.450.h",
"include/spirv/unified1/OpenCL.std.h",
],
includes = ["include"],
)
cc_library(
name = "spirv_c_headers",
hdrs = [
"include/spirv/1.0/spirv.h",
"include/spirv/1.1/spirv.h",
"include/spirv/1.2/spirv.h",
"include/spirv/unified1/spirv.h",
],
includes = ["include"],
deps = [":spirv_common_headers"],
)
cc_library(
name = "spirv_cpp_headers",
hdrs = [
"include/spirv/1.0/spirv.hpp",
"include/spirv/1.1/spirv.hpp",
"include/spirv/1.2/spirv.hpp",
"include/spirv/unified1/spirv.hpp",
],
includes = ["include"],
deps = [":spirv_common_headers"],
)
cc_library(
name = "spirv_cpp11_headers",
hdrs = [
"include/spirv/1.0/spirv.hpp11",
"include/spirv/1.1/spirv.hpp11",
"include/spirv/1.2/spirv.hpp11",
"include/spirv/unified1/spirv.hpp11",
],
includes = ["include"],
deps = [":spirv_common_headers"],
)
...@@ -51,9 +51,18 @@ add_custom_target(install-headers ...@@ -51,9 +51,18 @@ add_custom_target(install-headers
option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples" option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples"
${SPIRV_HEADERS_SKIP_EXAMPLES}) ${SPIRV_HEADERS_SKIP_EXAMPLES})
option(SPIRV_HEADERS_SKIP_INSTALL "Skip install"
${SPIRV_HEADERS_SKIP_INSTALL})
if(NOT ${SPIRV_HEADERS_SKIP_EXAMPLES}) if(NOT ${SPIRV_HEADERS_SKIP_EXAMPLES})
set(SPIRV_HEADERS_ENABLE_EXAMPLES ON) set(SPIRV_HEADERS_ENABLE_EXAMPLES ON)
endif() endif()
if(NOT ${SPIRV_HEADERS_SKIP_INSTALL})
set(SPIRV_HEADERS_ENABLE_INSTALL ON)
endif()
if (SPIRV_HEADERS_ENABLE_EXAMPLES) if (SPIRV_HEADERS_ENABLE_EXAMPLES)
message(STATUS "Building SPIRV-Header examples") message(STATUS "Building SPIRV-Header examples")
add_subdirectory(example) add_subdirectory(example)
...@@ -67,49 +76,52 @@ target_include_directories(${PROJECT_NAME} INTERFACE ...@@ -67,49 +76,52 @@ target_include_directories(${PROJECT_NAME} INTERFACE
# Installation # Installation
set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") if (SPIRV_HEADERS_ENABLE_INSTALL)
message(STATUS "Installing SPIRV-Header")
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(namespace "${PROJECT_NAME}::") set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
include(CMakePackageConfigHelpers) set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
write_basic_package_version_file( set(namespace "${PROJECT_NAME}::")
"${version_config}"
COMPATIBILITY SameMajorVersion include(CMakePackageConfigHelpers)
) write_basic_package_version_file(
"${version_config}"
configure_package_config_file( COMPATIBILITY SameMajorVersion
"cmake/Config.cmake.in" )
"${project_config}"
INSTALL_DESTINATION "${config_install_dir}" configure_package_config_file(
) "cmake/Config.cmake.in"
"${project_config}"
install( INSTALL_DESTINATION "${config_install_dir}"
TARGETS ${PROJECT_NAME} )
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} install(
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} EXPORT "${TARGETS_EXPORT_NAME}"
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
install( INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
DIRECTORY include/spirv )
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
) install(
DIRECTORY include/spirv
install( DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES "${project_config}" "${version_config}" )
DESTINATION "${config_install_dir}"
) install(
FILES "${project_config}" "${version_config}"
install( DESTINATION "${config_install_dir}"
EXPORT "${TARGETS_EXPORT_NAME}" )
NAMESPACE "${namespace}"
DESTINATION "${config_install_dir}" install(
) EXPORT "${TARGETS_EXPORT_NAME}"
NAMESPACE "${namespace}"
DESTINATION "${config_install_dir}"
)
endif()
...@@ -53,6 +53,7 @@ If you want to install them somewhere else, then use ...@@ -53,6 +53,7 @@ If you want to install them somewhere else, then use
## Using the headers without installing ## Using the headers without installing
### Using CMake
A CMake-based project can use the headers without installing, as follows: A CMake-based project can use the headers without installing, as follows:
1. Add an `add_subdirectory` directive to include this source tree. 1. Add an `add_subdirectory` directive to include this source tree.
...@@ -69,6 +70,55 @@ A CMake-based project can use the headers without installing, as follows: ...@@ -69,6 +70,55 @@ A CMake-based project can use the headers without installing, as follows:
See also the [example](example/) subdirectory. But since that example is See also the [example](example/) subdirectory. But since that example is
*inside* this repostory, it doesn't use and `add_subdirectory` directive. *inside* this repostory, it doesn't use and `add_subdirectory` directive.
### Using Bazel
A Bazel-based project can use the headers without installing, as follows:
1. Add SPIRV-Headers as a submodule of your project, and add a
`local_repository` to your `WORKSPACE` file. For example, if you place
SPIRV-Headers under `external/spirv-headers`, then add the following to your
`WORKSPACE` file:
```
local_repository(
name = "spirv_headers",
path = "external/spirv-headers",
)
```
2. Add one of the following to the `deps` attribute of your build target based
on your needs:
```
@spirv_headers//:spirv_c_headers
@spirv_headers//:spirv_cpp_headers
@spirv_headers//:spirv_cpp11_headers
```
For example:
```
cc_library(
name = "project",
srcs = [
# Path to project sources
],
hdrs = [
# Path to project headers
],
deps = [
"@spirv_tools//:spirv_c_headers",
# Other dependencies,
],
)
```
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"
```
## Generating the headers from the JSON grammar ## Generating the headers from the JSON grammar
This will generally be done by Khronos, for a change to the JSON grammar. This will generally be done by Khronos, for a change to the JSON grammar.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -48,7 +48,7 @@ namespace Spv ...@@ -48,7 +48,7 @@ namespace Spv
public static class Specification public static class Specification
{ {
public const uint MagicNumber = 0x07230203; public const uint MagicNumber = 0x07230203;
public const uint Version = 0x00010400; public const uint Version = 0x00010500;
public const uint Revision = 1; public const uint Revision = 1;
public const uint OpCodeMask = 0xffff; public const uint OpCodeMask = 0xffff;
public const uint WordCountShift = 16; public const uint WordCountShift = 16;
...@@ -87,6 +87,7 @@ namespace Spv ...@@ -87,6 +87,7 @@ namespace Spv
Logical = 0, Logical = 0,
Physical32 = 1, Physical32 = 1,
Physical64 = 2, Physical64 = 2,
PhysicalStorageBuffer64 = 5348,
PhysicalStorageBuffer64EXT = 5348, PhysicalStorageBuffer64EXT = 5348,
} }
...@@ -95,6 +96,7 @@ namespace Spv ...@@ -95,6 +96,7 @@ namespace Spv
Simple = 0, Simple = 0,
GLSL450 = 1, GLSL450 = 1,
OpenCL = 2, OpenCL = 2,
Vulkan = 3,
VulkanKHR = 3, VulkanKHR = 3,
} }
...@@ -179,6 +181,7 @@ namespace Spv ...@@ -179,6 +181,7 @@ namespace Spv
HitAttributeNV = 5339, HitAttributeNV = 5339,
IncomingRayPayloadNV = 5342, IncomingRayPayloadNV = 5342,
ShaderRecordBufferNV = 5343, ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349, PhysicalStorageBufferEXT = 5349,
} }
...@@ -307,9 +310,13 @@ namespace Spv ...@@ -307,9 +310,13 @@ namespace Spv
ConstOffsets = 5, ConstOffsets = 5,
Sample = 6, Sample = 6,
MinLod = 7, MinLod = 7,
MakeTexelAvailable = 8,
MakeTexelAvailableKHR = 8, MakeTexelAvailableKHR = 8,
MakeTexelVisible = 9,
MakeTexelVisibleKHR = 9, MakeTexelVisibleKHR = 9,
NonPrivateTexel = 10,
NonPrivateTexelKHR = 10, NonPrivateTexelKHR = 10,
VolatileTexel = 11,
VolatileTexelKHR = 11, VolatileTexelKHR = 11,
SignExtend = 12, SignExtend = 12,
ZeroExtend = 13, ZeroExtend = 13,
...@@ -326,9 +333,13 @@ namespace Spv ...@@ -326,9 +333,13 @@ namespace Spv
ConstOffsets = 0x00000020, ConstOffsets = 0x00000020,
Sample = 0x00000040, Sample = 0x00000040,
MinLod = 0x00000080, MinLod = 0x00000080,
MakeTexelAvailable = 0x00000100,
MakeTexelAvailableKHR = 0x00000100, MakeTexelAvailableKHR = 0x00000100,
MakeTexelVisible = 0x00000200,
MakeTexelVisibleKHR = 0x00000200, MakeTexelVisibleKHR = 0x00000200,
NonPrivateTexel = 0x00000400,
NonPrivateTexelKHR = 0x00000400, NonPrivateTexelKHR = 0x00000400,
VolatileTexel = 0x00000800,
VolatileTexelKHR = 0x00000800, VolatileTexelKHR = 0x00000800,
SignExtend = 0x00001000, SignExtend = 0x00001000,
ZeroExtend = 0x00002000, ZeroExtend = 0x00002000,
...@@ -446,8 +457,11 @@ namespace Spv ...@@ -446,8 +457,11 @@ namespace Spv
PerViewNV = 5272, PerViewNV = 5272,
PerTaskNV = 5273, PerTaskNV = 5273,
PerVertexNV = 5285, PerVertexNV = 5285,
NonUniform = 5300,
NonUniformEXT = 5300, NonUniformEXT = 5300,
RestrictPointer = 5355,
RestrictPointerEXT = 5355, RestrictPointerEXT = 5355,
AliasedPointer = 5356,
AliasedPointerEXT = 5356, AliasedPointerEXT = 5356,
CounterBuffer = 5634, CounterBuffer = 5634,
HlslCounterBufferGOOGLE = 5634, HlslCounterBufferGOOGLE = 5634,
...@@ -631,8 +645,11 @@ namespace Spv ...@@ -631,8 +645,11 @@ namespace Spv
CrossWorkgroupMemory = 9, CrossWorkgroupMemory = 9,
AtomicCounterMemory = 10, AtomicCounterMemory = 10,
ImageMemory = 11, ImageMemory = 11,
OutputMemory = 12,
OutputMemoryKHR = 12, OutputMemoryKHR = 12,
MakeAvailable = 13,
MakeAvailableKHR = 13, MakeAvailableKHR = 13,
MakeVisible = 14,
MakeVisibleKHR = 14, MakeVisibleKHR = 14,
Volatile = 15, Volatile = 15,
} }
...@@ -650,8 +667,11 @@ namespace Spv ...@@ -650,8 +667,11 @@ namespace Spv
CrossWorkgroupMemory = 0x00000200, CrossWorkgroupMemory = 0x00000200,
AtomicCounterMemory = 0x00000400, AtomicCounterMemory = 0x00000400,
ImageMemory = 0x00000800, ImageMemory = 0x00000800,
OutputMemory = 0x00001000,
OutputMemoryKHR = 0x00001000, OutputMemoryKHR = 0x00001000,
MakeAvailable = 0x00002000,
MakeAvailableKHR = 0x00002000, MakeAvailableKHR = 0x00002000,
MakeVisible = 0x00004000,
MakeVisibleKHR = 0x00004000, MakeVisibleKHR = 0x00004000,
Volatile = 0x00008000, Volatile = 0x00008000,
} }
...@@ -661,8 +681,11 @@ namespace Spv ...@@ -661,8 +681,11 @@ namespace Spv
Volatile = 0, Volatile = 0,
Aligned = 1, Aligned = 1,
Nontemporal = 2, Nontemporal = 2,
MakePointerAvailable = 3,
MakePointerAvailableKHR = 3, MakePointerAvailableKHR = 3,
MakePointerVisible = 4,
MakePointerVisibleKHR = 4, MakePointerVisibleKHR = 4,
NonPrivatePointer = 5,
NonPrivatePointerKHR = 5, NonPrivatePointerKHR = 5,
} }
...@@ -672,8 +695,11 @@ namespace Spv ...@@ -672,8 +695,11 @@ namespace Spv
Volatile = 0x00000001, Volatile = 0x00000001,
Aligned = 0x00000002, Aligned = 0x00000002,
Nontemporal = 0x00000004, Nontemporal = 0x00000004,
MakePointerAvailable = 0x00000008,
MakePointerAvailableKHR = 0x00000008, MakePointerAvailableKHR = 0x00000008,
MakePointerVisible = 0x00000010,
MakePointerVisibleKHR = 0x00000010, MakePointerVisibleKHR = 0x00000010,
NonPrivatePointer = 0x00000020,
NonPrivatePointerKHR = 0x00000020, NonPrivatePointerKHR = 0x00000020,
} }
...@@ -684,6 +710,7 @@ namespace Spv ...@@ -684,6 +710,7 @@ namespace Spv
Workgroup = 2, Workgroup = 2,
Subgroup = 3, Subgroup = 3,
Invocation = 4, Invocation = 4,
QueueFamily = 5,
QueueFamilyKHR = 5, QueueFamilyKHR = 5,
} }
...@@ -785,6 +812,8 @@ namespace Spv ...@@ -785,6 +812,8 @@ namespace Spv
GroupNonUniformShuffleRelative = 66, GroupNonUniformShuffleRelative = 66,
GroupNonUniformClustered = 67, GroupNonUniformClustered = 67,
GroupNonUniformQuad = 68, GroupNonUniformQuad = 68,
ShaderLayer = 69,
ShaderViewportIndex = 70,
SubgroupBallotKHR = 4423, SubgroupBallotKHR = 4423,
DrawParameters = 4427, DrawParameters = 4427,
SubgroupVoteKHR = 4431, SubgroupVoteKHR = 4431,
...@@ -829,21 +858,36 @@ namespace Spv ...@@ -829,21 +858,36 @@ namespace Spv
FragmentDensityEXT = 5291, FragmentDensityEXT = 5291,
ShadingRateNV = 5291, ShadingRateNV = 5291,
GroupNonUniformPartitionedNV = 5297, GroupNonUniformPartitionedNV = 5297,
ShaderNonUniform = 5301,
ShaderNonUniformEXT = 5301, ShaderNonUniformEXT = 5301,
RuntimeDescriptorArray = 5302,
RuntimeDescriptorArrayEXT = 5302, RuntimeDescriptorArrayEXT = 5302,
InputAttachmentArrayDynamicIndexing = 5303,
InputAttachmentArrayDynamicIndexingEXT = 5303, InputAttachmentArrayDynamicIndexingEXT = 5303,
UniformTexelBufferArrayDynamicIndexing = 5304,
UniformTexelBufferArrayDynamicIndexingEXT = 5304, UniformTexelBufferArrayDynamicIndexingEXT = 5304,
StorageTexelBufferArrayDynamicIndexing = 5305,
StorageTexelBufferArrayDynamicIndexingEXT = 5305, StorageTexelBufferArrayDynamicIndexingEXT = 5305,
UniformBufferArrayNonUniformIndexing = 5306,
UniformBufferArrayNonUniformIndexingEXT = 5306, UniformBufferArrayNonUniformIndexingEXT = 5306,
SampledImageArrayNonUniformIndexing = 5307,
SampledImageArrayNonUniformIndexingEXT = 5307, SampledImageArrayNonUniformIndexingEXT = 5307,
StorageBufferArrayNonUniformIndexing = 5308,
StorageBufferArrayNonUniformIndexingEXT = 5308, StorageBufferArrayNonUniformIndexingEXT = 5308,
StorageImageArrayNonUniformIndexing = 5309,
StorageImageArrayNonUniformIndexingEXT = 5309, StorageImageArrayNonUniformIndexingEXT = 5309,
InputAttachmentArrayNonUniformIndexing = 5310,
InputAttachmentArrayNonUniformIndexingEXT = 5310, InputAttachmentArrayNonUniformIndexingEXT = 5310,
UniformTexelBufferArrayNonUniformIndexing = 5311,
UniformTexelBufferArrayNonUniformIndexingEXT = 5311, UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
RayTracingNV = 5340, RayTracingNV = 5340,
VulkanMemoryModel = 5345,
VulkanMemoryModelKHR = 5345, VulkanMemoryModelKHR = 5345,
VulkanMemoryModelDeviceScope = 5346,
VulkanMemoryModelDeviceScopeKHR = 5346, VulkanMemoryModelDeviceScopeKHR = 5346,
PhysicalStorageBufferAddresses = 5347,
PhysicalStorageBufferAddressesEXT = 5347, PhysicalStorageBufferAddressesEXT = 5347,
ComputeDerivativeGroupLinearNV = 5350, ComputeDerivativeGroupLinearNV = 5350,
CooperativeMatrixNV = 5357, CooperativeMatrixNV = 5357,
......
...@@ -53,11 +53,11 @@ ...@@ -53,11 +53,11 @@
typedef unsigned int SpvId; typedef unsigned int SpvId;
#define SPV_VERSION 0x10400 #define SPV_VERSION 0x10500
#define SPV_REVISION 1 #define SPV_REVISION 1
static const unsigned int SpvMagicNumber = 0x07230203; static const unsigned int SpvMagicNumber = 0x07230203;
static const unsigned int SpvVersion = 0x00010400; static const unsigned int SpvVersion = 0x00010500;
static const unsigned int SpvRevision = 1; static const unsigned int SpvRevision = 1;
static const unsigned int SpvOpCodeMask = 0xffff; static const unsigned int SpvOpCodeMask = 0xffff;
static const unsigned int SpvWordCountShift = 16; static const unsigned int SpvWordCountShift = 16;
...@@ -95,6 +95,7 @@ typedef enum SpvAddressingModel_ { ...@@ -95,6 +95,7 @@ typedef enum SpvAddressingModel_ {
SpvAddressingModelLogical = 0, SpvAddressingModelLogical = 0,
SpvAddressingModelPhysical32 = 1, SpvAddressingModelPhysical32 = 1,
SpvAddressingModelPhysical64 = 2, SpvAddressingModelPhysical64 = 2,
SpvAddressingModelPhysicalStorageBuffer64 = 5348,
SpvAddressingModelPhysicalStorageBuffer64EXT = 5348, SpvAddressingModelPhysicalStorageBuffer64EXT = 5348,
SpvAddressingModelMax = 0x7fffffff, SpvAddressingModelMax = 0x7fffffff,
} SpvAddressingModel; } SpvAddressingModel;
...@@ -103,6 +104,7 @@ typedef enum SpvMemoryModel_ { ...@@ -103,6 +104,7 @@ typedef enum SpvMemoryModel_ {
SpvMemoryModelSimple = 0, SpvMemoryModelSimple = 0,
SpvMemoryModelGLSL450 = 1, SpvMemoryModelGLSL450 = 1,
SpvMemoryModelOpenCL = 2, SpvMemoryModelOpenCL = 2,
SpvMemoryModelVulkan = 3,
SpvMemoryModelVulkanKHR = 3, SpvMemoryModelVulkanKHR = 3,
SpvMemoryModelMax = 0x7fffffff, SpvMemoryModelMax = 0x7fffffff,
} SpvMemoryModel; } SpvMemoryModel;
...@@ -187,6 +189,7 @@ typedef enum SpvStorageClass_ { ...@@ -187,6 +189,7 @@ typedef enum SpvStorageClass_ {
SpvStorageClassHitAttributeNV = 5339, SpvStorageClassHitAttributeNV = 5339,
SpvStorageClassIncomingRayPayloadNV = 5342, SpvStorageClassIncomingRayPayloadNV = 5342,
SpvStorageClassShaderRecordBufferNV = 5343, SpvStorageClassShaderRecordBufferNV = 5343,
SpvStorageClassPhysicalStorageBuffer = 5349,
SpvStorageClassPhysicalStorageBufferEXT = 5349, SpvStorageClassPhysicalStorageBufferEXT = 5349,
SpvStorageClassMax = 0x7fffffff, SpvStorageClassMax = 0x7fffffff,
} SpvStorageClass; } SpvStorageClass;
...@@ -315,9 +318,13 @@ typedef enum SpvImageOperandsShift_ { ...@@ -315,9 +318,13 @@ typedef enum SpvImageOperandsShift_ {
SpvImageOperandsConstOffsetsShift = 5, SpvImageOperandsConstOffsetsShift = 5,
SpvImageOperandsSampleShift = 6, SpvImageOperandsSampleShift = 6,
SpvImageOperandsMinLodShift = 7, SpvImageOperandsMinLodShift = 7,
SpvImageOperandsMakeTexelAvailableShift = 8,
SpvImageOperandsMakeTexelAvailableKHRShift = 8, SpvImageOperandsMakeTexelAvailableKHRShift = 8,
SpvImageOperandsMakeTexelVisibleShift = 9,
SpvImageOperandsMakeTexelVisibleKHRShift = 9, SpvImageOperandsMakeTexelVisibleKHRShift = 9,
SpvImageOperandsNonPrivateTexelShift = 10,
SpvImageOperandsNonPrivateTexelKHRShift = 10, SpvImageOperandsNonPrivateTexelKHRShift = 10,
SpvImageOperandsVolatileTexelShift = 11,
SpvImageOperandsVolatileTexelKHRShift = 11, SpvImageOperandsVolatileTexelKHRShift = 11,
SpvImageOperandsSignExtendShift = 12, SpvImageOperandsSignExtendShift = 12,
SpvImageOperandsZeroExtendShift = 13, SpvImageOperandsZeroExtendShift = 13,
...@@ -334,9 +341,13 @@ typedef enum SpvImageOperandsMask_ { ...@@ -334,9 +341,13 @@ typedef enum SpvImageOperandsMask_ {
SpvImageOperandsConstOffsetsMask = 0x00000020, SpvImageOperandsConstOffsetsMask = 0x00000020,
SpvImageOperandsSampleMask = 0x00000040, SpvImageOperandsSampleMask = 0x00000040,
SpvImageOperandsMinLodMask = 0x00000080, SpvImageOperandsMinLodMask = 0x00000080,
SpvImageOperandsMakeTexelAvailableMask = 0x00000100,
SpvImageOperandsMakeTexelAvailableKHRMask = 0x00000100, SpvImageOperandsMakeTexelAvailableKHRMask = 0x00000100,
SpvImageOperandsMakeTexelVisibleMask = 0x00000200,
SpvImageOperandsMakeTexelVisibleKHRMask = 0x00000200, SpvImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
SpvImageOperandsNonPrivateTexelMask = 0x00000400,
SpvImageOperandsNonPrivateTexelKHRMask = 0x00000400, SpvImageOperandsNonPrivateTexelKHRMask = 0x00000400,
SpvImageOperandsVolatileTexelMask = 0x00000800,
SpvImageOperandsVolatileTexelKHRMask = 0x00000800, SpvImageOperandsVolatileTexelKHRMask = 0x00000800,
SpvImageOperandsSignExtendMask = 0x00001000, SpvImageOperandsSignExtendMask = 0x00001000,
SpvImageOperandsZeroExtendMask = 0x00002000, SpvImageOperandsZeroExtendMask = 0x00002000,
...@@ -452,8 +463,11 @@ typedef enum SpvDecoration_ { ...@@ -452,8 +463,11 @@ typedef enum SpvDecoration_ {
SpvDecorationPerViewNV = 5272, SpvDecorationPerViewNV = 5272,
SpvDecorationPerTaskNV = 5273, SpvDecorationPerTaskNV = 5273,
SpvDecorationPerVertexNV = 5285, SpvDecorationPerVertexNV = 5285,
SpvDecorationNonUniform = 5300,
SpvDecorationNonUniformEXT = 5300, SpvDecorationNonUniformEXT = 5300,
SpvDecorationRestrictPointer = 5355,
SpvDecorationRestrictPointerEXT = 5355, SpvDecorationRestrictPointerEXT = 5355,
SpvDecorationAliasedPointer = 5356,
SpvDecorationAliasedPointerEXT = 5356, SpvDecorationAliasedPointerEXT = 5356,
SpvDecorationCounterBuffer = 5634, SpvDecorationCounterBuffer = 5634,
SpvDecorationHlslCounterBufferGOOGLE = 5634, SpvDecorationHlslCounterBufferGOOGLE = 5634,
...@@ -634,8 +648,11 @@ typedef enum SpvMemorySemanticsShift_ { ...@@ -634,8 +648,11 @@ typedef enum SpvMemorySemanticsShift_ {
SpvMemorySemanticsCrossWorkgroupMemoryShift = 9, SpvMemorySemanticsCrossWorkgroupMemoryShift = 9,
SpvMemorySemanticsAtomicCounterMemoryShift = 10, SpvMemorySemanticsAtomicCounterMemoryShift = 10,
SpvMemorySemanticsImageMemoryShift = 11, SpvMemorySemanticsImageMemoryShift = 11,
SpvMemorySemanticsOutputMemoryShift = 12,
SpvMemorySemanticsOutputMemoryKHRShift = 12, SpvMemorySemanticsOutputMemoryKHRShift = 12,
SpvMemorySemanticsMakeAvailableShift = 13,
SpvMemorySemanticsMakeAvailableKHRShift = 13, SpvMemorySemanticsMakeAvailableKHRShift = 13,
SpvMemorySemanticsMakeVisibleShift = 14,
SpvMemorySemanticsMakeVisibleKHRShift = 14, SpvMemorySemanticsMakeVisibleKHRShift = 14,
SpvMemorySemanticsVolatileShift = 15, SpvMemorySemanticsVolatileShift = 15,
SpvMemorySemanticsMax = 0x7fffffff, SpvMemorySemanticsMax = 0x7fffffff,
...@@ -653,8 +670,11 @@ typedef enum SpvMemorySemanticsMask_ { ...@@ -653,8 +670,11 @@ typedef enum SpvMemorySemanticsMask_ {
SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400, SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400,
SpvMemorySemanticsImageMemoryMask = 0x00000800, SpvMemorySemanticsImageMemoryMask = 0x00000800,
SpvMemorySemanticsOutputMemoryMask = 0x00001000,
SpvMemorySemanticsOutputMemoryKHRMask = 0x00001000, SpvMemorySemanticsOutputMemoryKHRMask = 0x00001000,
SpvMemorySemanticsMakeAvailableMask = 0x00002000,
SpvMemorySemanticsMakeAvailableKHRMask = 0x00002000, SpvMemorySemanticsMakeAvailableKHRMask = 0x00002000,
SpvMemorySemanticsMakeVisibleMask = 0x00004000,
SpvMemorySemanticsMakeVisibleKHRMask = 0x00004000, SpvMemorySemanticsMakeVisibleKHRMask = 0x00004000,
SpvMemorySemanticsVolatileMask = 0x00008000, SpvMemorySemanticsVolatileMask = 0x00008000,
} SpvMemorySemanticsMask; } SpvMemorySemanticsMask;
...@@ -663,8 +683,11 @@ typedef enum SpvMemoryAccessShift_ { ...@@ -663,8 +683,11 @@ typedef enum SpvMemoryAccessShift_ {
SpvMemoryAccessVolatileShift = 0, SpvMemoryAccessVolatileShift = 0,
SpvMemoryAccessAlignedShift = 1, SpvMemoryAccessAlignedShift = 1,
SpvMemoryAccessNontemporalShift = 2, SpvMemoryAccessNontemporalShift = 2,
SpvMemoryAccessMakePointerAvailableShift = 3,
SpvMemoryAccessMakePointerAvailableKHRShift = 3, SpvMemoryAccessMakePointerAvailableKHRShift = 3,
SpvMemoryAccessMakePointerVisibleShift = 4,
SpvMemoryAccessMakePointerVisibleKHRShift = 4, SpvMemoryAccessMakePointerVisibleKHRShift = 4,
SpvMemoryAccessNonPrivatePointerShift = 5,
SpvMemoryAccessNonPrivatePointerKHRShift = 5, SpvMemoryAccessNonPrivatePointerKHRShift = 5,
SpvMemoryAccessMax = 0x7fffffff, SpvMemoryAccessMax = 0x7fffffff,
} SpvMemoryAccessShift; } SpvMemoryAccessShift;
...@@ -674,8 +697,11 @@ typedef enum SpvMemoryAccessMask_ { ...@@ -674,8 +697,11 @@ typedef enum SpvMemoryAccessMask_ {
SpvMemoryAccessVolatileMask = 0x00000001, SpvMemoryAccessVolatileMask = 0x00000001,
SpvMemoryAccessAlignedMask = 0x00000002, SpvMemoryAccessAlignedMask = 0x00000002,
SpvMemoryAccessNontemporalMask = 0x00000004, SpvMemoryAccessNontemporalMask = 0x00000004,
SpvMemoryAccessMakePointerAvailableMask = 0x00000008,
SpvMemoryAccessMakePointerAvailableKHRMask = 0x00000008, SpvMemoryAccessMakePointerAvailableKHRMask = 0x00000008,
SpvMemoryAccessMakePointerVisibleMask = 0x00000010,
SpvMemoryAccessMakePointerVisibleKHRMask = 0x00000010, SpvMemoryAccessMakePointerVisibleKHRMask = 0x00000010,
SpvMemoryAccessNonPrivatePointerMask = 0x00000020,
SpvMemoryAccessNonPrivatePointerKHRMask = 0x00000020, SpvMemoryAccessNonPrivatePointerKHRMask = 0x00000020,
} SpvMemoryAccessMask; } SpvMemoryAccessMask;
...@@ -685,6 +711,7 @@ typedef enum SpvScope_ { ...@@ -685,6 +711,7 @@ typedef enum SpvScope_ {
SpvScopeWorkgroup = 2, SpvScopeWorkgroup = 2,
SpvScopeSubgroup = 3, SpvScopeSubgroup = 3,
SpvScopeInvocation = 4, SpvScopeInvocation = 4,
SpvScopeQueueFamily = 5,
SpvScopeQueueFamilyKHR = 5, SpvScopeQueueFamilyKHR = 5,
SpvScopeMax = 0x7fffffff, SpvScopeMax = 0x7fffffff,
} SpvScope; } SpvScope;
...@@ -785,6 +812,8 @@ typedef enum SpvCapability_ { ...@@ -785,6 +812,8 @@ typedef enum SpvCapability_ {
SpvCapabilityGroupNonUniformShuffleRelative = 66, SpvCapabilityGroupNonUniformShuffleRelative = 66,
SpvCapabilityGroupNonUniformClustered = 67, SpvCapabilityGroupNonUniformClustered = 67,
SpvCapabilityGroupNonUniformQuad = 68, SpvCapabilityGroupNonUniformQuad = 68,
SpvCapabilityShaderLayer = 69,
SpvCapabilityShaderViewportIndex = 70,
SpvCapabilitySubgroupBallotKHR = 4423, SpvCapabilitySubgroupBallotKHR = 4423,
SpvCapabilityDrawParameters = 4427, SpvCapabilityDrawParameters = 4427,
SpvCapabilitySubgroupVoteKHR = 4431, SpvCapabilitySubgroupVoteKHR = 4431,
...@@ -829,21 +858,36 @@ typedef enum SpvCapability_ { ...@@ -829,21 +858,36 @@ typedef enum SpvCapability_ {
SpvCapabilityFragmentDensityEXT = 5291, SpvCapabilityFragmentDensityEXT = 5291,
SpvCapabilityShadingRateNV = 5291, SpvCapabilityShadingRateNV = 5291,
SpvCapabilityGroupNonUniformPartitionedNV = 5297, SpvCapabilityGroupNonUniformPartitionedNV = 5297,
SpvCapabilityShaderNonUniform = 5301,
SpvCapabilityShaderNonUniformEXT = 5301, SpvCapabilityShaderNonUniformEXT = 5301,
SpvCapabilityRuntimeDescriptorArray = 5302,
SpvCapabilityRuntimeDescriptorArrayEXT = 5302, SpvCapabilityRuntimeDescriptorArrayEXT = 5302,
SpvCapabilityInputAttachmentArrayDynamicIndexing = 5303,
SpvCapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, SpvCapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
SpvCapabilityUniformTexelBufferArrayDynamicIndexing = 5304,
SpvCapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, SpvCapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
SpvCapabilityStorageTexelBufferArrayDynamicIndexing = 5305,
SpvCapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, SpvCapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
SpvCapabilityUniformBufferArrayNonUniformIndexing = 5306,
SpvCapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, SpvCapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
SpvCapabilitySampledImageArrayNonUniformIndexing = 5307,
SpvCapabilitySampledImageArrayNonUniformIndexingEXT = 5307, SpvCapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
SpvCapabilityStorageBufferArrayNonUniformIndexing = 5308,
SpvCapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, SpvCapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
SpvCapabilityStorageImageArrayNonUniformIndexing = 5309,
SpvCapabilityStorageImageArrayNonUniformIndexingEXT = 5309, SpvCapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
SpvCapabilityInputAttachmentArrayNonUniformIndexing = 5310,
SpvCapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, SpvCapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
SpvCapabilityUniformTexelBufferArrayNonUniformIndexing = 5311,
SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
SpvCapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
SpvCapabilityRayTracingNV = 5340, SpvCapabilityRayTracingNV = 5340,
SpvCapabilityVulkanMemoryModel = 5345,
SpvCapabilityVulkanMemoryModelKHR = 5345, SpvCapabilityVulkanMemoryModelKHR = 5345,
SpvCapabilityVulkanMemoryModelDeviceScope = 5346,
SpvCapabilityVulkanMemoryModelDeviceScopeKHR = 5346, SpvCapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
SpvCapabilityPhysicalStorageBufferAddresses = 5347,
SpvCapabilityPhysicalStorageBufferAddressesEXT = 5347, SpvCapabilityPhysicalStorageBufferAddressesEXT = 5347,
SpvCapabilityComputeDerivativeGroupLinearNV = 5350, SpvCapabilityComputeDerivativeGroupLinearNV = 5350,
SpvCapabilityCooperativeMatrixNV = 5357, SpvCapabilityCooperativeMatrixNV = 5357,
......
...@@ -49,11 +49,11 @@ namespace spv { ...@@ -49,11 +49,11 @@ namespace spv {
typedef unsigned int Id; typedef unsigned int Id;
#define SPV_VERSION 0x10400 #define SPV_VERSION 0x10500
#define SPV_REVISION 1 #define SPV_REVISION 1
static const unsigned int MagicNumber = 0x07230203; static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 0x00010400; static const unsigned int Version = 0x00010500;
static const unsigned int Revision = 1; static const unsigned int Revision = 1;
static const unsigned int OpCodeMask = 0xffff; static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16; static const unsigned int WordCountShift = 16;
...@@ -91,6 +91,7 @@ enum AddressingModel { ...@@ -91,6 +91,7 @@ enum AddressingModel {
AddressingModelLogical = 0, AddressingModelLogical = 0,
AddressingModelPhysical32 = 1, AddressingModelPhysical32 = 1,
AddressingModelPhysical64 = 2, AddressingModelPhysical64 = 2,
AddressingModelPhysicalStorageBuffer64 = 5348,
AddressingModelPhysicalStorageBuffer64EXT = 5348, AddressingModelPhysicalStorageBuffer64EXT = 5348,
AddressingModelMax = 0x7fffffff, AddressingModelMax = 0x7fffffff,
}; };
...@@ -99,6 +100,7 @@ enum MemoryModel { ...@@ -99,6 +100,7 @@ enum MemoryModel {
MemoryModelSimple = 0, MemoryModelSimple = 0,
MemoryModelGLSL450 = 1, MemoryModelGLSL450 = 1,
MemoryModelOpenCL = 2, MemoryModelOpenCL = 2,
MemoryModelVulkan = 3,
MemoryModelVulkanKHR = 3, MemoryModelVulkanKHR = 3,
MemoryModelMax = 0x7fffffff, MemoryModelMax = 0x7fffffff,
}; };
...@@ -183,6 +185,7 @@ enum StorageClass { ...@@ -183,6 +185,7 @@ enum StorageClass {
StorageClassHitAttributeNV = 5339, StorageClassHitAttributeNV = 5339,
StorageClassIncomingRayPayloadNV = 5342, StorageClassIncomingRayPayloadNV = 5342,
StorageClassShaderRecordBufferNV = 5343, StorageClassShaderRecordBufferNV = 5343,
StorageClassPhysicalStorageBuffer = 5349,
StorageClassPhysicalStorageBufferEXT = 5349, StorageClassPhysicalStorageBufferEXT = 5349,
StorageClassMax = 0x7fffffff, StorageClassMax = 0x7fffffff,
}; };
...@@ -311,9 +314,13 @@ enum ImageOperandsShift { ...@@ -311,9 +314,13 @@ enum ImageOperandsShift {
ImageOperandsConstOffsetsShift = 5, ImageOperandsConstOffsetsShift = 5,
ImageOperandsSampleShift = 6, ImageOperandsSampleShift = 6,
ImageOperandsMinLodShift = 7, ImageOperandsMinLodShift = 7,
ImageOperandsMakeTexelAvailableShift = 8,
ImageOperandsMakeTexelAvailableKHRShift = 8, ImageOperandsMakeTexelAvailableKHRShift = 8,
ImageOperandsMakeTexelVisibleShift = 9,
ImageOperandsMakeTexelVisibleKHRShift = 9, ImageOperandsMakeTexelVisibleKHRShift = 9,
ImageOperandsNonPrivateTexelShift = 10,
ImageOperandsNonPrivateTexelKHRShift = 10, ImageOperandsNonPrivateTexelKHRShift = 10,
ImageOperandsVolatileTexelShift = 11,
ImageOperandsVolatileTexelKHRShift = 11, ImageOperandsVolatileTexelKHRShift = 11,
ImageOperandsSignExtendShift = 12, ImageOperandsSignExtendShift = 12,
ImageOperandsZeroExtendShift = 13, ImageOperandsZeroExtendShift = 13,
...@@ -330,9 +337,13 @@ enum ImageOperandsMask { ...@@ -330,9 +337,13 @@ enum ImageOperandsMask {
ImageOperandsConstOffsetsMask = 0x00000020, ImageOperandsConstOffsetsMask = 0x00000020,
ImageOperandsSampleMask = 0x00000040, ImageOperandsSampleMask = 0x00000040,
ImageOperandsMinLodMask = 0x00000080, ImageOperandsMinLodMask = 0x00000080,
ImageOperandsMakeTexelAvailableMask = 0x00000100,
ImageOperandsMakeTexelAvailableKHRMask = 0x00000100, ImageOperandsMakeTexelAvailableKHRMask = 0x00000100,
ImageOperandsMakeTexelVisibleMask = 0x00000200,
ImageOperandsMakeTexelVisibleKHRMask = 0x00000200, ImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
ImageOperandsNonPrivateTexelMask = 0x00000400,
ImageOperandsNonPrivateTexelKHRMask = 0x00000400, ImageOperandsNonPrivateTexelKHRMask = 0x00000400,
ImageOperandsVolatileTexelMask = 0x00000800,
ImageOperandsVolatileTexelKHRMask = 0x00000800, ImageOperandsVolatileTexelKHRMask = 0x00000800,
ImageOperandsSignExtendMask = 0x00001000, ImageOperandsSignExtendMask = 0x00001000,
ImageOperandsZeroExtendMask = 0x00002000, ImageOperandsZeroExtendMask = 0x00002000,
...@@ -448,8 +459,11 @@ enum Decoration { ...@@ -448,8 +459,11 @@ enum Decoration {
DecorationPerViewNV = 5272, DecorationPerViewNV = 5272,
DecorationPerTaskNV = 5273, DecorationPerTaskNV = 5273,
DecorationPerVertexNV = 5285, DecorationPerVertexNV = 5285,
DecorationNonUniform = 5300,
DecorationNonUniformEXT = 5300, DecorationNonUniformEXT = 5300,
DecorationRestrictPointer = 5355,
DecorationRestrictPointerEXT = 5355, DecorationRestrictPointerEXT = 5355,
DecorationAliasedPointer = 5356,
DecorationAliasedPointerEXT = 5356, DecorationAliasedPointerEXT = 5356,
DecorationCounterBuffer = 5634, DecorationCounterBuffer = 5634,
DecorationHlslCounterBufferGOOGLE = 5634, DecorationHlslCounterBufferGOOGLE = 5634,
...@@ -630,8 +644,11 @@ enum MemorySemanticsShift { ...@@ -630,8 +644,11 @@ enum MemorySemanticsShift {
MemorySemanticsCrossWorkgroupMemoryShift = 9, MemorySemanticsCrossWorkgroupMemoryShift = 9,
MemorySemanticsAtomicCounterMemoryShift = 10, MemorySemanticsAtomicCounterMemoryShift = 10,
MemorySemanticsImageMemoryShift = 11, MemorySemanticsImageMemoryShift = 11,
MemorySemanticsOutputMemoryShift = 12,
MemorySemanticsOutputMemoryKHRShift = 12, MemorySemanticsOutputMemoryKHRShift = 12,
MemorySemanticsMakeAvailableShift = 13,
MemorySemanticsMakeAvailableKHRShift = 13, MemorySemanticsMakeAvailableKHRShift = 13,
MemorySemanticsMakeVisibleShift = 14,
MemorySemanticsMakeVisibleKHRShift = 14, MemorySemanticsMakeVisibleKHRShift = 14,
MemorySemanticsVolatileShift = 15, MemorySemanticsVolatileShift = 15,
MemorySemanticsMax = 0x7fffffff, MemorySemanticsMax = 0x7fffffff,
...@@ -649,8 +666,11 @@ enum MemorySemanticsMask { ...@@ -649,8 +666,11 @@ enum MemorySemanticsMask {
MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
MemorySemanticsAtomicCounterMemoryMask = 0x00000400, MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
MemorySemanticsImageMemoryMask = 0x00000800, MemorySemanticsImageMemoryMask = 0x00000800,
MemorySemanticsOutputMemoryMask = 0x00001000,
MemorySemanticsOutputMemoryKHRMask = 0x00001000, MemorySemanticsOutputMemoryKHRMask = 0x00001000,
MemorySemanticsMakeAvailableMask = 0x00002000,
MemorySemanticsMakeAvailableKHRMask = 0x00002000, MemorySemanticsMakeAvailableKHRMask = 0x00002000,
MemorySemanticsMakeVisibleMask = 0x00004000,
MemorySemanticsMakeVisibleKHRMask = 0x00004000, MemorySemanticsMakeVisibleKHRMask = 0x00004000,
MemorySemanticsVolatileMask = 0x00008000, MemorySemanticsVolatileMask = 0x00008000,
}; };
...@@ -659,8 +679,11 @@ enum MemoryAccessShift { ...@@ -659,8 +679,11 @@ enum MemoryAccessShift {
MemoryAccessVolatileShift = 0, MemoryAccessVolatileShift = 0,
MemoryAccessAlignedShift = 1, MemoryAccessAlignedShift = 1,
MemoryAccessNontemporalShift = 2, MemoryAccessNontemporalShift = 2,
MemoryAccessMakePointerAvailableShift = 3,
MemoryAccessMakePointerAvailableKHRShift = 3, MemoryAccessMakePointerAvailableKHRShift = 3,
MemoryAccessMakePointerVisibleShift = 4,
MemoryAccessMakePointerVisibleKHRShift = 4, MemoryAccessMakePointerVisibleKHRShift = 4,
MemoryAccessNonPrivatePointerShift = 5,
MemoryAccessNonPrivatePointerKHRShift = 5, MemoryAccessNonPrivatePointerKHRShift = 5,
MemoryAccessMax = 0x7fffffff, MemoryAccessMax = 0x7fffffff,
}; };
...@@ -670,8 +693,11 @@ enum MemoryAccessMask { ...@@ -670,8 +693,11 @@ enum MemoryAccessMask {
MemoryAccessVolatileMask = 0x00000001, MemoryAccessVolatileMask = 0x00000001,
MemoryAccessAlignedMask = 0x00000002, MemoryAccessAlignedMask = 0x00000002,
MemoryAccessNontemporalMask = 0x00000004, MemoryAccessNontemporalMask = 0x00000004,
MemoryAccessMakePointerAvailableMask = 0x00000008,
MemoryAccessMakePointerAvailableKHRMask = 0x00000008, MemoryAccessMakePointerAvailableKHRMask = 0x00000008,
MemoryAccessMakePointerVisibleMask = 0x00000010,
MemoryAccessMakePointerVisibleKHRMask = 0x00000010, MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
MemoryAccessNonPrivatePointerMask = 0x00000020,
MemoryAccessNonPrivatePointerKHRMask = 0x00000020, MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
}; };
...@@ -681,6 +707,7 @@ enum Scope { ...@@ -681,6 +707,7 @@ enum Scope {
ScopeWorkgroup = 2, ScopeWorkgroup = 2,
ScopeSubgroup = 3, ScopeSubgroup = 3,
ScopeInvocation = 4, ScopeInvocation = 4,
ScopeQueueFamily = 5,
ScopeQueueFamilyKHR = 5, ScopeQueueFamilyKHR = 5,
ScopeMax = 0x7fffffff, ScopeMax = 0x7fffffff,
}; };
...@@ -781,6 +808,8 @@ enum Capability { ...@@ -781,6 +808,8 @@ enum Capability {
CapabilityGroupNonUniformShuffleRelative = 66, CapabilityGroupNonUniformShuffleRelative = 66,
CapabilityGroupNonUniformClustered = 67, CapabilityGroupNonUniformClustered = 67,
CapabilityGroupNonUniformQuad = 68, CapabilityGroupNonUniformQuad = 68,
CapabilityShaderLayer = 69,
CapabilityShaderViewportIndex = 70,
CapabilitySubgroupBallotKHR = 4423, CapabilitySubgroupBallotKHR = 4423,
CapabilityDrawParameters = 4427, CapabilityDrawParameters = 4427,
CapabilitySubgroupVoteKHR = 4431, CapabilitySubgroupVoteKHR = 4431,
...@@ -825,21 +854,36 @@ enum Capability { ...@@ -825,21 +854,36 @@ enum Capability {
CapabilityFragmentDensityEXT = 5291, CapabilityFragmentDensityEXT = 5291,
CapabilityShadingRateNV = 5291, CapabilityShadingRateNV = 5291,
CapabilityGroupNonUniformPartitionedNV = 5297, CapabilityGroupNonUniformPartitionedNV = 5297,
CapabilityShaderNonUniform = 5301,
CapabilityShaderNonUniformEXT = 5301, CapabilityShaderNonUniformEXT = 5301,
CapabilityRuntimeDescriptorArray = 5302,
CapabilityRuntimeDescriptorArrayEXT = 5302, CapabilityRuntimeDescriptorArrayEXT = 5302,
CapabilityInputAttachmentArrayDynamicIndexing = 5303,
CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
CapabilityUniformTexelBufferArrayDynamicIndexing = 5304,
CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
CapabilityStorageTexelBufferArrayDynamicIndexing = 5305,
CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
CapabilityUniformBufferArrayNonUniformIndexing = 5306,
CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
CapabilitySampledImageArrayNonUniformIndexing = 5307,
CapabilitySampledImageArrayNonUniformIndexingEXT = 5307, CapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
CapabilityStorageBufferArrayNonUniformIndexing = 5308,
CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
CapabilityStorageImageArrayNonUniformIndexing = 5309,
CapabilityStorageImageArrayNonUniformIndexingEXT = 5309, CapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
CapabilityInputAttachmentArrayNonUniformIndexing = 5310,
CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311,
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
CapabilityRayTracingNV = 5340, CapabilityRayTracingNV = 5340,
CapabilityVulkanMemoryModel = 5345,
CapabilityVulkanMemoryModelKHR = 5345, CapabilityVulkanMemoryModelKHR = 5345,
CapabilityVulkanMemoryModelDeviceScope = 5346,
CapabilityVulkanMemoryModelDeviceScopeKHR = 5346, CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
CapabilityPhysicalStorageBufferAddresses = 5347,
CapabilityPhysicalStorageBufferAddressesEXT = 5347, CapabilityPhysicalStorageBufferAddressesEXT = 5347,
CapabilityComputeDerivativeGroupLinearNV = 5350, CapabilityComputeDerivativeGroupLinearNV = 5350,
CapabilityCooperativeMatrixNV = 5357, CapabilityCooperativeMatrixNV = 5357,
......
...@@ -49,11 +49,11 @@ namespace spv { ...@@ -49,11 +49,11 @@ namespace spv {
typedef unsigned int Id; typedef unsigned int Id;
#define SPV_VERSION 0x10400 #define SPV_VERSION 0x10500
#define SPV_REVISION 1 #define SPV_REVISION 1
static const unsigned int MagicNumber = 0x07230203; static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 0x00010400; static const unsigned int Version = 0x00010500;
static const unsigned int Revision = 1; static const unsigned int Revision = 1;
static const unsigned int OpCodeMask = 0xffff; static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16; static const unsigned int WordCountShift = 16;
...@@ -91,6 +91,7 @@ enum class AddressingModel : unsigned { ...@@ -91,6 +91,7 @@ enum class AddressingModel : unsigned {
Logical = 0, Logical = 0,
Physical32 = 1, Physical32 = 1,
Physical64 = 2, Physical64 = 2,
PhysicalStorageBuffer64 = 5348,
PhysicalStorageBuffer64EXT = 5348, PhysicalStorageBuffer64EXT = 5348,
Max = 0x7fffffff, Max = 0x7fffffff,
}; };
...@@ -99,6 +100,7 @@ enum class MemoryModel : unsigned { ...@@ -99,6 +100,7 @@ enum class MemoryModel : unsigned {
Simple = 0, Simple = 0,
GLSL450 = 1, GLSL450 = 1,
OpenCL = 2, OpenCL = 2,
Vulkan = 3,
VulkanKHR = 3, VulkanKHR = 3,
Max = 0x7fffffff, Max = 0x7fffffff,
}; };
...@@ -183,6 +185,7 @@ enum class StorageClass : unsigned { ...@@ -183,6 +185,7 @@ enum class StorageClass : unsigned {
HitAttributeNV = 5339, HitAttributeNV = 5339,
IncomingRayPayloadNV = 5342, IncomingRayPayloadNV = 5342,
ShaderRecordBufferNV = 5343, ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349, PhysicalStorageBufferEXT = 5349,
Max = 0x7fffffff, Max = 0x7fffffff,
}; };
...@@ -311,9 +314,13 @@ enum class ImageOperandsShift : unsigned { ...@@ -311,9 +314,13 @@ enum class ImageOperandsShift : unsigned {
ConstOffsets = 5, ConstOffsets = 5,
Sample = 6, Sample = 6,
MinLod = 7, MinLod = 7,
MakeTexelAvailable = 8,
MakeTexelAvailableKHR = 8, MakeTexelAvailableKHR = 8,
MakeTexelVisible = 9,
MakeTexelVisibleKHR = 9, MakeTexelVisibleKHR = 9,
NonPrivateTexel = 10,
NonPrivateTexelKHR = 10, NonPrivateTexelKHR = 10,
VolatileTexel = 11,
VolatileTexelKHR = 11, VolatileTexelKHR = 11,
SignExtend = 12, SignExtend = 12,
ZeroExtend = 13, ZeroExtend = 13,
...@@ -330,9 +337,13 @@ enum class ImageOperandsMask : unsigned { ...@@ -330,9 +337,13 @@ enum class ImageOperandsMask : unsigned {
ConstOffsets = 0x00000020, ConstOffsets = 0x00000020,
Sample = 0x00000040, Sample = 0x00000040,
MinLod = 0x00000080, MinLod = 0x00000080,
MakeTexelAvailable = 0x00000100,
MakeTexelAvailableKHR = 0x00000100, MakeTexelAvailableKHR = 0x00000100,
MakeTexelVisible = 0x00000200,
MakeTexelVisibleKHR = 0x00000200, MakeTexelVisibleKHR = 0x00000200,
NonPrivateTexel = 0x00000400,
NonPrivateTexelKHR = 0x00000400, NonPrivateTexelKHR = 0x00000400,
VolatileTexel = 0x00000800,
VolatileTexelKHR = 0x00000800, VolatileTexelKHR = 0x00000800,
SignExtend = 0x00001000, SignExtend = 0x00001000,
ZeroExtend = 0x00002000, ZeroExtend = 0x00002000,
...@@ -448,8 +459,11 @@ enum class Decoration : unsigned { ...@@ -448,8 +459,11 @@ enum class Decoration : unsigned {
PerViewNV = 5272, PerViewNV = 5272,
PerTaskNV = 5273, PerTaskNV = 5273,
PerVertexNV = 5285, PerVertexNV = 5285,
NonUniform = 5300,
NonUniformEXT = 5300, NonUniformEXT = 5300,
RestrictPointer = 5355,
RestrictPointerEXT = 5355, RestrictPointerEXT = 5355,
AliasedPointer = 5356,
AliasedPointerEXT = 5356, AliasedPointerEXT = 5356,
CounterBuffer = 5634, CounterBuffer = 5634,
HlslCounterBufferGOOGLE = 5634, HlslCounterBufferGOOGLE = 5634,
...@@ -630,8 +644,11 @@ enum class MemorySemanticsShift : unsigned { ...@@ -630,8 +644,11 @@ enum class MemorySemanticsShift : unsigned {
CrossWorkgroupMemory = 9, CrossWorkgroupMemory = 9,
AtomicCounterMemory = 10, AtomicCounterMemory = 10,
ImageMemory = 11, ImageMemory = 11,
OutputMemory = 12,
OutputMemoryKHR = 12, OutputMemoryKHR = 12,
MakeAvailable = 13,
MakeAvailableKHR = 13, MakeAvailableKHR = 13,
MakeVisible = 14,
MakeVisibleKHR = 14, MakeVisibleKHR = 14,
Volatile = 15, Volatile = 15,
Max = 0x7fffffff, Max = 0x7fffffff,
...@@ -649,8 +666,11 @@ enum class MemorySemanticsMask : unsigned { ...@@ -649,8 +666,11 @@ enum class MemorySemanticsMask : unsigned {
CrossWorkgroupMemory = 0x00000200, CrossWorkgroupMemory = 0x00000200,
AtomicCounterMemory = 0x00000400, AtomicCounterMemory = 0x00000400,
ImageMemory = 0x00000800, ImageMemory = 0x00000800,
OutputMemory = 0x00001000,
OutputMemoryKHR = 0x00001000, OutputMemoryKHR = 0x00001000,
MakeAvailable = 0x00002000,
MakeAvailableKHR = 0x00002000, MakeAvailableKHR = 0x00002000,
MakeVisible = 0x00004000,
MakeVisibleKHR = 0x00004000, MakeVisibleKHR = 0x00004000,
Volatile = 0x00008000, Volatile = 0x00008000,
}; };
...@@ -659,8 +679,11 @@ enum class MemoryAccessShift : unsigned { ...@@ -659,8 +679,11 @@ enum class MemoryAccessShift : unsigned {
Volatile = 0, Volatile = 0,
Aligned = 1, Aligned = 1,
Nontemporal = 2, Nontemporal = 2,
MakePointerAvailable = 3,
MakePointerAvailableKHR = 3, MakePointerAvailableKHR = 3,
MakePointerVisible = 4,
MakePointerVisibleKHR = 4, MakePointerVisibleKHR = 4,
NonPrivatePointer = 5,
NonPrivatePointerKHR = 5, NonPrivatePointerKHR = 5,
Max = 0x7fffffff, Max = 0x7fffffff,
}; };
...@@ -670,8 +693,11 @@ enum class MemoryAccessMask : unsigned { ...@@ -670,8 +693,11 @@ enum class MemoryAccessMask : unsigned {
Volatile = 0x00000001, Volatile = 0x00000001,
Aligned = 0x00000002, Aligned = 0x00000002,
Nontemporal = 0x00000004, Nontemporal = 0x00000004,
MakePointerAvailable = 0x00000008,
MakePointerAvailableKHR = 0x00000008, MakePointerAvailableKHR = 0x00000008,
MakePointerVisible = 0x00000010,
MakePointerVisibleKHR = 0x00000010, MakePointerVisibleKHR = 0x00000010,
NonPrivatePointer = 0x00000020,
NonPrivatePointerKHR = 0x00000020, NonPrivatePointerKHR = 0x00000020,
}; };
...@@ -681,6 +707,7 @@ enum class Scope : unsigned { ...@@ -681,6 +707,7 @@ enum class Scope : unsigned {
Workgroup = 2, Workgroup = 2,
Subgroup = 3, Subgroup = 3,
Invocation = 4, Invocation = 4,
QueueFamily = 5,
QueueFamilyKHR = 5, QueueFamilyKHR = 5,
Max = 0x7fffffff, Max = 0x7fffffff,
}; };
...@@ -781,6 +808,8 @@ enum class Capability : unsigned { ...@@ -781,6 +808,8 @@ enum class Capability : unsigned {
GroupNonUniformShuffleRelative = 66, GroupNonUniformShuffleRelative = 66,
GroupNonUniformClustered = 67, GroupNonUniformClustered = 67,
GroupNonUniformQuad = 68, GroupNonUniformQuad = 68,
ShaderLayer = 69,
ShaderViewportIndex = 70,
SubgroupBallotKHR = 4423, SubgroupBallotKHR = 4423,
DrawParameters = 4427, DrawParameters = 4427,
SubgroupVoteKHR = 4431, SubgroupVoteKHR = 4431,
...@@ -825,21 +854,36 @@ enum class Capability : unsigned { ...@@ -825,21 +854,36 @@ enum class Capability : unsigned {
FragmentDensityEXT = 5291, FragmentDensityEXT = 5291,
ShadingRateNV = 5291, ShadingRateNV = 5291,
GroupNonUniformPartitionedNV = 5297, GroupNonUniformPartitionedNV = 5297,
ShaderNonUniform = 5301,
ShaderNonUniformEXT = 5301, ShaderNonUniformEXT = 5301,
RuntimeDescriptorArray = 5302,
RuntimeDescriptorArrayEXT = 5302, RuntimeDescriptorArrayEXT = 5302,
InputAttachmentArrayDynamicIndexing = 5303,
InputAttachmentArrayDynamicIndexingEXT = 5303, InputAttachmentArrayDynamicIndexingEXT = 5303,
UniformTexelBufferArrayDynamicIndexing = 5304,
UniformTexelBufferArrayDynamicIndexingEXT = 5304, UniformTexelBufferArrayDynamicIndexingEXT = 5304,
StorageTexelBufferArrayDynamicIndexing = 5305,
StorageTexelBufferArrayDynamicIndexingEXT = 5305, StorageTexelBufferArrayDynamicIndexingEXT = 5305,
UniformBufferArrayNonUniformIndexing = 5306,
UniformBufferArrayNonUniformIndexingEXT = 5306, UniformBufferArrayNonUniformIndexingEXT = 5306,
SampledImageArrayNonUniformIndexing = 5307,
SampledImageArrayNonUniformIndexingEXT = 5307, SampledImageArrayNonUniformIndexingEXT = 5307,
StorageBufferArrayNonUniformIndexing = 5308,
StorageBufferArrayNonUniformIndexingEXT = 5308, StorageBufferArrayNonUniformIndexingEXT = 5308,
StorageImageArrayNonUniformIndexing = 5309,
StorageImageArrayNonUniformIndexingEXT = 5309, StorageImageArrayNonUniformIndexingEXT = 5309,
InputAttachmentArrayNonUniformIndexing = 5310,
InputAttachmentArrayNonUniformIndexingEXT = 5310, InputAttachmentArrayNonUniformIndexingEXT = 5310,
UniformTexelBufferArrayNonUniformIndexing = 5311,
UniformTexelBufferArrayNonUniformIndexingEXT = 5311, UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
RayTracingNV = 5340, RayTracingNV = 5340,
VulkanMemoryModel = 5345,
VulkanMemoryModelKHR = 5345, VulkanMemoryModelKHR = 5345,
VulkanMemoryModelDeviceScope = 5346,
VulkanMemoryModelDeviceScopeKHR = 5346, VulkanMemoryModelDeviceScopeKHR = 5346,
PhysicalStorageBufferAddresses = 5347,
PhysicalStorageBufferAddressesEXT = 5347, PhysicalStorageBufferAddressesEXT = 5347,
ComputeDerivativeGroupLinearNV = 5350, ComputeDerivativeGroupLinearNV = 5350,
CooperativeMatrixNV = 5357, CooperativeMatrixNV = 5357,
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
] ]
], ],
"MagicNumber": 119734787, "MagicNumber": 119734787,
"Version": 66560, "Version": 66816,
"Revision": 1, "Revision": 1,
"OpCodeMask": 65535, "OpCodeMask": 65535,
"WordCountShift": 16 "WordCountShift": 16
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
"Logical": 0, "Logical": 0,
"Physical32": 1, "Physical32": 1,
"Physical64": 2, "Physical64": 2,
"PhysicalStorageBuffer64": 5348,
"PhysicalStorageBuffer64EXT": 5348 "PhysicalStorageBuffer64EXT": 5348
} }
}, },
...@@ -115,6 +116,7 @@ ...@@ -115,6 +116,7 @@
"Simple": 0, "Simple": 0,
"GLSL450": 1, "GLSL450": 1,
"OpenCL": 2, "OpenCL": 2,
"Vulkan": 3,
"VulkanKHR": 3 "VulkanKHR": 3
} }
}, },
...@@ -205,6 +207,7 @@ ...@@ -205,6 +207,7 @@
"HitAttributeNV": 5339, "HitAttributeNV": 5339,
"IncomingRayPayloadNV": 5342, "IncomingRayPayloadNV": 5342,
"ShaderRecordBufferNV": 5343, "ShaderRecordBufferNV": 5343,
"PhysicalStorageBuffer": 5349,
"PhysicalStorageBufferEXT": 5349 "PhysicalStorageBufferEXT": 5349
} }
}, },
...@@ -354,9 +357,13 @@ ...@@ -354,9 +357,13 @@
"ConstOffsets": 5, "ConstOffsets": 5,
"Sample": 6, "Sample": 6,
"MinLod": 7, "MinLod": 7,
"MakeTexelAvailable": 8,
"MakeTexelAvailableKHR": 8, "MakeTexelAvailableKHR": 8,
"MakeTexelVisible": 9,
"MakeTexelVisibleKHR": 9, "MakeTexelVisibleKHR": 9,
"NonPrivateTexel": 10,
"NonPrivateTexelKHR": 10, "NonPrivateTexelKHR": 10,
"VolatileTexel": 11,
"VolatileTexelKHR": 11, "VolatileTexelKHR": 11,
"SignExtend": 12, "SignExtend": 12,
"ZeroExtend": 13 "ZeroExtend": 13
...@@ -482,8 +489,11 @@ ...@@ -482,8 +489,11 @@
"PerViewNV": 5272, "PerViewNV": 5272,
"PerTaskNV": 5273, "PerTaskNV": 5273,
"PerVertexNV": 5285, "PerVertexNV": 5285,
"NonUniform": 5300,
"NonUniformEXT": 5300, "NonUniformEXT": 5300,
"RestrictPointer": 5355,
"RestrictPointerEXT": 5355, "RestrictPointerEXT": 5355,
"AliasedPointer": 5356,
"AliasedPointerEXT": 5356, "AliasedPointerEXT": 5356,
"CounterBuffer": 5634, "CounterBuffer": 5634,
"HlslCounterBufferGOOGLE": 5634, "HlslCounterBufferGOOGLE": 5634,
...@@ -652,8 +662,11 @@ ...@@ -652,8 +662,11 @@
"CrossWorkgroupMemory": 9, "CrossWorkgroupMemory": 9,
"AtomicCounterMemory": 10, "AtomicCounterMemory": 10,
"ImageMemory": 11, "ImageMemory": 11,
"OutputMemory": 12,
"OutputMemoryKHR": 12, "OutputMemoryKHR": 12,
"MakeAvailable": 13,
"MakeAvailableKHR": 13, "MakeAvailableKHR": 13,
"MakeVisible": 14,
"MakeVisibleKHR": 14, "MakeVisibleKHR": 14,
"Volatile": 15 "Volatile": 15
} }
...@@ -666,8 +679,11 @@ ...@@ -666,8 +679,11 @@
"Volatile": 0, "Volatile": 0,
"Aligned": 1, "Aligned": 1,
"Nontemporal": 2, "Nontemporal": 2,
"MakePointerAvailable": 3,
"MakePointerAvailableKHR": 3, "MakePointerAvailableKHR": 3,
"MakePointerVisible": 4,
"MakePointerVisibleKHR": 4, "MakePointerVisibleKHR": 4,
"NonPrivatePointer": 5,
"NonPrivatePointerKHR": 5 "NonPrivatePointerKHR": 5
} }
}, },
...@@ -681,6 +697,7 @@ ...@@ -681,6 +697,7 @@
"Workgroup": 2, "Workgroup": 2,
"Subgroup": 3, "Subgroup": 3,
"Invocation": 4, "Invocation": 4,
"QueueFamily": 5,
"QueueFamilyKHR": 5 "QueueFamilyKHR": 5
} }
}, },
...@@ -788,6 +805,8 @@ ...@@ -788,6 +805,8 @@
"GroupNonUniformShuffleRelative": 66, "GroupNonUniformShuffleRelative": 66,
"GroupNonUniformClustered": 67, "GroupNonUniformClustered": 67,
"GroupNonUniformQuad": 68, "GroupNonUniformQuad": 68,
"ShaderLayer": 69,
"ShaderViewportIndex": 70,
"SubgroupBallotKHR": 4423, "SubgroupBallotKHR": 4423,
"DrawParameters": 4427, "DrawParameters": 4427,
"SubgroupVoteKHR": 4431, "SubgroupVoteKHR": 4431,
...@@ -832,21 +851,36 @@ ...@@ -832,21 +851,36 @@
"FragmentDensityEXT": 5291, "FragmentDensityEXT": 5291,
"ShadingRateNV": 5291, "ShadingRateNV": 5291,
"GroupNonUniformPartitionedNV": 5297, "GroupNonUniformPartitionedNV": 5297,
"ShaderNonUniform": 5301,
"ShaderNonUniformEXT": 5301, "ShaderNonUniformEXT": 5301,
"RuntimeDescriptorArray": 5302,
"RuntimeDescriptorArrayEXT": 5302, "RuntimeDescriptorArrayEXT": 5302,
"InputAttachmentArrayDynamicIndexing": 5303,
"InputAttachmentArrayDynamicIndexingEXT": 5303, "InputAttachmentArrayDynamicIndexingEXT": 5303,
"UniformTexelBufferArrayDynamicIndexing": 5304,
"UniformTexelBufferArrayDynamicIndexingEXT": 5304, "UniformTexelBufferArrayDynamicIndexingEXT": 5304,
"StorageTexelBufferArrayDynamicIndexing": 5305,
"StorageTexelBufferArrayDynamicIndexingEXT": 5305, "StorageTexelBufferArrayDynamicIndexingEXT": 5305,
"UniformBufferArrayNonUniformIndexing": 5306,
"UniformBufferArrayNonUniformIndexingEXT": 5306, "UniformBufferArrayNonUniformIndexingEXT": 5306,
"SampledImageArrayNonUniformIndexing": 5307,
"SampledImageArrayNonUniformIndexingEXT": 5307, "SampledImageArrayNonUniformIndexingEXT": 5307,
"StorageBufferArrayNonUniformIndexing": 5308,
"StorageBufferArrayNonUniformIndexingEXT": 5308, "StorageBufferArrayNonUniformIndexingEXT": 5308,
"StorageImageArrayNonUniformIndexing": 5309,
"StorageImageArrayNonUniformIndexingEXT": 5309, "StorageImageArrayNonUniformIndexingEXT": 5309,
"InputAttachmentArrayNonUniformIndexing": 5310,
"InputAttachmentArrayNonUniformIndexingEXT": 5310, "InputAttachmentArrayNonUniformIndexingEXT": 5310,
"UniformTexelBufferArrayNonUniformIndexing": 5311,
"UniformTexelBufferArrayNonUniformIndexingEXT": 5311, "UniformTexelBufferArrayNonUniformIndexingEXT": 5311,
"StorageTexelBufferArrayNonUniformIndexing": 5312,
"StorageTexelBufferArrayNonUniformIndexingEXT": 5312, "StorageTexelBufferArrayNonUniformIndexingEXT": 5312,
"RayTracingNV": 5340, "RayTracingNV": 5340,
"VulkanMemoryModel": 5345,
"VulkanMemoryModelKHR": 5345, "VulkanMemoryModelKHR": 5345,
"VulkanMemoryModelDeviceScope": 5346,
"VulkanMemoryModelDeviceScopeKHR": 5346, "VulkanMemoryModelDeviceScopeKHR": 5346,
"PhysicalStorageBufferAddresses": 5347,
"PhysicalStorageBufferAddressesEXT": 5347, "PhysicalStorageBufferAddressesEXT": 5347,
"ComputeDerivativeGroupLinearNV": 5350, "ComputeDerivativeGroupLinearNV": 5350,
"CooperativeMatrixNV": 5357, "CooperativeMatrixNV": 5357,
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
spv = { spv = {
MagicNumber = 0x07230203, MagicNumber = 0x07230203,
Version = 0x00010400, Version = 0x00010500,
Revision = 1, Revision = 1,
OpCodeMask = 0xffff, OpCodeMask = 0xffff,
WordCountShift = 16, WordCountShift = 16,
...@@ -80,6 +80,7 @@ spv = { ...@@ -80,6 +80,7 @@ spv = {
Logical = 0, Logical = 0,
Physical32 = 1, Physical32 = 1,
Physical64 = 2, Physical64 = 2,
PhysicalStorageBuffer64 = 5348,
PhysicalStorageBuffer64EXT = 5348, PhysicalStorageBuffer64EXT = 5348,
}, },
...@@ -87,6 +88,7 @@ spv = { ...@@ -87,6 +88,7 @@ spv = {
Simple = 0, Simple = 0,
GLSL450 = 1, GLSL450 = 1,
OpenCL = 2, OpenCL = 2,
Vulkan = 3,
VulkanKHR = 3, VulkanKHR = 3,
}, },
...@@ -169,6 +171,7 @@ spv = { ...@@ -169,6 +171,7 @@ spv = {
HitAttributeNV = 5339, HitAttributeNV = 5339,
IncomingRayPayloadNV = 5342, IncomingRayPayloadNV = 5342,
ShaderRecordBufferNV = 5343, ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349, PhysicalStorageBufferEXT = 5349,
}, },
...@@ -290,9 +293,13 @@ spv = { ...@@ -290,9 +293,13 @@ spv = {
ConstOffsets = 5, ConstOffsets = 5,
Sample = 6, Sample = 6,
MinLod = 7, MinLod = 7,
MakeTexelAvailable = 8,
MakeTexelAvailableKHR = 8, MakeTexelAvailableKHR = 8,
MakeTexelVisible = 9,
MakeTexelVisibleKHR = 9, MakeTexelVisibleKHR = 9,
NonPrivateTexel = 10,
NonPrivateTexelKHR = 10, NonPrivateTexelKHR = 10,
VolatileTexel = 11,
VolatileTexelKHR = 11, VolatileTexelKHR = 11,
SignExtend = 12, SignExtend = 12,
ZeroExtend = 13, ZeroExtend = 13,
...@@ -308,9 +315,13 @@ spv = { ...@@ -308,9 +315,13 @@ spv = {
ConstOffsets = 0x00000020, ConstOffsets = 0x00000020,
Sample = 0x00000040, Sample = 0x00000040,
MinLod = 0x00000080, MinLod = 0x00000080,
MakeTexelAvailable = 0x00000100,
MakeTexelAvailableKHR = 0x00000100, MakeTexelAvailableKHR = 0x00000100,
MakeTexelVisible = 0x00000200,
MakeTexelVisibleKHR = 0x00000200, MakeTexelVisibleKHR = 0x00000200,
NonPrivateTexel = 0x00000400,
NonPrivateTexelKHR = 0x00000400, NonPrivateTexelKHR = 0x00000400,
VolatileTexel = 0x00000800,
VolatileTexelKHR = 0x00000800, VolatileTexelKHR = 0x00000800,
SignExtend = 0x00001000, SignExtend = 0x00001000,
ZeroExtend = 0x00002000, ZeroExtend = 0x00002000,
...@@ -421,8 +432,11 @@ spv = { ...@@ -421,8 +432,11 @@ spv = {
PerViewNV = 5272, PerViewNV = 5272,
PerTaskNV = 5273, PerTaskNV = 5273,
PerVertexNV = 5285, PerVertexNV = 5285,
NonUniform = 5300,
NonUniformEXT = 5300, NonUniformEXT = 5300,
RestrictPointer = 5355,
RestrictPointerEXT = 5355, RestrictPointerEXT = 5355,
AliasedPointer = 5356,
AliasedPointerEXT = 5356, AliasedPointerEXT = 5356,
CounterBuffer = 5634, CounterBuffer = 5634,
HlslCounterBufferGOOGLE = 5634, HlslCounterBufferGOOGLE = 5634,
...@@ -598,8 +612,11 @@ spv = { ...@@ -598,8 +612,11 @@ spv = {
CrossWorkgroupMemory = 9, CrossWorkgroupMemory = 9,
AtomicCounterMemory = 10, AtomicCounterMemory = 10,
ImageMemory = 11, ImageMemory = 11,
OutputMemory = 12,
OutputMemoryKHR = 12, OutputMemoryKHR = 12,
MakeAvailable = 13,
MakeAvailableKHR = 13, MakeAvailableKHR = 13,
MakeVisible = 14,
MakeVisibleKHR = 14, MakeVisibleKHR = 14,
Volatile = 15, Volatile = 15,
}, },
...@@ -616,8 +633,11 @@ spv = { ...@@ -616,8 +633,11 @@ spv = {
CrossWorkgroupMemory = 0x00000200, CrossWorkgroupMemory = 0x00000200,
AtomicCounterMemory = 0x00000400, AtomicCounterMemory = 0x00000400,
ImageMemory = 0x00000800, ImageMemory = 0x00000800,
OutputMemory = 0x00001000,
OutputMemoryKHR = 0x00001000, OutputMemoryKHR = 0x00001000,
MakeAvailable = 0x00002000,
MakeAvailableKHR = 0x00002000, MakeAvailableKHR = 0x00002000,
MakeVisible = 0x00004000,
MakeVisibleKHR = 0x00004000, MakeVisibleKHR = 0x00004000,
Volatile = 0x00008000, Volatile = 0x00008000,
}, },
...@@ -626,8 +646,11 @@ spv = { ...@@ -626,8 +646,11 @@ spv = {
Volatile = 0, Volatile = 0,
Aligned = 1, Aligned = 1,
Nontemporal = 2, Nontemporal = 2,
MakePointerAvailable = 3,
MakePointerAvailableKHR = 3, MakePointerAvailableKHR = 3,
MakePointerVisible = 4,
MakePointerVisibleKHR = 4, MakePointerVisibleKHR = 4,
NonPrivatePointer = 5,
NonPrivatePointerKHR = 5, NonPrivatePointerKHR = 5,
}, },
...@@ -636,8 +659,11 @@ spv = { ...@@ -636,8 +659,11 @@ spv = {
Volatile = 0x00000001, Volatile = 0x00000001,
Aligned = 0x00000002, Aligned = 0x00000002,
Nontemporal = 0x00000004, Nontemporal = 0x00000004,
MakePointerAvailable = 0x00000008,
MakePointerAvailableKHR = 0x00000008, MakePointerAvailableKHR = 0x00000008,
MakePointerVisible = 0x00000010,
MakePointerVisibleKHR = 0x00000010, MakePointerVisibleKHR = 0x00000010,
NonPrivatePointer = 0x00000020,
NonPrivatePointerKHR = 0x00000020, NonPrivatePointerKHR = 0x00000020,
}, },
...@@ -647,6 +673,7 @@ spv = { ...@@ -647,6 +673,7 @@ spv = {
Workgroup = 2, Workgroup = 2,
Subgroup = 3, Subgroup = 3,
Invocation = 4, Invocation = 4,
QueueFamily = 5,
QueueFamilyKHR = 5, QueueFamilyKHR = 5,
}, },
...@@ -743,6 +770,8 @@ spv = { ...@@ -743,6 +770,8 @@ spv = {
GroupNonUniformShuffleRelative = 66, GroupNonUniformShuffleRelative = 66,
GroupNonUniformClustered = 67, GroupNonUniformClustered = 67,
GroupNonUniformQuad = 68, GroupNonUniformQuad = 68,
ShaderLayer = 69,
ShaderViewportIndex = 70,
SubgroupBallotKHR = 4423, SubgroupBallotKHR = 4423,
DrawParameters = 4427, DrawParameters = 4427,
SubgroupVoteKHR = 4431, SubgroupVoteKHR = 4431,
...@@ -787,21 +816,36 @@ spv = { ...@@ -787,21 +816,36 @@ spv = {
FragmentDensityEXT = 5291, FragmentDensityEXT = 5291,
ShadingRateNV = 5291, ShadingRateNV = 5291,
GroupNonUniformPartitionedNV = 5297, GroupNonUniformPartitionedNV = 5297,
ShaderNonUniform = 5301,
ShaderNonUniformEXT = 5301, ShaderNonUniformEXT = 5301,
RuntimeDescriptorArray = 5302,
RuntimeDescriptorArrayEXT = 5302, RuntimeDescriptorArrayEXT = 5302,
InputAttachmentArrayDynamicIndexing = 5303,
InputAttachmentArrayDynamicIndexingEXT = 5303, InputAttachmentArrayDynamicIndexingEXT = 5303,
UniformTexelBufferArrayDynamicIndexing = 5304,
UniformTexelBufferArrayDynamicIndexingEXT = 5304, UniformTexelBufferArrayDynamicIndexingEXT = 5304,
StorageTexelBufferArrayDynamicIndexing = 5305,
StorageTexelBufferArrayDynamicIndexingEXT = 5305, StorageTexelBufferArrayDynamicIndexingEXT = 5305,
UniformBufferArrayNonUniformIndexing = 5306,
UniformBufferArrayNonUniformIndexingEXT = 5306, UniformBufferArrayNonUniformIndexingEXT = 5306,
SampledImageArrayNonUniformIndexing = 5307,
SampledImageArrayNonUniformIndexingEXT = 5307, SampledImageArrayNonUniformIndexingEXT = 5307,
StorageBufferArrayNonUniformIndexing = 5308,
StorageBufferArrayNonUniformIndexingEXT = 5308, StorageBufferArrayNonUniformIndexingEXT = 5308,
StorageImageArrayNonUniformIndexing = 5309,
StorageImageArrayNonUniformIndexingEXT = 5309, StorageImageArrayNonUniformIndexingEXT = 5309,
InputAttachmentArrayNonUniformIndexing = 5310,
InputAttachmentArrayNonUniformIndexingEXT = 5310, InputAttachmentArrayNonUniformIndexingEXT = 5310,
UniformTexelBufferArrayNonUniformIndexing = 5311,
UniformTexelBufferArrayNonUniformIndexingEXT = 5311, UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
RayTracingNV = 5340, RayTracingNV = 5340,
VulkanMemoryModel = 5345,
VulkanMemoryModelKHR = 5345, VulkanMemoryModelKHR = 5345,
VulkanMemoryModelDeviceScope = 5346,
VulkanMemoryModelDeviceScopeKHR = 5346, VulkanMemoryModelDeviceScopeKHR = 5346,
PhysicalStorageBufferAddresses = 5347,
PhysicalStorageBufferAddressesEXT = 5347, PhysicalStorageBufferAddressesEXT = 5347,
ComputeDerivativeGroupLinearNV = 5350, ComputeDerivativeGroupLinearNV = 5350,
CooperativeMatrixNV = 5357, CooperativeMatrixNV = 5357,
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
spv = { spv = {
'MagicNumber' : 0x07230203, 'MagicNumber' : 0x07230203,
'Version' : 0x00010400, 'Version' : 0x00010500,
'Revision' : 1, 'Revision' : 1,
'OpCodeMask' : 0xffff, 'OpCodeMask' : 0xffff,
'WordCountShift' : 16, 'WordCountShift' : 16,
...@@ -80,6 +80,7 @@ spv = { ...@@ -80,6 +80,7 @@ spv = {
'Logical' : 0, 'Logical' : 0,
'Physical32' : 1, 'Physical32' : 1,
'Physical64' : 2, 'Physical64' : 2,
'PhysicalStorageBuffer64' : 5348,
'PhysicalStorageBuffer64EXT' : 5348, 'PhysicalStorageBuffer64EXT' : 5348,
}, },
...@@ -87,6 +88,7 @@ spv = { ...@@ -87,6 +88,7 @@ spv = {
'Simple' : 0, 'Simple' : 0,
'GLSL450' : 1, 'GLSL450' : 1,
'OpenCL' : 2, 'OpenCL' : 2,
'Vulkan' : 3,
'VulkanKHR' : 3, 'VulkanKHR' : 3,
}, },
...@@ -169,6 +171,7 @@ spv = { ...@@ -169,6 +171,7 @@ spv = {
'HitAttributeNV' : 5339, 'HitAttributeNV' : 5339,
'IncomingRayPayloadNV' : 5342, 'IncomingRayPayloadNV' : 5342,
'ShaderRecordBufferNV' : 5343, 'ShaderRecordBufferNV' : 5343,
'PhysicalStorageBuffer' : 5349,
'PhysicalStorageBufferEXT' : 5349, 'PhysicalStorageBufferEXT' : 5349,
}, },
...@@ -290,9 +293,13 @@ spv = { ...@@ -290,9 +293,13 @@ spv = {
'ConstOffsets' : 5, 'ConstOffsets' : 5,
'Sample' : 6, 'Sample' : 6,
'MinLod' : 7, 'MinLod' : 7,
'MakeTexelAvailable' : 8,
'MakeTexelAvailableKHR' : 8, 'MakeTexelAvailableKHR' : 8,
'MakeTexelVisible' : 9,
'MakeTexelVisibleKHR' : 9, 'MakeTexelVisibleKHR' : 9,
'NonPrivateTexel' : 10,
'NonPrivateTexelKHR' : 10, 'NonPrivateTexelKHR' : 10,
'VolatileTexel' : 11,
'VolatileTexelKHR' : 11, 'VolatileTexelKHR' : 11,
'SignExtend' : 12, 'SignExtend' : 12,
'ZeroExtend' : 13, 'ZeroExtend' : 13,
...@@ -308,9 +315,13 @@ spv = { ...@@ -308,9 +315,13 @@ spv = {
'ConstOffsets' : 0x00000020, 'ConstOffsets' : 0x00000020,
'Sample' : 0x00000040, 'Sample' : 0x00000040,
'MinLod' : 0x00000080, 'MinLod' : 0x00000080,
'MakeTexelAvailable' : 0x00000100,
'MakeTexelAvailableKHR' : 0x00000100, 'MakeTexelAvailableKHR' : 0x00000100,
'MakeTexelVisible' : 0x00000200,
'MakeTexelVisibleKHR' : 0x00000200, 'MakeTexelVisibleKHR' : 0x00000200,
'NonPrivateTexel' : 0x00000400,
'NonPrivateTexelKHR' : 0x00000400, 'NonPrivateTexelKHR' : 0x00000400,
'VolatileTexel' : 0x00000800,
'VolatileTexelKHR' : 0x00000800, 'VolatileTexelKHR' : 0x00000800,
'SignExtend' : 0x00001000, 'SignExtend' : 0x00001000,
'ZeroExtend' : 0x00002000, 'ZeroExtend' : 0x00002000,
...@@ -421,8 +432,11 @@ spv = { ...@@ -421,8 +432,11 @@ spv = {
'PerViewNV' : 5272, 'PerViewNV' : 5272,
'PerTaskNV' : 5273, 'PerTaskNV' : 5273,
'PerVertexNV' : 5285, 'PerVertexNV' : 5285,
'NonUniform' : 5300,
'NonUniformEXT' : 5300, 'NonUniformEXT' : 5300,
'RestrictPointer' : 5355,
'RestrictPointerEXT' : 5355, 'RestrictPointerEXT' : 5355,
'AliasedPointer' : 5356,
'AliasedPointerEXT' : 5356, 'AliasedPointerEXT' : 5356,
'CounterBuffer' : 5634, 'CounterBuffer' : 5634,
'HlslCounterBufferGOOGLE' : 5634, 'HlslCounterBufferGOOGLE' : 5634,
...@@ -598,8 +612,11 @@ spv = { ...@@ -598,8 +612,11 @@ spv = {
'CrossWorkgroupMemory' : 9, 'CrossWorkgroupMemory' : 9,
'AtomicCounterMemory' : 10, 'AtomicCounterMemory' : 10,
'ImageMemory' : 11, 'ImageMemory' : 11,
'OutputMemory' : 12,
'OutputMemoryKHR' : 12, 'OutputMemoryKHR' : 12,
'MakeAvailable' : 13,
'MakeAvailableKHR' : 13, 'MakeAvailableKHR' : 13,
'MakeVisible' : 14,
'MakeVisibleKHR' : 14, 'MakeVisibleKHR' : 14,
'Volatile' : 15, 'Volatile' : 15,
}, },
...@@ -616,8 +633,11 @@ spv = { ...@@ -616,8 +633,11 @@ spv = {
'CrossWorkgroupMemory' : 0x00000200, 'CrossWorkgroupMemory' : 0x00000200,
'AtomicCounterMemory' : 0x00000400, 'AtomicCounterMemory' : 0x00000400,
'ImageMemory' : 0x00000800, 'ImageMemory' : 0x00000800,
'OutputMemory' : 0x00001000,
'OutputMemoryKHR' : 0x00001000, 'OutputMemoryKHR' : 0x00001000,
'MakeAvailable' : 0x00002000,
'MakeAvailableKHR' : 0x00002000, 'MakeAvailableKHR' : 0x00002000,
'MakeVisible' : 0x00004000,
'MakeVisibleKHR' : 0x00004000, 'MakeVisibleKHR' : 0x00004000,
'Volatile' : 0x00008000, 'Volatile' : 0x00008000,
}, },
...@@ -626,8 +646,11 @@ spv = { ...@@ -626,8 +646,11 @@ spv = {
'Volatile' : 0, 'Volatile' : 0,
'Aligned' : 1, 'Aligned' : 1,
'Nontemporal' : 2, 'Nontemporal' : 2,
'MakePointerAvailable' : 3,
'MakePointerAvailableKHR' : 3, 'MakePointerAvailableKHR' : 3,
'MakePointerVisible' : 4,
'MakePointerVisibleKHR' : 4, 'MakePointerVisibleKHR' : 4,
'NonPrivatePointer' : 5,
'NonPrivatePointerKHR' : 5, 'NonPrivatePointerKHR' : 5,
}, },
...@@ -636,8 +659,11 @@ spv = { ...@@ -636,8 +659,11 @@ spv = {
'Volatile' : 0x00000001, 'Volatile' : 0x00000001,
'Aligned' : 0x00000002, 'Aligned' : 0x00000002,
'Nontemporal' : 0x00000004, 'Nontemporal' : 0x00000004,
'MakePointerAvailable' : 0x00000008,
'MakePointerAvailableKHR' : 0x00000008, 'MakePointerAvailableKHR' : 0x00000008,
'MakePointerVisible' : 0x00000010,
'MakePointerVisibleKHR' : 0x00000010, 'MakePointerVisibleKHR' : 0x00000010,
'NonPrivatePointer' : 0x00000020,
'NonPrivatePointerKHR' : 0x00000020, 'NonPrivatePointerKHR' : 0x00000020,
}, },
...@@ -647,6 +673,7 @@ spv = { ...@@ -647,6 +673,7 @@ spv = {
'Workgroup' : 2, 'Workgroup' : 2,
'Subgroup' : 3, 'Subgroup' : 3,
'Invocation' : 4, 'Invocation' : 4,
'QueueFamily' : 5,
'QueueFamilyKHR' : 5, 'QueueFamilyKHR' : 5,
}, },
...@@ -743,6 +770,8 @@ spv = { ...@@ -743,6 +770,8 @@ spv = {
'GroupNonUniformShuffleRelative' : 66, 'GroupNonUniformShuffleRelative' : 66,
'GroupNonUniformClustered' : 67, 'GroupNonUniformClustered' : 67,
'GroupNonUniformQuad' : 68, 'GroupNonUniformQuad' : 68,
'ShaderLayer' : 69,
'ShaderViewportIndex' : 70,
'SubgroupBallotKHR' : 4423, 'SubgroupBallotKHR' : 4423,
'DrawParameters' : 4427, 'DrawParameters' : 4427,
'SubgroupVoteKHR' : 4431, 'SubgroupVoteKHR' : 4431,
...@@ -787,21 +816,36 @@ spv = { ...@@ -787,21 +816,36 @@ spv = {
'FragmentDensityEXT' : 5291, 'FragmentDensityEXT' : 5291,
'ShadingRateNV' : 5291, 'ShadingRateNV' : 5291,
'GroupNonUniformPartitionedNV' : 5297, 'GroupNonUniformPartitionedNV' : 5297,
'ShaderNonUniform' : 5301,
'ShaderNonUniformEXT' : 5301, 'ShaderNonUniformEXT' : 5301,
'RuntimeDescriptorArray' : 5302,
'RuntimeDescriptorArrayEXT' : 5302, 'RuntimeDescriptorArrayEXT' : 5302,
'InputAttachmentArrayDynamicIndexing' : 5303,
'InputAttachmentArrayDynamicIndexingEXT' : 5303, 'InputAttachmentArrayDynamicIndexingEXT' : 5303,
'UniformTexelBufferArrayDynamicIndexing' : 5304,
'UniformTexelBufferArrayDynamicIndexingEXT' : 5304, 'UniformTexelBufferArrayDynamicIndexingEXT' : 5304,
'StorageTexelBufferArrayDynamicIndexing' : 5305,
'StorageTexelBufferArrayDynamicIndexingEXT' : 5305, 'StorageTexelBufferArrayDynamicIndexingEXT' : 5305,
'UniformBufferArrayNonUniformIndexing' : 5306,
'UniformBufferArrayNonUniformIndexingEXT' : 5306, 'UniformBufferArrayNonUniformIndexingEXT' : 5306,
'SampledImageArrayNonUniformIndexing' : 5307,
'SampledImageArrayNonUniformIndexingEXT' : 5307, 'SampledImageArrayNonUniformIndexingEXT' : 5307,
'StorageBufferArrayNonUniformIndexing' : 5308,
'StorageBufferArrayNonUniformIndexingEXT' : 5308, 'StorageBufferArrayNonUniformIndexingEXT' : 5308,
'StorageImageArrayNonUniformIndexing' : 5309,
'StorageImageArrayNonUniformIndexingEXT' : 5309, 'StorageImageArrayNonUniformIndexingEXT' : 5309,
'InputAttachmentArrayNonUniformIndexing' : 5310,
'InputAttachmentArrayNonUniformIndexingEXT' : 5310, 'InputAttachmentArrayNonUniformIndexingEXT' : 5310,
'UniformTexelBufferArrayNonUniformIndexing' : 5311,
'UniformTexelBufferArrayNonUniformIndexingEXT' : 5311, 'UniformTexelBufferArrayNonUniformIndexingEXT' : 5311,
'StorageTexelBufferArrayNonUniformIndexing' : 5312,
'StorageTexelBufferArrayNonUniformIndexingEXT' : 5312, 'StorageTexelBufferArrayNonUniformIndexingEXT' : 5312,
'RayTracingNV' : 5340, 'RayTracingNV' : 5340,
'VulkanMemoryModel' : 5345,
'VulkanMemoryModelKHR' : 5345, 'VulkanMemoryModelKHR' : 5345,
'VulkanMemoryModelDeviceScope' : 5346,
'VulkanMemoryModelDeviceScopeKHR' : 5346, 'VulkanMemoryModelDeviceScopeKHR' : 5346,
'PhysicalStorageBufferAddresses' : 5347,
'PhysicalStorageBufferAddressesEXT' : 5347, 'PhysicalStorageBufferAddressesEXT' : 5347,
'ComputeDerivativeGroupLinearNV' : 5350, 'ComputeDerivativeGroupLinearNV' : 5350,
'CooperativeMatrixNV' : 5357, 'CooperativeMatrixNV' : 5357,
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
module spv; module spv;
enum uint MagicNumber = 0x07230203; enum uint MagicNumber = 0x07230203;
enum uint Version = 0x00010400; enum uint Version = 0x00010500;
enum uint Revision = 1; enum uint Revision = 1;
enum uint OpCodeMask = 0xffff; enum uint OpCodeMask = 0xffff;
enum uint WordCountShift = 16; enum uint WordCountShift = 16;
...@@ -90,6 +90,7 @@ enum AddressingModel : uint ...@@ -90,6 +90,7 @@ enum AddressingModel : uint
Logical = 0, Logical = 0,
Physical32 = 1, Physical32 = 1,
Physical64 = 2, Physical64 = 2,
PhysicalStorageBuffer64 = 5348,
PhysicalStorageBuffer64EXT = 5348, PhysicalStorageBuffer64EXT = 5348,
} }
...@@ -98,6 +99,7 @@ enum MemoryModel : uint ...@@ -98,6 +99,7 @@ enum MemoryModel : uint
Simple = 0, Simple = 0,
GLSL450 = 1, GLSL450 = 1,
OpenCL = 2, OpenCL = 2,
Vulkan = 3,
VulkanKHR = 3, VulkanKHR = 3,
} }
...@@ -182,6 +184,7 @@ enum StorageClass : uint ...@@ -182,6 +184,7 @@ enum StorageClass : uint
HitAttributeNV = 5339, HitAttributeNV = 5339,
IncomingRayPayloadNV = 5342, IncomingRayPayloadNV = 5342,
ShaderRecordBufferNV = 5343, ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349, PhysicalStorageBufferEXT = 5349,
} }
...@@ -310,9 +313,13 @@ enum ImageOperandsShift : uint ...@@ -310,9 +313,13 @@ enum ImageOperandsShift : uint
ConstOffsets = 5, ConstOffsets = 5,
Sample = 6, Sample = 6,
MinLod = 7, MinLod = 7,
MakeTexelAvailable = 8,
MakeTexelAvailableKHR = 8, MakeTexelAvailableKHR = 8,
MakeTexelVisible = 9,
MakeTexelVisibleKHR = 9, MakeTexelVisibleKHR = 9,
NonPrivateTexel = 10,
NonPrivateTexelKHR = 10, NonPrivateTexelKHR = 10,
VolatileTexel = 11,
VolatileTexelKHR = 11, VolatileTexelKHR = 11,
SignExtend = 12, SignExtend = 12,
ZeroExtend = 13, ZeroExtend = 13,
...@@ -329,9 +336,13 @@ enum ImageOperandsMask : uint ...@@ -329,9 +336,13 @@ enum ImageOperandsMask : uint
ConstOffsets = 0x00000020, ConstOffsets = 0x00000020,
Sample = 0x00000040, Sample = 0x00000040,
MinLod = 0x00000080, MinLod = 0x00000080,
MakeTexelAvailable = 0x00000100,
MakeTexelAvailableKHR = 0x00000100, MakeTexelAvailableKHR = 0x00000100,
MakeTexelVisible = 0x00000200,
MakeTexelVisibleKHR = 0x00000200, MakeTexelVisibleKHR = 0x00000200,
NonPrivateTexel = 0x00000400,
NonPrivateTexelKHR = 0x00000400, NonPrivateTexelKHR = 0x00000400,
VolatileTexel = 0x00000800,
VolatileTexelKHR = 0x00000800, VolatileTexelKHR = 0x00000800,
SignExtend = 0x00001000, SignExtend = 0x00001000,
ZeroExtend = 0x00002000, ZeroExtend = 0x00002000,
...@@ -449,8 +460,11 @@ enum Decoration : uint ...@@ -449,8 +460,11 @@ enum Decoration : uint
PerViewNV = 5272, PerViewNV = 5272,
PerTaskNV = 5273, PerTaskNV = 5273,
PerVertexNV = 5285, PerVertexNV = 5285,
NonUniform = 5300,
NonUniformEXT = 5300, NonUniformEXT = 5300,
RestrictPointer = 5355,
RestrictPointerEXT = 5355, RestrictPointerEXT = 5355,
AliasedPointer = 5356,
AliasedPointerEXT = 5356, AliasedPointerEXT = 5356,
CounterBuffer = 5634, CounterBuffer = 5634,
HlslCounterBufferGOOGLE = 5634, HlslCounterBufferGOOGLE = 5634,
...@@ -634,8 +648,11 @@ enum MemorySemanticsShift : uint ...@@ -634,8 +648,11 @@ enum MemorySemanticsShift : uint
CrossWorkgroupMemory = 9, CrossWorkgroupMemory = 9,
AtomicCounterMemory = 10, AtomicCounterMemory = 10,
ImageMemory = 11, ImageMemory = 11,
OutputMemory = 12,
OutputMemoryKHR = 12, OutputMemoryKHR = 12,
MakeAvailable = 13,
MakeAvailableKHR = 13, MakeAvailableKHR = 13,
MakeVisible = 14,
MakeVisibleKHR = 14, MakeVisibleKHR = 14,
Volatile = 15, Volatile = 15,
} }
...@@ -653,8 +670,11 @@ enum MemorySemanticsMask : uint ...@@ -653,8 +670,11 @@ enum MemorySemanticsMask : uint
CrossWorkgroupMemory = 0x00000200, CrossWorkgroupMemory = 0x00000200,
AtomicCounterMemory = 0x00000400, AtomicCounterMemory = 0x00000400,
ImageMemory = 0x00000800, ImageMemory = 0x00000800,
OutputMemory = 0x00001000,
OutputMemoryKHR = 0x00001000, OutputMemoryKHR = 0x00001000,
MakeAvailable = 0x00002000,
MakeAvailableKHR = 0x00002000, MakeAvailableKHR = 0x00002000,
MakeVisible = 0x00004000,
MakeVisibleKHR = 0x00004000, MakeVisibleKHR = 0x00004000,
Volatile = 0x00008000, Volatile = 0x00008000,
} }
...@@ -664,8 +684,11 @@ enum MemoryAccessShift : uint ...@@ -664,8 +684,11 @@ enum MemoryAccessShift : uint
Volatile = 0, Volatile = 0,
Aligned = 1, Aligned = 1,
Nontemporal = 2, Nontemporal = 2,
MakePointerAvailable = 3,
MakePointerAvailableKHR = 3, MakePointerAvailableKHR = 3,
MakePointerVisible = 4,
MakePointerVisibleKHR = 4, MakePointerVisibleKHR = 4,
NonPrivatePointer = 5,
NonPrivatePointerKHR = 5, NonPrivatePointerKHR = 5,
} }
...@@ -675,8 +698,11 @@ enum MemoryAccessMask : uint ...@@ -675,8 +698,11 @@ enum MemoryAccessMask : uint
Volatile = 0x00000001, Volatile = 0x00000001,
Aligned = 0x00000002, Aligned = 0x00000002,
Nontemporal = 0x00000004, Nontemporal = 0x00000004,
MakePointerAvailable = 0x00000008,
MakePointerAvailableKHR = 0x00000008, MakePointerAvailableKHR = 0x00000008,
MakePointerVisible = 0x00000010,
MakePointerVisibleKHR = 0x00000010, MakePointerVisibleKHR = 0x00000010,
NonPrivatePointer = 0x00000020,
NonPrivatePointerKHR = 0x00000020, NonPrivatePointerKHR = 0x00000020,
} }
...@@ -687,6 +713,7 @@ enum Scope : uint ...@@ -687,6 +713,7 @@ enum Scope : uint
Workgroup = 2, Workgroup = 2,
Subgroup = 3, Subgroup = 3,
Invocation = 4, Invocation = 4,
QueueFamily = 5,
QueueFamilyKHR = 5, QueueFamilyKHR = 5,
} }
...@@ -788,6 +815,8 @@ enum Capability : uint ...@@ -788,6 +815,8 @@ enum Capability : uint
GroupNonUniformShuffleRelative = 66, GroupNonUniformShuffleRelative = 66,
GroupNonUniformClustered = 67, GroupNonUniformClustered = 67,
GroupNonUniformQuad = 68, GroupNonUniformQuad = 68,
ShaderLayer = 69,
ShaderViewportIndex = 70,
SubgroupBallotKHR = 4423, SubgroupBallotKHR = 4423,
DrawParameters = 4427, DrawParameters = 4427,
SubgroupVoteKHR = 4431, SubgroupVoteKHR = 4431,
...@@ -832,21 +861,36 @@ enum Capability : uint ...@@ -832,21 +861,36 @@ enum Capability : uint
FragmentDensityEXT = 5291, FragmentDensityEXT = 5291,
ShadingRateNV = 5291, ShadingRateNV = 5291,
GroupNonUniformPartitionedNV = 5297, GroupNonUniformPartitionedNV = 5297,
ShaderNonUniform = 5301,
ShaderNonUniformEXT = 5301, ShaderNonUniformEXT = 5301,
RuntimeDescriptorArray = 5302,
RuntimeDescriptorArrayEXT = 5302, RuntimeDescriptorArrayEXT = 5302,
InputAttachmentArrayDynamicIndexing = 5303,
InputAttachmentArrayDynamicIndexingEXT = 5303, InputAttachmentArrayDynamicIndexingEXT = 5303,
UniformTexelBufferArrayDynamicIndexing = 5304,
UniformTexelBufferArrayDynamicIndexingEXT = 5304, UniformTexelBufferArrayDynamicIndexingEXT = 5304,
StorageTexelBufferArrayDynamicIndexing = 5305,
StorageTexelBufferArrayDynamicIndexingEXT = 5305, StorageTexelBufferArrayDynamicIndexingEXT = 5305,
UniformBufferArrayNonUniformIndexing = 5306,
UniformBufferArrayNonUniformIndexingEXT = 5306, UniformBufferArrayNonUniformIndexingEXT = 5306,
SampledImageArrayNonUniformIndexing = 5307,
SampledImageArrayNonUniformIndexingEXT = 5307, SampledImageArrayNonUniformIndexingEXT = 5307,
StorageBufferArrayNonUniformIndexing = 5308,
StorageBufferArrayNonUniformIndexingEXT = 5308, StorageBufferArrayNonUniformIndexingEXT = 5308,
StorageImageArrayNonUniformIndexing = 5309,
StorageImageArrayNonUniformIndexingEXT = 5309, StorageImageArrayNonUniformIndexingEXT = 5309,
InputAttachmentArrayNonUniformIndexing = 5310,
InputAttachmentArrayNonUniformIndexingEXT = 5310, InputAttachmentArrayNonUniformIndexingEXT = 5310,
UniformTexelBufferArrayNonUniformIndexing = 5311,
UniformTexelBufferArrayNonUniformIndexingEXT = 5311, UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
RayTracingNV = 5340, RayTracingNV = 5340,
VulkanMemoryModel = 5345,
VulkanMemoryModelKHR = 5345, VulkanMemoryModelKHR = 5345,
VulkanMemoryModelDeviceScope = 5346,
VulkanMemoryModelDeviceScopeKHR = 5346, VulkanMemoryModelDeviceScopeKHR = 5346,
PhysicalStorageBufferAddresses = 5347,
PhysicalStorageBufferAddressesEXT = 5347, PhysicalStorageBufferAddressesEXT = 5347,
ComputeDerivativeGroupLinearNV = 5350, ComputeDerivativeGroupLinearNV = 5350,
CooperativeMatrixNV = 5357, CooperativeMatrixNV = 5357,
......
...@@ -69,7 +69,7 @@ namespace { ...@@ -69,7 +69,7 @@ namespace {
TPrinter(); TPrinter();
static const int DocMagicNumber = 0x07230203; static const int DocMagicNumber = 0x07230203;
static const int DocVersion = 0x00010400; static const int DocVersion = 0x00010500;
static const int DocRevision = 1; static const int DocRevision = 1;
#define DocRevisionString "1" #define DocRevisionString "1"
static const std::string DocCopyright; static const std::string DocCopyright;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>
#include <unordered_map> #include <unordered_map>
#include <unordered_set>
#include <utility> #include <utility>
#include <fstream> #include <fstream>
...@@ -40,6 +41,10 @@ namespace spv { ...@@ -40,6 +41,10 @@ namespace spv {
// parameterization information. // parameterization information.
InstructionValues InstructionDesc; InstructionValues InstructionDesc;
// The ordered list (in printing order) of printing classes
// (specification subsections).
PrintingClasses InstructionPrintingClasses;
// Note: There is no entry for OperandOpcode. Use InstructionDesc instead. // Note: There is no entry for OperandOpcode. Use InstructionDesc instead.
EnumDefinition OperandClassParams[OperandOpcode]; EnumDefinition OperandClassParams[OperandOpcode];
EnumValues SourceLanguageParams; EnumValues SourceLanguageParams;
...@@ -229,20 +234,6 @@ unsigned int NumberStringToBit(const std::string& str) ...@@ -229,20 +234,6 @@ unsigned int NumberStringToBit(const std::string& str)
return 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) void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
{ {
// only do this once. // only do this once.
...@@ -298,11 +289,36 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) ...@@ -298,11 +289,36 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
return result; return result;
}; };
// set up the printing classes
std::unordered_set<std::string> tags; // short-lived local for error checking below
const Json::Value printingClasses = root["instruction_printing_class"];
for (const auto& printingClass : printingClasses) {
if (printingClass["tag"].asString().size() > 0)
tags.insert(printingClass["tag"].asString()); // just for error checking
else
std::cerr << "Error: each instruction_printing_class requires a non-empty \"tag\"" << std::endl;
if (buildingHeaders || printingClass["tag"].asString() != "@exclude") {
InstructionPrintingClasses.push_back({printingClass["tag"].asString(),
printingClass["heading"].asString()});
}
}
// process the instructions
const Json::Value insts = root["instructions"]; const Json::Value insts = root["instructions"];
for (const auto& inst : insts) { for (const auto& inst : insts) {
const unsigned int opcode = inst["opcode"].asUInt(); const auto printingClass = inst["class"].asString();
if (ExcludeInstruction(opcode, buildingHeaders)) if (printingClass.size() == 0) {
std::cerr << "Error: " << inst["opname"].asString()
<< " requires a non-empty printing \"class\" tag" << std::endl;
}
if (!buildingHeaders && printingClass == "@exclude")
continue; continue;
if (tags.find(printingClass) == tags.end()) {
std::cerr << "Error: " << inst["opname"].asString()
<< " requires a \"class\" declared as a \"tag\" in \"instruction printing_class\""
<< std::endl;
}
const auto opcode = inst["opcode"].asUInt();
const std::string name = inst["opname"].asString(); const std::string name = inst["opname"].asString();
EnumCaps caps = getCaps(inst); EnumCaps caps = getCaps(inst);
std::string version = inst["version"].asString(); std::string version = inst["version"].asString();
...@@ -324,7 +340,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) ...@@ -324,7 +340,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
std::move(EnumValue(opcode, name, std::move(EnumValue(opcode, name,
std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), std::move(caps), std::move(version), std::move(lastVersion), std::move(exts),
std::move(operands))), std::move(operands))),
defTypeId, defResultId); printingClass, defTypeId, defResultId);
} }
// Specific additional context-dependent operands // Specific additional context-dependent operands
......
...@@ -89,6 +89,13 @@ enum OperandClass { ...@@ -89,6 +89,13 @@ enum OperandClass {
OperandCount OperandCount
}; };
// For direct representation of the JSON grammar "instruction_printing_class".
struct PrintingClass {
std::string tag;
std::string heading;
};
using PrintingClasses = std::vector<PrintingClass>;
// Any specific enum can have a set of capabilities that allow it: // Any specific enum can have a set of capabilities that allow it:
typedef std::vector<std::string> EnumCaps; typedef std::vector<std::string> EnumCaps;
...@@ -238,10 +245,10 @@ public: ...@@ -238,10 +245,10 @@ public:
// per OperandParameters above. // per OperandParameters above.
class InstructionValue : public EnumValue { class InstructionValue : public EnumValue {
public: public:
InstructionValue(EnumValue&& e, bool has_type, bool has_result) InstructionValue(EnumValue&& e, const std::string& printClass, bool has_type, bool has_result)
: EnumValue(std::move(e)), : EnumValue(std::move(e)),
printingClass(printClass),
opDesc("TBD"), opDesc("TBD"),
opClass(0),
typePresent(has_type), typePresent(has_type),
resultPresent(has_result), resultPresent(has_result),
alias(this) { } alias(this) { }
...@@ -257,8 +264,8 @@ public: ...@@ -257,8 +264,8 @@ public:
const InstructionValue& getAlias() const { return *alias; } const InstructionValue& getAlias() const { return *alias; }
bool isAlias() const { return alias != this; } bool isAlias() const { return alias != this; }
std::string printingClass;
const char* opDesc; const char* opDesc;
int opClass;
protected: protected:
int typePresent : 1; int typePresent : 1;
...@@ -270,6 +277,7 @@ using InstructionValues = EnumValuesContainer<InstructionValue>; ...@@ -270,6 +277,7 @@ using InstructionValues = EnumValuesContainer<InstructionValue>;
// Parameterization info for all instructions. // Parameterization info for all instructions.
extern InstructionValues InstructionDesc; extern InstructionValues InstructionDesc;
extern PrintingClasses InstructionPrintingClasses;
// These hold definitions of the enumerants used for operands. // These hold definitions of the enumerants used for operands.
// This is indexed by OperandClass, but not including OperandOpcode. // This is indexed by OperandClass, but not including OperandOpcode.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment