Compare commits
56 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5ab1daa67 | ||
|
|
4b5cf4dcd4 | ||
|
|
a64251b043 | ||
|
|
ff0332e366 | ||
|
|
bac864740d | ||
|
|
ec4592aa5c | ||
|
|
a578eb7bf4 | ||
|
|
b538d843b7 | ||
|
|
31e1b4952e | ||
|
|
8d660048ad | ||
|
|
03b55633cd | ||
|
|
08f52943fe | ||
|
|
5063cde136 | ||
|
|
dc83bd1394 | ||
|
|
fd42476b40 | ||
|
|
dd85b9c41f | ||
|
|
ee63313b3a | ||
|
|
6594918d22 | ||
|
|
12822843a0 | ||
|
|
7d3df2cd68 | ||
|
|
d787689453 | ||
|
|
94cde24b3a | ||
|
|
9e72cd25c5 | ||
|
|
0eeaa694f9 | ||
|
|
473d4438e1 | ||
|
|
5035fb22e4 | ||
|
|
34cf4a0067 | ||
|
|
d650776957 | ||
|
|
45e05a185b | ||
|
|
00072c4d57 | ||
|
|
86dacbc9f4 | ||
|
|
140576aa6e | ||
|
|
de00f72940 | ||
|
|
359b7607cc | ||
|
|
4f28c7ba9f | ||
|
|
05ac64d6b0 | ||
|
|
a8bb022d18 | ||
|
|
e07d303182 | ||
|
|
f8d40ddf29 | ||
|
|
29c5a8a347 | ||
|
|
5d28910a09 | ||
|
|
62d9cb14ea | ||
|
|
d563cea6ff | ||
|
|
20c82e0ac3 | ||
|
|
291f9e0fd6 | ||
|
|
e486b64e93 | ||
|
|
e49ff98dba | ||
|
|
51eb752bee | ||
|
|
7c71063eb1 | ||
|
|
8b15bd751f | ||
|
|
e2e75b0304 | ||
|
|
d088ec325e | ||
|
|
9666316dd4 | ||
|
|
324a82dde5 | ||
|
|
e068e7c227 | ||
|
|
4bf9d97d01 |
12 changed files with 1 additions and 1442 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,5 +0,0 @@
|
||||||
/SPIRV-Headers-*.tar.gz
|
|
||||||
/glslang-*.tar.gz
|
|
||||||
/SPIRV-Tools-*.tar.gz
|
|
||||||
/Vulkan-LoaderAndValidationLayers-sdk-*.tar.gz
|
|
||||||
/vulkan-*.src.rpm
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
--- a/tests/layers/CMakeLists.txt
|
|
||||||
+++ b/tests/layers/CMakeLists.txt
|
|
||||||
@@ -4,9 +4,6 @@
|
|
||||||
VkLayer_wrap_objects
|
|
||||||
VkLayer_test
|
|
||||||
)
|
|
||||||
-
|
|
||||||
-set(VK_LAYER_RPATH /usr/lib/x86_64-linux-gnu/vulkan/layer:/usr/lib/i386-linux-gnu/vulkan/layer)
|
|
||||||
-set(CMAKE_INSTALL_RPATH ${VK_LAYER_RPATH})
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR))
|
|
||||||
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
--- a/layers/CMakeLists.txt
|
|
||||||
+++ b/layers/CMakeLists.txt
|
|
||||||
@@ -91,7 +91,7 @@
|
|
||||||
target_link_Libraries(VkLayer_${target} VkLayer_utils)
|
|
||||||
add_dependencies(VkLayer_${target} generate_dispatch_table_helper generate_vk_layer_helpers generate_enum_string_helper VkLayer_utils)
|
|
||||||
set_target_properties(VkLayer_${target} PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic,--exclude-libs,ALL")
|
|
||||||
- install(TARGETS VkLayer_${target} DESTINATION lib)
|
|
||||||
+ install(TARGETS VkLayer_${target} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
endmacro()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@
|
|
||||||
add_library(VkLayer_utils STATIC vk_layer_config.cpp vk_layer_extension_utils.cpp vk_layer_utils.cpp)
|
|
||||||
else()
|
|
||||||
add_library(VkLayer_utils SHARED vk_layer_config.cpp vk_layer_extension_utils.cpp vk_layer_utils.cpp)
|
|
||||||
- install(TARGETS VkLayer_utils DESTINATION lib)
|
|
||||||
+ install(TARGETS VkLayer_utils DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_vk_layer(core_validation core_validation.cpp vk_layer_table.cpp vk_safe_struct.cpp descriptor_sets.cpp)
|
|
||||||
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/loader/CMakeLists.txt
|
|
||||||
+++ b/loader/CMakeLists.txt
|
|
||||||
@@ -85,5 +85,5 @@
|
|
||||||
add_library(vulkan SHARED ${LOADER_SRCS})
|
|
||||||
set_target_properties(vulkan PROPERTIES SOVERSION "1" VERSION "1.0.30")
|
|
||||||
target_link_libraries(vulkan -ldl -lpthread -lm)
|
|
||||||
- install(TARGETS vulkan LIBRARY DESTINATION lib)
|
|
||||||
+ install(TARGETS vulkan LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
--- a/demos/cube.c
|
|
||||||
+++ b/demos/cube.c
|
|
||||||
@@ -129,7 +129,7 @@
|
|
||||||
int32_t tex_width, tex_height;
|
|
||||||
};
|
|
||||||
|
|
||||||
-static char *tex_files[] = {"lunarg.ppm"};
|
|
||||||
+static char *tex_files[] = {"/usr/share/vulkan/cube.ppm"};
|
|
||||||
|
|
||||||
static int validation_error = 0;
|
|
||||||
|
|
||||||
@@ -1536,7 +1536,7 @@
|
|
||||||
void *vertShaderCode;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
- vertShaderCode = demo_read_spv("cube-vert.spv", &size);
|
|
||||||
+ vertShaderCode = demo_read_spv("/usr/share/vulkan/cube-vert.spv", &size);
|
|
||||||
|
|
||||||
demo->vert_shader_module =
|
|
||||||
demo_prepare_shader_module(demo, vertShaderCode, size);
|
|
||||||
@@ -1561,7 +1561,7 @@
|
|
||||||
void *fragShaderCode;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
- fragShaderCode = demo_read_spv("cube-frag.spv", &size);
|
|
||||||
+ fragShaderCode = demo_read_spv("/usr/share/vulkan/cube-frag.spv", &size);
|
|
||||||
|
|
||||||
demo->frag_shader_module =
|
|
||||||
demo_prepare_shader_module(demo, fragShaderCode, size);
|
|
||||||
|
|
||||||
--- a/demos/tri.c
|
|
||||||
+++ b/demos/tri.c
|
|
||||||
@@ -1302,7 +1302,7 @@
|
|
||||||
void *vertShaderCode;
|
|
||||||
size_t size = 0;
|
|
||||||
|
|
||||||
- vertShaderCode = demo_read_spv("tri-vert.spv", &size);
|
|
||||||
+ vertShaderCode = demo_read_spv("/usr/share/vulkan/tri-vert.spv", &size);
|
|
||||||
|
|
||||||
demo->vert_shader_module =
|
|
||||||
demo_prepare_shader_module(demo, vertShaderCode, size);
|
|
||||||
@@ -1327,7 +1327,7 @@
|
|
||||||
void *fragShaderCode;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
- fragShaderCode = demo_read_spv("tri-frag.spv", &size);
|
|
||||||
+ fragShaderCode = demo_read_spv("/usr/share/vulkan/tri-frag.spv", &size);
|
|
||||||
|
|
||||||
demo->frag_shader_module =
|
|
||||||
demo_prepare_shader_module(demo, fragShaderCode, size);
|
|
||||||
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
||||||
--- a/demos/CMakeLists.txt
|
|
||||||
+++ b/demos/CMakeLists.txt
|
|
||||||
@@ -23,47 +23,6 @@
|
|
||||||
elseif(UNIX)
|
|
||||||
set (LIBRARIES "vulkan")
|
|
||||||
else()
|
|
||||||
-endif()
|
|
||||||
-
|
|
||||||
-if(WIN32)
|
|
||||||
- # For Windows, since 32-bit and 64-bit items can co-exist, we build each in its own build directory.
|
|
||||||
- # 32-bit target data goes in build32, and 64-bit target data goes into build. So, include/link the
|
|
||||||
- # appropriate data at build time.
|
|
||||||
- if (CMAKE_CL_64)
|
|
||||||
- set (BUILDTGT_DIR build)
|
|
||||||
- else ()
|
|
||||||
- set (BUILDTGT_DIR build32)
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- # Use static MSVCRT libraries
|
|
||||||
- foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
|
|
||||||
- CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
|
||||||
- if(${configuration} MATCHES "/MD")
|
|
||||||
- string(REGEX REPLACE "/MD" "/MT" ${configuration} "${${configuration}}")
|
|
||||||
- endif()
|
|
||||||
- endforeach()
|
|
||||||
-
|
|
||||||
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
|
|
||||||
- COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
|
|
||||||
- DEPENDS cube.vert ${GLSLANG_VALIDATOR}
|
|
||||||
- )
|
|
||||||
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
|
|
||||||
- COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
|
|
||||||
- DEPENDS cube.frag ${GLSLANG_VALIDATOR}
|
|
||||||
- )
|
|
||||||
- file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
|
|
||||||
- file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
|
|
||||||
-else()
|
|
||||||
- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
|
||||||
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
|
|
||||||
- COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
|
|
||||||
- DEPENDS cube.vert ${GLSLANG_VALIDATOR}
|
|
||||||
- )
|
|
||||||
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
|
|
||||||
- COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
|
|
||||||
- DEPENDS cube.frag ${GLSLANG_VALIDATOR}
|
|
||||||
- )
|
|
||||||
- endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT WIN32)
|
|
||||||
@@ -95,41 +54,6 @@
|
|
||||||
add_executable(vulkaninfo vulkaninfo.c)
|
|
||||||
target_link_libraries(vulkaninfo ${LIBRARIES})
|
|
||||||
|
|
||||||
-if(NOT WIN32)
|
|
||||||
- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
|
||||||
- add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
|
|
||||||
- target_link_libraries(cube ${LIBRARIES})
|
|
||||||
- endif()
|
|
||||||
-else()
|
|
||||||
- if (CMAKE_CL_64)
|
|
||||||
- set (LIB_DIR "Win64")
|
|
||||||
- else()
|
|
||||||
- set (LIB_DIR "Win32")
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- add_executable(cube WIN32 cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
|
|
||||||
- target_link_libraries(cube ${LIBRARIES})
|
|
||||||
-endif()
|
|
||||||
-
|
|
||||||
-if(NOT WIN32)
|
|
||||||
- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
|
||||||
- add_executable(cubepp cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
|
|
||||||
- target_link_libraries(cubepp ${LIBRARIES})
|
|
||||||
- endif()
|
|
||||||
-else()
|
|
||||||
- if (CMAKE_CL_64)
|
|
||||||
- set (LIB_DIR "Win64")
|
|
||||||
- else()
|
|
||||||
- set (LIB_DIR "Win32")
|
|
||||||
- endif()
|
|
||||||
-
|
|
||||||
- add_executable(cubepp WIN32 cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
|
|
||||||
- target_link_libraries(cubepp ${LIBRARIES})
|
|
||||||
-endif()
|
|
||||||
-
|
|
||||||
-if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
|
||||||
- add_subdirectory(smoke)
|
|
||||||
-endif()
|
|
||||||
|
|
||||||
if(UNIX)
|
|
||||||
install(TARGETS vulkaninfo DESTINATION bin)
|
|
||||||
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
From 5338f69a0a3dcc8527d81ca5f936b0e066a3d7f7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karl Schultz <karl@lunarg.com>
|
|
||||||
Date: Thu, 3 Nov 2016 12:31:41 -0600
|
|
||||||
Subject: [PATCH] layers: GH1115 Add missing VK_LAYER_EXPORT decorations
|
|
||||||
|
|
||||||
Functions in the vk_layer_extension_utils file were
|
|
||||||
not getting exported correctly.
|
|
||||||
|
|
||||||
Change-Id: If1bf6456cb8e79a1b6292ea76bd72e3e89a2b430
|
|
||||||
---
|
|
||||||
layers/vk_layer_extension_utils.cpp | 8 ++++----
|
|
||||||
layers/vk_layer_extension_utils.h | 8 ++++----
|
|
||||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/layers/vk_layer_extension_utils.cpp b/layers/vk_layer_extension_utils.cpp
|
|
||||||
index bd778e9..4c1e396 100644
|
|
||||||
--- a/layers/vk_layer_extension_utils.cpp
|
|
||||||
+++ b/layers/vk_layer_extension_utils.cpp
|
|
||||||
@@ -27,8 +27,8 @@
|
|
||||||
* This file contains utility functions for layers
|
|
||||||
*/
|
|
||||||
|
|
||||||
-VkResult util_GetExtensionProperties(const uint32_t count, const VkExtensionProperties *layer_extensions, uint32_t *pCount,
|
|
||||||
- VkExtensionProperties *pProperties) {
|
|
||||||
+VK_LAYER_EXPORT VkResult util_GetExtensionProperties(const uint32_t count, const VkExtensionProperties *layer_extensions,
|
|
||||||
+ uint32_t *pCount, VkExtensionProperties *pProperties) {
|
|
||||||
uint32_t copy_size;
|
|
||||||
|
|
||||||
if (pProperties == NULL || layer_extensions == NULL) {
|
|
||||||
@@ -46,8 +46,8 @@ VkResult util_GetExtensionProperties(const uint32_t count, const VkExtensionProp
|
|
||||||
return VK_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
-VkResult util_GetLayerProperties(const uint32_t count, const VkLayerProperties *layer_properties, uint32_t *pCount,
|
|
||||||
- VkLayerProperties *pProperties) {
|
|
||||||
+VK_LAYER_EXPORT VkResult util_GetLayerProperties(const uint32_t count, const VkLayerProperties *layer_properties, uint32_t *pCount,
|
|
||||||
+ VkLayerProperties *pProperties) {
|
|
||||||
uint32_t copy_size;
|
|
||||||
|
|
||||||
if (pProperties == NULL || layer_properties == NULL) {
|
|
||||||
diff --git a/layers/vk_layer_extension_utils.h b/layers/vk_layer_extension_utils.h
|
|
||||||
index 0f249b7..b593768 100644
|
|
||||||
--- a/layers/vk_layer_extension_utils.h
|
|
||||||
+++ b/layers/vk_layer_extension_utils.h
|
|
||||||
@@ -30,11 +30,11 @@
|
|
||||||
*/
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
-VkResult util_GetExtensionProperties(const uint32_t count, const VkExtensionProperties *layer_extensions, uint32_t *pCount,
|
|
||||||
- VkExtensionProperties *pProperties);
|
|
||||||
+VK_LAYER_EXPORT VkResult util_GetExtensionProperties(const uint32_t count, const VkExtensionProperties *layer_extensions,
|
|
||||||
+ uint32_t *pCount, VkExtensionProperties *pProperties);
|
|
||||||
|
|
||||||
-VkResult util_GetLayerProperties(const uint32_t count, const VkLayerProperties *layer_properties, uint32_t *pCount,
|
|
||||||
- VkLayerProperties *pProperties);
|
|
||||||
+VK_LAYER_EXPORT VkResult util_GetLayerProperties(const uint32_t count, const VkLayerProperties *layer_properties, uint32_t *pCount,
|
|
||||||
+ VkLayerProperties *pProperties);
|
|
||||||
|
|
||||||
} // extern "C"
|
|
||||||
#endif // LAYER_EXTENSION_UTILS_H
|
|
||||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Kronos split the source code
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
Description: Add an install rule for vulkaninfo
|
|
||||||
--- a/demos/CMakeLists.txt
|
|
||||||
+++ b/demos/CMakeLists.txt
|
|
||||||
@@ -114,4 +114,5 @@ endif()
|
|
||||||
|
|
||||||
add_executable(vulkaninfo vulkaninfo.c)
|
|
||||||
target_link_libraries(vulkaninfo ${LIBRARIES})
|
|
||||||
+install(TARGETS vulkaninfo RUNTIME DESTINATION /usr/bin)
|
|
||||||
|
|
||||||
4
sources
4
sources
|
|
@ -1,4 +0,0 @@
|
||||||
3c9f46d7f76e530adaa1a8da726cb80b glslang-81cd764b5ffc475bc73f1fb35f75fd1171bb2343.tar.gz
|
|
||||||
eed9e175ef87f11f0927aaf52318451a SPIRV-Headers-33d41376d378761ed3a4c791fc4b647761897f26.tar.gz
|
|
||||||
9af023a8f541ab2d5a18c26552645bfb SPIRV-Tools-923a4596b44831a07060df45caacb522613730c9.tar.gz
|
|
||||||
536dc586395a1732c856e2bc4c9422da Vulkan-LoaderAndValidationLayers-sdk-1.0.30.0.tar.gz
|
|
||||||
925
spirv.hpp
925
spirv.hpp
|
|
@ -1,925 +0,0 @@
|
||||||
// Copyright (c) 2014-2016 The Khronos Group Inc.
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
// of this software and/or associated documentation files (the "Materials"),
|
|
||||||
// to deal in the Materials without restriction, including without limitation
|
|
||||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
// and/or sell copies of the Materials, and to permit persons to whom the
|
|
||||||
// Materials are furnished to do so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in
|
|
||||||
// all copies or substantial portions of the Materials.
|
|
||||||
//
|
|
||||||
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
|
|
||||||
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
|
|
||||||
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
|
||||||
//
|
|
||||||
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
|
|
||||||
// IN THE MATERIALS.
|
|
||||||
|
|
||||||
// This header is automatically generated by the same tool that creates
|
|
||||||
// the Binary Section of the SPIR-V specification.
|
|
||||||
|
|
||||||
// Enumeration tokens for SPIR-V, in various styles:
|
|
||||||
// C, C++, C++11, JSON, Lua, Python
|
|
||||||
//
|
|
||||||
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
|
||||||
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
|
||||||
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
|
||||||
// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
|
|
||||||
// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
|
|
||||||
//
|
|
||||||
// Some tokens act like mask values, which can be OR'd together,
|
|
||||||
// while others are mutually exclusive. The mask-like ones have
|
|
||||||
// "Mask" in their name, and a parallel enum that has the shift
|
|
||||||
// amount (1 << x) for each corresponding enumerant.
|
|
||||||
|
|
||||||
#ifndef spirv_HPP
|
|
||||||
#define spirv_HPP
|
|
||||||
|
|
||||||
namespace spv {
|
|
||||||
|
|
||||||
typedef unsigned int Id;
|
|
||||||
|
|
||||||
#define SPV_VERSION 0x10000
|
|
||||||
#define SPV_REVISION 8
|
|
||||||
|
|
||||||
static const unsigned int MagicNumber = 0x07230203;
|
|
||||||
static const unsigned int Version = 0x00010000;
|
|
||||||
static const unsigned int Revision = 8;
|
|
||||||
static const unsigned int OpCodeMask = 0xffff;
|
|
||||||
static const unsigned int WordCountShift = 16;
|
|
||||||
|
|
||||||
enum SourceLanguage {
|
|
||||||
SourceLanguageUnknown = 0,
|
|
||||||
SourceLanguageESSL = 1,
|
|
||||||
SourceLanguageGLSL = 2,
|
|
||||||
SourceLanguageOpenCL_C = 3,
|
|
||||||
SourceLanguageOpenCL_CPP = 4,
|
|
||||||
SourceLanguageHLSL = 5,
|
|
||||||
SourceLanguageMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ExecutionModel {
|
|
||||||
ExecutionModelVertex = 0,
|
|
||||||
ExecutionModelTessellationControl = 1,
|
|
||||||
ExecutionModelTessellationEvaluation = 2,
|
|
||||||
ExecutionModelGeometry = 3,
|
|
||||||
ExecutionModelFragment = 4,
|
|
||||||
ExecutionModelGLCompute = 5,
|
|
||||||
ExecutionModelKernel = 6,
|
|
||||||
ExecutionModelMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum AddressingModel {
|
|
||||||
AddressingModelLogical = 0,
|
|
||||||
AddressingModelPhysical32 = 1,
|
|
||||||
AddressingModelPhysical64 = 2,
|
|
||||||
AddressingModelMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MemoryModel {
|
|
||||||
MemoryModelSimple = 0,
|
|
||||||
MemoryModelGLSL450 = 1,
|
|
||||||
MemoryModelOpenCL = 2,
|
|
||||||
MemoryModelMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ExecutionMode {
|
|
||||||
ExecutionModeInvocations = 0,
|
|
||||||
ExecutionModeSpacingEqual = 1,
|
|
||||||
ExecutionModeSpacingFractionalEven = 2,
|
|
||||||
ExecutionModeSpacingFractionalOdd = 3,
|
|
||||||
ExecutionModeVertexOrderCw = 4,
|
|
||||||
ExecutionModeVertexOrderCcw = 5,
|
|
||||||
ExecutionModePixelCenterInteger = 6,
|
|
||||||
ExecutionModeOriginUpperLeft = 7,
|
|
||||||
ExecutionModeOriginLowerLeft = 8,
|
|
||||||
ExecutionModeEarlyFragmentTests = 9,
|
|
||||||
ExecutionModePointMode = 10,
|
|
||||||
ExecutionModeXfb = 11,
|
|
||||||
ExecutionModeDepthReplacing = 12,
|
|
||||||
ExecutionModeDepthGreater = 14,
|
|
||||||
ExecutionModeDepthLess = 15,
|
|
||||||
ExecutionModeDepthUnchanged = 16,
|
|
||||||
ExecutionModeLocalSize = 17,
|
|
||||||
ExecutionModeLocalSizeHint = 18,
|
|
||||||
ExecutionModeInputPoints = 19,
|
|
||||||
ExecutionModeInputLines = 20,
|
|
||||||
ExecutionModeInputLinesAdjacency = 21,
|
|
||||||
ExecutionModeTriangles = 22,
|
|
||||||
ExecutionModeInputTrianglesAdjacency = 23,
|
|
||||||
ExecutionModeQuads = 24,
|
|
||||||
ExecutionModeIsolines = 25,
|
|
||||||
ExecutionModeOutputVertices = 26,
|
|
||||||
ExecutionModeOutputPoints = 27,
|
|
||||||
ExecutionModeOutputLineStrip = 28,
|
|
||||||
ExecutionModeOutputTriangleStrip = 29,
|
|
||||||
ExecutionModeVecTypeHint = 30,
|
|
||||||
ExecutionModeContractionOff = 31,
|
|
||||||
ExecutionModeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum StorageClass {
|
|
||||||
StorageClassUniformConstant = 0,
|
|
||||||
StorageClassInput = 1,
|
|
||||||
StorageClassUniform = 2,
|
|
||||||
StorageClassOutput = 3,
|
|
||||||
StorageClassWorkgroup = 4,
|
|
||||||
StorageClassCrossWorkgroup = 5,
|
|
||||||
StorageClassPrivate = 6,
|
|
||||||
StorageClassFunction = 7,
|
|
||||||
StorageClassGeneric = 8,
|
|
||||||
StorageClassPushConstant = 9,
|
|
||||||
StorageClassAtomicCounter = 10,
|
|
||||||
StorageClassImage = 11,
|
|
||||||
StorageClassMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Dim {
|
|
||||||
Dim1D = 0,
|
|
||||||
Dim2D = 1,
|
|
||||||
Dim3D = 2,
|
|
||||||
DimCube = 3,
|
|
||||||
DimRect = 4,
|
|
||||||
DimBuffer = 5,
|
|
||||||
DimSubpassData = 6,
|
|
||||||
DimMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum SamplerAddressingMode {
|
|
||||||
SamplerAddressingModeNone = 0,
|
|
||||||
SamplerAddressingModeClampToEdge = 1,
|
|
||||||
SamplerAddressingModeClamp = 2,
|
|
||||||
SamplerAddressingModeRepeat = 3,
|
|
||||||
SamplerAddressingModeRepeatMirrored = 4,
|
|
||||||
SamplerAddressingModeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum SamplerFilterMode {
|
|
||||||
SamplerFilterModeNearest = 0,
|
|
||||||
SamplerFilterModeLinear = 1,
|
|
||||||
SamplerFilterModeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ImageFormat {
|
|
||||||
ImageFormatUnknown = 0,
|
|
||||||
ImageFormatRgba32f = 1,
|
|
||||||
ImageFormatRgba16f = 2,
|
|
||||||
ImageFormatR32f = 3,
|
|
||||||
ImageFormatRgba8 = 4,
|
|
||||||
ImageFormatRgba8Snorm = 5,
|
|
||||||
ImageFormatRg32f = 6,
|
|
||||||
ImageFormatRg16f = 7,
|
|
||||||
ImageFormatR11fG11fB10f = 8,
|
|
||||||
ImageFormatR16f = 9,
|
|
||||||
ImageFormatRgba16 = 10,
|
|
||||||
ImageFormatRgb10A2 = 11,
|
|
||||||
ImageFormatRg16 = 12,
|
|
||||||
ImageFormatRg8 = 13,
|
|
||||||
ImageFormatR16 = 14,
|
|
||||||
ImageFormatR8 = 15,
|
|
||||||
ImageFormatRgba16Snorm = 16,
|
|
||||||
ImageFormatRg16Snorm = 17,
|
|
||||||
ImageFormatRg8Snorm = 18,
|
|
||||||
ImageFormatR16Snorm = 19,
|
|
||||||
ImageFormatR8Snorm = 20,
|
|
||||||
ImageFormatRgba32i = 21,
|
|
||||||
ImageFormatRgba16i = 22,
|
|
||||||
ImageFormatRgba8i = 23,
|
|
||||||
ImageFormatR32i = 24,
|
|
||||||
ImageFormatRg32i = 25,
|
|
||||||
ImageFormatRg16i = 26,
|
|
||||||
ImageFormatRg8i = 27,
|
|
||||||
ImageFormatR16i = 28,
|
|
||||||
ImageFormatR8i = 29,
|
|
||||||
ImageFormatRgba32ui = 30,
|
|
||||||
ImageFormatRgba16ui = 31,
|
|
||||||
ImageFormatRgba8ui = 32,
|
|
||||||
ImageFormatR32ui = 33,
|
|
||||||
ImageFormatRgb10a2ui = 34,
|
|
||||||
ImageFormatRg32ui = 35,
|
|
||||||
ImageFormatRg16ui = 36,
|
|
||||||
ImageFormatRg8ui = 37,
|
|
||||||
ImageFormatR16ui = 38,
|
|
||||||
ImageFormatR8ui = 39,
|
|
||||||
ImageFormatMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ImageChannelOrder {
|
|
||||||
ImageChannelOrderR = 0,
|
|
||||||
ImageChannelOrderA = 1,
|
|
||||||
ImageChannelOrderRG = 2,
|
|
||||||
ImageChannelOrderRA = 3,
|
|
||||||
ImageChannelOrderRGB = 4,
|
|
||||||
ImageChannelOrderRGBA = 5,
|
|
||||||
ImageChannelOrderBGRA = 6,
|
|
||||||
ImageChannelOrderARGB = 7,
|
|
||||||
ImageChannelOrderIntensity = 8,
|
|
||||||
ImageChannelOrderLuminance = 9,
|
|
||||||
ImageChannelOrderRx = 10,
|
|
||||||
ImageChannelOrderRGx = 11,
|
|
||||||
ImageChannelOrderRGBx = 12,
|
|
||||||
ImageChannelOrderDepth = 13,
|
|
||||||
ImageChannelOrderDepthStencil = 14,
|
|
||||||
ImageChannelOrdersRGB = 15,
|
|
||||||
ImageChannelOrdersRGBx = 16,
|
|
||||||
ImageChannelOrdersRGBA = 17,
|
|
||||||
ImageChannelOrdersBGRA = 18,
|
|
||||||
ImageChannelOrderABGR = 19,
|
|
||||||
ImageChannelOrderMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ImageChannelDataType {
|
|
||||||
ImageChannelDataTypeSnormInt8 = 0,
|
|
||||||
ImageChannelDataTypeSnormInt16 = 1,
|
|
||||||
ImageChannelDataTypeUnormInt8 = 2,
|
|
||||||
ImageChannelDataTypeUnormInt16 = 3,
|
|
||||||
ImageChannelDataTypeUnormShort565 = 4,
|
|
||||||
ImageChannelDataTypeUnormShort555 = 5,
|
|
||||||
ImageChannelDataTypeUnormInt101010 = 6,
|
|
||||||
ImageChannelDataTypeSignedInt8 = 7,
|
|
||||||
ImageChannelDataTypeSignedInt16 = 8,
|
|
||||||
ImageChannelDataTypeSignedInt32 = 9,
|
|
||||||
ImageChannelDataTypeUnsignedInt8 = 10,
|
|
||||||
ImageChannelDataTypeUnsignedInt16 = 11,
|
|
||||||
ImageChannelDataTypeUnsignedInt32 = 12,
|
|
||||||
ImageChannelDataTypeHalfFloat = 13,
|
|
||||||
ImageChannelDataTypeFloat = 14,
|
|
||||||
ImageChannelDataTypeUnormInt24 = 15,
|
|
||||||
ImageChannelDataTypeUnormInt101010_2 = 16,
|
|
||||||
ImageChannelDataTypeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ImageOperandsShift {
|
|
||||||
ImageOperandsBiasShift = 0,
|
|
||||||
ImageOperandsLodShift = 1,
|
|
||||||
ImageOperandsGradShift = 2,
|
|
||||||
ImageOperandsConstOffsetShift = 3,
|
|
||||||
ImageOperandsOffsetShift = 4,
|
|
||||||
ImageOperandsConstOffsetsShift = 5,
|
|
||||||
ImageOperandsSampleShift = 6,
|
|
||||||
ImageOperandsMinLodShift = 7,
|
|
||||||
ImageOperandsMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ImageOperandsMask {
|
|
||||||
ImageOperandsMaskNone = 0,
|
|
||||||
ImageOperandsBiasMask = 0x00000001,
|
|
||||||
ImageOperandsLodMask = 0x00000002,
|
|
||||||
ImageOperandsGradMask = 0x00000004,
|
|
||||||
ImageOperandsConstOffsetMask = 0x00000008,
|
|
||||||
ImageOperandsOffsetMask = 0x00000010,
|
|
||||||
ImageOperandsConstOffsetsMask = 0x00000020,
|
|
||||||
ImageOperandsSampleMask = 0x00000040,
|
|
||||||
ImageOperandsMinLodMask = 0x00000080,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FPFastMathModeShift {
|
|
||||||
FPFastMathModeNotNaNShift = 0,
|
|
||||||
FPFastMathModeNotInfShift = 1,
|
|
||||||
FPFastMathModeNSZShift = 2,
|
|
||||||
FPFastMathModeAllowRecipShift = 3,
|
|
||||||
FPFastMathModeFastShift = 4,
|
|
||||||
FPFastMathModeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FPFastMathModeMask {
|
|
||||||
FPFastMathModeMaskNone = 0,
|
|
||||||
FPFastMathModeNotNaNMask = 0x00000001,
|
|
||||||
FPFastMathModeNotInfMask = 0x00000002,
|
|
||||||
FPFastMathModeNSZMask = 0x00000004,
|
|
||||||
FPFastMathModeAllowRecipMask = 0x00000008,
|
|
||||||
FPFastMathModeFastMask = 0x00000010,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FPRoundingMode {
|
|
||||||
FPRoundingModeRTE = 0,
|
|
||||||
FPRoundingModeRTZ = 1,
|
|
||||||
FPRoundingModeRTP = 2,
|
|
||||||
FPRoundingModeRTN = 3,
|
|
||||||
FPRoundingModeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum LinkageType {
|
|
||||||
LinkageTypeExport = 0,
|
|
||||||
LinkageTypeImport = 1,
|
|
||||||
LinkageTypeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum AccessQualifier {
|
|
||||||
AccessQualifierReadOnly = 0,
|
|
||||||
AccessQualifierWriteOnly = 1,
|
|
||||||
AccessQualifierReadWrite = 2,
|
|
||||||
AccessQualifierMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FunctionParameterAttribute {
|
|
||||||
FunctionParameterAttributeZext = 0,
|
|
||||||
FunctionParameterAttributeSext = 1,
|
|
||||||
FunctionParameterAttributeByVal = 2,
|
|
||||||
FunctionParameterAttributeSret = 3,
|
|
||||||
FunctionParameterAttributeNoAlias = 4,
|
|
||||||
FunctionParameterAttributeNoCapture = 5,
|
|
||||||
FunctionParameterAttributeNoWrite = 6,
|
|
||||||
FunctionParameterAttributeNoReadWrite = 7,
|
|
||||||
FunctionParameterAttributeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Decoration {
|
|
||||||
DecorationRelaxedPrecision = 0,
|
|
||||||
DecorationSpecId = 1,
|
|
||||||
DecorationBlock = 2,
|
|
||||||
DecorationBufferBlock = 3,
|
|
||||||
DecorationRowMajor = 4,
|
|
||||||
DecorationColMajor = 5,
|
|
||||||
DecorationArrayStride = 6,
|
|
||||||
DecorationMatrixStride = 7,
|
|
||||||
DecorationGLSLShared = 8,
|
|
||||||
DecorationGLSLPacked = 9,
|
|
||||||
DecorationCPacked = 10,
|
|
||||||
DecorationBuiltIn = 11,
|
|
||||||
DecorationNoPerspective = 13,
|
|
||||||
DecorationFlat = 14,
|
|
||||||
DecorationPatch = 15,
|
|
||||||
DecorationCentroid = 16,
|
|
||||||
DecorationSample = 17,
|
|
||||||
DecorationInvariant = 18,
|
|
||||||
DecorationRestrict = 19,
|
|
||||||
DecorationAliased = 20,
|
|
||||||
DecorationVolatile = 21,
|
|
||||||
DecorationConstant = 22,
|
|
||||||
DecorationCoherent = 23,
|
|
||||||
DecorationNonWritable = 24,
|
|
||||||
DecorationNonReadable = 25,
|
|
||||||
DecorationUniform = 26,
|
|
||||||
DecorationSaturatedConversion = 28,
|
|
||||||
DecorationStream = 29,
|
|
||||||
DecorationLocation = 30,
|
|
||||||
DecorationComponent = 31,
|
|
||||||
DecorationIndex = 32,
|
|
||||||
DecorationBinding = 33,
|
|
||||||
DecorationDescriptorSet = 34,
|
|
||||||
DecorationOffset = 35,
|
|
||||||
DecorationXfbBuffer = 36,
|
|
||||||
DecorationXfbStride = 37,
|
|
||||||
DecorationFuncParamAttr = 38,
|
|
||||||
DecorationFPRoundingMode = 39,
|
|
||||||
DecorationFPFastMathMode = 40,
|
|
||||||
DecorationLinkageAttributes = 41,
|
|
||||||
DecorationNoContraction = 42,
|
|
||||||
DecorationInputAttachmentIndex = 43,
|
|
||||||
DecorationAlignment = 44,
|
|
||||||
DecorationMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum BuiltIn {
|
|
||||||
BuiltInPosition = 0,
|
|
||||||
BuiltInPointSize = 1,
|
|
||||||
BuiltInClipDistance = 3,
|
|
||||||
BuiltInCullDistance = 4,
|
|
||||||
BuiltInVertexId = 5,
|
|
||||||
BuiltInInstanceId = 6,
|
|
||||||
BuiltInPrimitiveId = 7,
|
|
||||||
BuiltInInvocationId = 8,
|
|
||||||
BuiltInLayer = 9,
|
|
||||||
BuiltInViewportIndex = 10,
|
|
||||||
BuiltInTessLevelOuter = 11,
|
|
||||||
BuiltInTessLevelInner = 12,
|
|
||||||
BuiltInTessCoord = 13,
|
|
||||||
BuiltInPatchVertices = 14,
|
|
||||||
BuiltInFragCoord = 15,
|
|
||||||
BuiltInPointCoord = 16,
|
|
||||||
BuiltInFrontFacing = 17,
|
|
||||||
BuiltInSampleId = 18,
|
|
||||||
BuiltInSamplePosition = 19,
|
|
||||||
BuiltInSampleMask = 20,
|
|
||||||
BuiltInFragDepth = 22,
|
|
||||||
BuiltInHelperInvocation = 23,
|
|
||||||
BuiltInNumWorkgroups = 24,
|
|
||||||
BuiltInWorkgroupSize = 25,
|
|
||||||
BuiltInWorkgroupId = 26,
|
|
||||||
BuiltInLocalInvocationId = 27,
|
|
||||||
BuiltInGlobalInvocationId = 28,
|
|
||||||
BuiltInLocalInvocationIndex = 29,
|
|
||||||
BuiltInWorkDim = 30,
|
|
||||||
BuiltInGlobalSize = 31,
|
|
||||||
BuiltInEnqueuedWorkgroupSize = 32,
|
|
||||||
BuiltInGlobalOffset = 33,
|
|
||||||
BuiltInGlobalLinearId = 34,
|
|
||||||
BuiltInSubgroupSize = 36,
|
|
||||||
BuiltInSubgroupMaxSize = 37,
|
|
||||||
BuiltInNumSubgroups = 38,
|
|
||||||
BuiltInNumEnqueuedSubgroups = 39,
|
|
||||||
BuiltInSubgroupId = 40,
|
|
||||||
BuiltInSubgroupLocalInvocationId = 41,
|
|
||||||
BuiltInVertexIndex = 42,
|
|
||||||
BuiltInInstanceIndex = 43,
|
|
||||||
BuiltInSubgroupEqMaskKHR = 4416,
|
|
||||||
BuiltInSubgroupGeMaskKHR = 4417,
|
|
||||||
BuiltInSubgroupGtMaskKHR = 4418,
|
|
||||||
BuiltInSubgroupLeMaskKHR = 4419,
|
|
||||||
BuiltInSubgroupLtMaskKHR = 4420,
|
|
||||||
BuiltInBaseVertex = 4424,
|
|
||||||
BuiltInBaseInstance = 4425,
|
|
||||||
BuiltInDrawIndex = 4426,
|
|
||||||
BuiltInMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum SelectionControlShift {
|
|
||||||
SelectionControlFlattenShift = 0,
|
|
||||||
SelectionControlDontFlattenShift = 1,
|
|
||||||
SelectionControlMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum SelectionControlMask {
|
|
||||||
SelectionControlMaskNone = 0,
|
|
||||||
SelectionControlFlattenMask = 0x00000001,
|
|
||||||
SelectionControlDontFlattenMask = 0x00000002,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum LoopControlShift {
|
|
||||||
LoopControlUnrollShift = 0,
|
|
||||||
LoopControlDontUnrollShift = 1,
|
|
||||||
LoopControlMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum LoopControlMask {
|
|
||||||
LoopControlMaskNone = 0,
|
|
||||||
LoopControlUnrollMask = 0x00000001,
|
|
||||||
LoopControlDontUnrollMask = 0x00000002,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FunctionControlShift {
|
|
||||||
FunctionControlInlineShift = 0,
|
|
||||||
FunctionControlDontInlineShift = 1,
|
|
||||||
FunctionControlPureShift = 2,
|
|
||||||
FunctionControlConstShift = 3,
|
|
||||||
FunctionControlMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FunctionControlMask {
|
|
||||||
FunctionControlMaskNone = 0,
|
|
||||||
FunctionControlInlineMask = 0x00000001,
|
|
||||||
FunctionControlDontInlineMask = 0x00000002,
|
|
||||||
FunctionControlPureMask = 0x00000004,
|
|
||||||
FunctionControlConstMask = 0x00000008,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MemorySemanticsShift {
|
|
||||||
MemorySemanticsAcquireShift = 1,
|
|
||||||
MemorySemanticsReleaseShift = 2,
|
|
||||||
MemorySemanticsAcquireReleaseShift = 3,
|
|
||||||
MemorySemanticsSequentiallyConsistentShift = 4,
|
|
||||||
MemorySemanticsUniformMemoryShift = 6,
|
|
||||||
MemorySemanticsSubgroupMemoryShift = 7,
|
|
||||||
MemorySemanticsWorkgroupMemoryShift = 8,
|
|
||||||
MemorySemanticsCrossWorkgroupMemoryShift = 9,
|
|
||||||
MemorySemanticsAtomicCounterMemoryShift = 10,
|
|
||||||
MemorySemanticsImageMemoryShift = 11,
|
|
||||||
MemorySemanticsMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MemorySemanticsMask {
|
|
||||||
MemorySemanticsMaskNone = 0,
|
|
||||||
MemorySemanticsAcquireMask = 0x00000002,
|
|
||||||
MemorySemanticsReleaseMask = 0x00000004,
|
|
||||||
MemorySemanticsAcquireReleaseMask = 0x00000008,
|
|
||||||
MemorySemanticsSequentiallyConsistentMask = 0x00000010,
|
|
||||||
MemorySemanticsUniformMemoryMask = 0x00000040,
|
|
||||||
MemorySemanticsSubgroupMemoryMask = 0x00000080,
|
|
||||||
MemorySemanticsWorkgroupMemoryMask = 0x00000100,
|
|
||||||
MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
|
|
||||||
MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
|
|
||||||
MemorySemanticsImageMemoryMask = 0x00000800,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MemoryAccessShift {
|
|
||||||
MemoryAccessVolatileShift = 0,
|
|
||||||
MemoryAccessAlignedShift = 1,
|
|
||||||
MemoryAccessNontemporalShift = 2,
|
|
||||||
MemoryAccessMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MemoryAccessMask {
|
|
||||||
MemoryAccessMaskNone = 0,
|
|
||||||
MemoryAccessVolatileMask = 0x00000001,
|
|
||||||
MemoryAccessAlignedMask = 0x00000002,
|
|
||||||
MemoryAccessNontemporalMask = 0x00000004,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Scope {
|
|
||||||
ScopeCrossDevice = 0,
|
|
||||||
ScopeDevice = 1,
|
|
||||||
ScopeWorkgroup = 2,
|
|
||||||
ScopeSubgroup = 3,
|
|
||||||
ScopeInvocation = 4,
|
|
||||||
ScopeMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum GroupOperation {
|
|
||||||
GroupOperationReduce = 0,
|
|
||||||
GroupOperationInclusiveScan = 1,
|
|
||||||
GroupOperationExclusiveScan = 2,
|
|
||||||
GroupOperationMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum KernelEnqueueFlags {
|
|
||||||
KernelEnqueueFlagsNoWait = 0,
|
|
||||||
KernelEnqueueFlagsWaitKernel = 1,
|
|
||||||
KernelEnqueueFlagsWaitWorkGroup = 2,
|
|
||||||
KernelEnqueueFlagsMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum KernelProfilingInfoShift {
|
|
||||||
KernelProfilingInfoCmdExecTimeShift = 0,
|
|
||||||
KernelProfilingInfoMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum KernelProfilingInfoMask {
|
|
||||||
KernelProfilingInfoMaskNone = 0,
|
|
||||||
KernelProfilingInfoCmdExecTimeMask = 0x00000001,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Capability {
|
|
||||||
CapabilityMatrix = 0,
|
|
||||||
CapabilityShader = 1,
|
|
||||||
CapabilityGeometry = 2,
|
|
||||||
CapabilityTessellation = 3,
|
|
||||||
CapabilityAddresses = 4,
|
|
||||||
CapabilityLinkage = 5,
|
|
||||||
CapabilityKernel = 6,
|
|
||||||
CapabilityVector16 = 7,
|
|
||||||
CapabilityFloat16Buffer = 8,
|
|
||||||
CapabilityFloat16 = 9,
|
|
||||||
CapabilityFloat64 = 10,
|
|
||||||
CapabilityInt64 = 11,
|
|
||||||
CapabilityInt64Atomics = 12,
|
|
||||||
CapabilityImageBasic = 13,
|
|
||||||
CapabilityImageReadWrite = 14,
|
|
||||||
CapabilityImageMipmap = 15,
|
|
||||||
CapabilityPipes = 17,
|
|
||||||
CapabilityGroups = 18,
|
|
||||||
CapabilityDeviceEnqueue = 19,
|
|
||||||
CapabilityLiteralSampler = 20,
|
|
||||||
CapabilityAtomicStorage = 21,
|
|
||||||
CapabilityInt16 = 22,
|
|
||||||
CapabilityTessellationPointSize = 23,
|
|
||||||
CapabilityGeometryPointSize = 24,
|
|
||||||
CapabilityImageGatherExtended = 25,
|
|
||||||
CapabilityStorageImageMultisample = 27,
|
|
||||||
CapabilityUniformBufferArrayDynamicIndexing = 28,
|
|
||||||
CapabilitySampledImageArrayDynamicIndexing = 29,
|
|
||||||
CapabilityStorageBufferArrayDynamicIndexing = 30,
|
|
||||||
CapabilityStorageImageArrayDynamicIndexing = 31,
|
|
||||||
CapabilityClipDistance = 32,
|
|
||||||
CapabilityCullDistance = 33,
|
|
||||||
CapabilityImageCubeArray = 34,
|
|
||||||
CapabilitySampleRateShading = 35,
|
|
||||||
CapabilityImageRect = 36,
|
|
||||||
CapabilitySampledRect = 37,
|
|
||||||
CapabilityGenericPointer = 38,
|
|
||||||
CapabilityInt8 = 39,
|
|
||||||
CapabilityInputAttachment = 40,
|
|
||||||
CapabilitySparseResidency = 41,
|
|
||||||
CapabilityMinLod = 42,
|
|
||||||
CapabilitySampled1D = 43,
|
|
||||||
CapabilityImage1D = 44,
|
|
||||||
CapabilitySampledCubeArray = 45,
|
|
||||||
CapabilitySampledBuffer = 46,
|
|
||||||
CapabilityImageBuffer = 47,
|
|
||||||
CapabilityImageMSArray = 48,
|
|
||||||
CapabilityStorageImageExtendedFormats = 49,
|
|
||||||
CapabilityImageQuery = 50,
|
|
||||||
CapabilityDerivativeControl = 51,
|
|
||||||
CapabilityInterpolationFunction = 52,
|
|
||||||
CapabilityTransformFeedback = 53,
|
|
||||||
CapabilityGeometryStreams = 54,
|
|
||||||
CapabilityStorageImageReadWithoutFormat = 55,
|
|
||||||
CapabilityStorageImageWriteWithoutFormat = 56,
|
|
||||||
CapabilityMultiViewport = 57,
|
|
||||||
CapabilitySubgroupBallotKHR = 4423,
|
|
||||||
CapabilityDrawParameters = 4427,
|
|
||||||
CapabilityMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Op {
|
|
||||||
OpNop = 0,
|
|
||||||
OpUndef = 1,
|
|
||||||
OpSourceContinued = 2,
|
|
||||||
OpSource = 3,
|
|
||||||
OpSourceExtension = 4,
|
|
||||||
OpName = 5,
|
|
||||||
OpMemberName = 6,
|
|
||||||
OpString = 7,
|
|
||||||
OpLine = 8,
|
|
||||||
OpExtension = 10,
|
|
||||||
OpExtInstImport = 11,
|
|
||||||
OpExtInst = 12,
|
|
||||||
OpMemoryModel = 14,
|
|
||||||
OpEntryPoint = 15,
|
|
||||||
OpExecutionMode = 16,
|
|
||||||
OpCapability = 17,
|
|
||||||
OpTypeVoid = 19,
|
|
||||||
OpTypeBool = 20,
|
|
||||||
OpTypeInt = 21,
|
|
||||||
OpTypeFloat = 22,
|
|
||||||
OpTypeVector = 23,
|
|
||||||
OpTypeMatrix = 24,
|
|
||||||
OpTypeImage = 25,
|
|
||||||
OpTypeSampler = 26,
|
|
||||||
OpTypeSampledImage = 27,
|
|
||||||
OpTypeArray = 28,
|
|
||||||
OpTypeRuntimeArray = 29,
|
|
||||||
OpTypeStruct = 30,
|
|
||||||
OpTypeOpaque = 31,
|
|
||||||
OpTypePointer = 32,
|
|
||||||
OpTypeFunction = 33,
|
|
||||||
OpTypeEvent = 34,
|
|
||||||
OpTypeDeviceEvent = 35,
|
|
||||||
OpTypeReserveId = 36,
|
|
||||||
OpTypeQueue = 37,
|
|
||||||
OpTypePipe = 38,
|
|
||||||
OpTypeForwardPointer = 39,
|
|
||||||
OpConstantTrue = 41,
|
|
||||||
OpConstantFalse = 42,
|
|
||||||
OpConstant = 43,
|
|
||||||
OpConstantComposite = 44,
|
|
||||||
OpConstantSampler = 45,
|
|
||||||
OpConstantNull = 46,
|
|
||||||
OpSpecConstantTrue = 48,
|
|
||||||
OpSpecConstantFalse = 49,
|
|
||||||
OpSpecConstant = 50,
|
|
||||||
OpSpecConstantComposite = 51,
|
|
||||||
OpSpecConstantOp = 52,
|
|
||||||
OpFunction = 54,
|
|
||||||
OpFunctionParameter = 55,
|
|
||||||
OpFunctionEnd = 56,
|
|
||||||
OpFunctionCall = 57,
|
|
||||||
OpVariable = 59,
|
|
||||||
OpImageTexelPointer = 60,
|
|
||||||
OpLoad = 61,
|
|
||||||
OpStore = 62,
|
|
||||||
OpCopyMemory = 63,
|
|
||||||
OpCopyMemorySized = 64,
|
|
||||||
OpAccessChain = 65,
|
|
||||||
OpInBoundsAccessChain = 66,
|
|
||||||
OpPtrAccessChain = 67,
|
|
||||||
OpArrayLength = 68,
|
|
||||||
OpGenericPtrMemSemantics = 69,
|
|
||||||
OpInBoundsPtrAccessChain = 70,
|
|
||||||
OpDecorate = 71,
|
|
||||||
OpMemberDecorate = 72,
|
|
||||||
OpDecorationGroup = 73,
|
|
||||||
OpGroupDecorate = 74,
|
|
||||||
OpGroupMemberDecorate = 75,
|
|
||||||
OpVectorExtractDynamic = 77,
|
|
||||||
OpVectorInsertDynamic = 78,
|
|
||||||
OpVectorShuffle = 79,
|
|
||||||
OpCompositeConstruct = 80,
|
|
||||||
OpCompositeExtract = 81,
|
|
||||||
OpCompositeInsert = 82,
|
|
||||||
OpCopyObject = 83,
|
|
||||||
OpTranspose = 84,
|
|
||||||
OpSampledImage = 86,
|
|
||||||
OpImageSampleImplicitLod = 87,
|
|
||||||
OpImageSampleExplicitLod = 88,
|
|
||||||
OpImageSampleDrefImplicitLod = 89,
|
|
||||||
OpImageSampleDrefExplicitLod = 90,
|
|
||||||
OpImageSampleProjImplicitLod = 91,
|
|
||||||
OpImageSampleProjExplicitLod = 92,
|
|
||||||
OpImageSampleProjDrefImplicitLod = 93,
|
|
||||||
OpImageSampleProjDrefExplicitLod = 94,
|
|
||||||
OpImageFetch = 95,
|
|
||||||
OpImageGather = 96,
|
|
||||||
OpImageDrefGather = 97,
|
|
||||||
OpImageRead = 98,
|
|
||||||
OpImageWrite = 99,
|
|
||||||
OpImage = 100,
|
|
||||||
OpImageQueryFormat = 101,
|
|
||||||
OpImageQueryOrder = 102,
|
|
||||||
OpImageQuerySizeLod = 103,
|
|
||||||
OpImageQuerySize = 104,
|
|
||||||
OpImageQueryLod = 105,
|
|
||||||
OpImageQueryLevels = 106,
|
|
||||||
OpImageQuerySamples = 107,
|
|
||||||
OpConvertFToU = 109,
|
|
||||||
OpConvertFToS = 110,
|
|
||||||
OpConvertSToF = 111,
|
|
||||||
OpConvertUToF = 112,
|
|
||||||
OpUConvert = 113,
|
|
||||||
OpSConvert = 114,
|
|
||||||
OpFConvert = 115,
|
|
||||||
OpQuantizeToF16 = 116,
|
|
||||||
OpConvertPtrToU = 117,
|
|
||||||
OpSatConvertSToU = 118,
|
|
||||||
OpSatConvertUToS = 119,
|
|
||||||
OpConvertUToPtr = 120,
|
|
||||||
OpPtrCastToGeneric = 121,
|
|
||||||
OpGenericCastToPtr = 122,
|
|
||||||
OpGenericCastToPtrExplicit = 123,
|
|
||||||
OpBitcast = 124,
|
|
||||||
OpSNegate = 126,
|
|
||||||
OpFNegate = 127,
|
|
||||||
OpIAdd = 128,
|
|
||||||
OpFAdd = 129,
|
|
||||||
OpISub = 130,
|
|
||||||
OpFSub = 131,
|
|
||||||
OpIMul = 132,
|
|
||||||
OpFMul = 133,
|
|
||||||
OpUDiv = 134,
|
|
||||||
OpSDiv = 135,
|
|
||||||
OpFDiv = 136,
|
|
||||||
OpUMod = 137,
|
|
||||||
OpSRem = 138,
|
|
||||||
OpSMod = 139,
|
|
||||||
OpFRem = 140,
|
|
||||||
OpFMod = 141,
|
|
||||||
OpVectorTimesScalar = 142,
|
|
||||||
OpMatrixTimesScalar = 143,
|
|
||||||
OpVectorTimesMatrix = 144,
|
|
||||||
OpMatrixTimesVector = 145,
|
|
||||||
OpMatrixTimesMatrix = 146,
|
|
||||||
OpOuterProduct = 147,
|
|
||||||
OpDot = 148,
|
|
||||||
OpIAddCarry = 149,
|
|
||||||
OpISubBorrow = 150,
|
|
||||||
OpUMulExtended = 151,
|
|
||||||
OpSMulExtended = 152,
|
|
||||||
OpAny = 154,
|
|
||||||
OpAll = 155,
|
|
||||||
OpIsNan = 156,
|
|
||||||
OpIsInf = 157,
|
|
||||||
OpIsFinite = 158,
|
|
||||||
OpIsNormal = 159,
|
|
||||||
OpSignBitSet = 160,
|
|
||||||
OpLessOrGreater = 161,
|
|
||||||
OpOrdered = 162,
|
|
||||||
OpUnordered = 163,
|
|
||||||
OpLogicalEqual = 164,
|
|
||||||
OpLogicalNotEqual = 165,
|
|
||||||
OpLogicalOr = 166,
|
|
||||||
OpLogicalAnd = 167,
|
|
||||||
OpLogicalNot = 168,
|
|
||||||
OpSelect = 169,
|
|
||||||
OpIEqual = 170,
|
|
||||||
OpINotEqual = 171,
|
|
||||||
OpUGreaterThan = 172,
|
|
||||||
OpSGreaterThan = 173,
|
|
||||||
OpUGreaterThanEqual = 174,
|
|
||||||
OpSGreaterThanEqual = 175,
|
|
||||||
OpULessThan = 176,
|
|
||||||
OpSLessThan = 177,
|
|
||||||
OpULessThanEqual = 178,
|
|
||||||
OpSLessThanEqual = 179,
|
|
||||||
OpFOrdEqual = 180,
|
|
||||||
OpFUnordEqual = 181,
|
|
||||||
OpFOrdNotEqual = 182,
|
|
||||||
OpFUnordNotEqual = 183,
|
|
||||||
OpFOrdLessThan = 184,
|
|
||||||
OpFUnordLessThan = 185,
|
|
||||||
OpFOrdGreaterThan = 186,
|
|
||||||
OpFUnordGreaterThan = 187,
|
|
||||||
OpFOrdLessThanEqual = 188,
|
|
||||||
OpFUnordLessThanEqual = 189,
|
|
||||||
OpFOrdGreaterThanEqual = 190,
|
|
||||||
OpFUnordGreaterThanEqual = 191,
|
|
||||||
OpShiftRightLogical = 194,
|
|
||||||
OpShiftRightArithmetic = 195,
|
|
||||||
OpShiftLeftLogical = 196,
|
|
||||||
OpBitwiseOr = 197,
|
|
||||||
OpBitwiseXor = 198,
|
|
||||||
OpBitwiseAnd = 199,
|
|
||||||
OpNot = 200,
|
|
||||||
OpBitFieldInsert = 201,
|
|
||||||
OpBitFieldSExtract = 202,
|
|
||||||
OpBitFieldUExtract = 203,
|
|
||||||
OpBitReverse = 204,
|
|
||||||
OpBitCount = 205,
|
|
||||||
OpDPdx = 207,
|
|
||||||
OpDPdy = 208,
|
|
||||||
OpFwidth = 209,
|
|
||||||
OpDPdxFine = 210,
|
|
||||||
OpDPdyFine = 211,
|
|
||||||
OpFwidthFine = 212,
|
|
||||||
OpDPdxCoarse = 213,
|
|
||||||
OpDPdyCoarse = 214,
|
|
||||||
OpFwidthCoarse = 215,
|
|
||||||
OpEmitVertex = 218,
|
|
||||||
OpEndPrimitive = 219,
|
|
||||||
OpEmitStreamVertex = 220,
|
|
||||||
OpEndStreamPrimitive = 221,
|
|
||||||
OpControlBarrier = 224,
|
|
||||||
OpMemoryBarrier = 225,
|
|
||||||
OpAtomicLoad = 227,
|
|
||||||
OpAtomicStore = 228,
|
|
||||||
OpAtomicExchange = 229,
|
|
||||||
OpAtomicCompareExchange = 230,
|
|
||||||
OpAtomicCompareExchangeWeak = 231,
|
|
||||||
OpAtomicIIncrement = 232,
|
|
||||||
OpAtomicIDecrement = 233,
|
|
||||||
OpAtomicIAdd = 234,
|
|
||||||
OpAtomicISub = 235,
|
|
||||||
OpAtomicSMin = 236,
|
|
||||||
OpAtomicUMin = 237,
|
|
||||||
OpAtomicSMax = 238,
|
|
||||||
OpAtomicUMax = 239,
|
|
||||||
OpAtomicAnd = 240,
|
|
||||||
OpAtomicOr = 241,
|
|
||||||
OpAtomicXor = 242,
|
|
||||||
OpPhi = 245,
|
|
||||||
OpLoopMerge = 246,
|
|
||||||
OpSelectionMerge = 247,
|
|
||||||
OpLabel = 248,
|
|
||||||
OpBranch = 249,
|
|
||||||
OpBranchConditional = 250,
|
|
||||||
OpSwitch = 251,
|
|
||||||
OpKill = 252,
|
|
||||||
OpReturn = 253,
|
|
||||||
OpReturnValue = 254,
|
|
||||||
OpUnreachable = 255,
|
|
||||||
OpLifetimeStart = 256,
|
|
||||||
OpLifetimeStop = 257,
|
|
||||||
OpGroupAsyncCopy = 259,
|
|
||||||
OpGroupWaitEvents = 260,
|
|
||||||
OpGroupAll = 261,
|
|
||||||
OpGroupAny = 262,
|
|
||||||
OpGroupBroadcast = 263,
|
|
||||||
OpGroupIAdd = 264,
|
|
||||||
OpGroupFAdd = 265,
|
|
||||||
OpGroupFMin = 266,
|
|
||||||
OpGroupUMin = 267,
|
|
||||||
OpGroupSMin = 268,
|
|
||||||
OpGroupFMax = 269,
|
|
||||||
OpGroupUMax = 270,
|
|
||||||
OpGroupSMax = 271,
|
|
||||||
OpReadPipe = 274,
|
|
||||||
OpWritePipe = 275,
|
|
||||||
OpReservedReadPipe = 276,
|
|
||||||
OpReservedWritePipe = 277,
|
|
||||||
OpReserveReadPipePackets = 278,
|
|
||||||
OpReserveWritePipePackets = 279,
|
|
||||||
OpCommitReadPipe = 280,
|
|
||||||
OpCommitWritePipe = 281,
|
|
||||||
OpIsValidReserveId = 282,
|
|
||||||
OpGetNumPipePackets = 283,
|
|
||||||
OpGetMaxPipePackets = 284,
|
|
||||||
OpGroupReserveReadPipePackets = 285,
|
|
||||||
OpGroupReserveWritePipePackets = 286,
|
|
||||||
OpGroupCommitReadPipe = 287,
|
|
||||||
OpGroupCommitWritePipe = 288,
|
|
||||||
OpEnqueueMarker = 291,
|
|
||||||
OpEnqueueKernel = 292,
|
|
||||||
OpGetKernelNDrangeSubGroupCount = 293,
|
|
||||||
OpGetKernelNDrangeMaxSubGroupSize = 294,
|
|
||||||
OpGetKernelWorkGroupSize = 295,
|
|
||||||
OpGetKernelPreferredWorkGroupSizeMultiple = 296,
|
|
||||||
OpRetainEvent = 297,
|
|
||||||
OpReleaseEvent = 298,
|
|
||||||
OpCreateUserEvent = 299,
|
|
||||||
OpIsValidEvent = 300,
|
|
||||||
OpSetUserEventStatus = 301,
|
|
||||||
OpCaptureEventProfilingInfo = 302,
|
|
||||||
OpGetDefaultQueue = 303,
|
|
||||||
OpBuildNDRange = 304,
|
|
||||||
OpImageSparseSampleImplicitLod = 305,
|
|
||||||
OpImageSparseSampleExplicitLod = 306,
|
|
||||||
OpImageSparseSampleDrefImplicitLod = 307,
|
|
||||||
OpImageSparseSampleDrefExplicitLod = 308,
|
|
||||||
OpImageSparseSampleProjImplicitLod = 309,
|
|
||||||
OpImageSparseSampleProjExplicitLod = 310,
|
|
||||||
OpImageSparseSampleProjDrefImplicitLod = 311,
|
|
||||||
OpImageSparseSampleProjDrefExplicitLod = 312,
|
|
||||||
OpImageSparseFetch = 313,
|
|
||||||
OpImageSparseGather = 314,
|
|
||||||
OpImageSparseDrefGather = 315,
|
|
||||||
OpImageSparseTexelsResident = 316,
|
|
||||||
OpNoLine = 317,
|
|
||||||
OpAtomicFlagTestAndSet = 318,
|
|
||||||
OpAtomicFlagClear = 319,
|
|
||||||
OpImageSparseRead = 320,
|
|
||||||
OpSubgroupBallotKHR = 4421,
|
|
||||||
OpSubgroupFirstInvocationKHR = 4422,
|
|
||||||
OpMax = 0x7fffffff,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Overload operator| for mask bit combining
|
|
||||||
|
|
||||||
inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
|
|
||||||
inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
|
|
||||||
inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
|
|
||||||
inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
|
|
||||||
inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
|
|
||||||
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
|
|
||||||
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
|
|
||||||
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
|
|
||||||
|
|
||||||
} // end namespace spv
|
|
||||||
|
|
||||||
#endif // #ifndef spirv_HPP
|
|
||||||
|
|
||||||
251
vulkan.spec
251
vulkan.spec
|
|
@ -1,251 +0,0 @@
|
||||||
%global use_git 0
|
|
||||||
%if 0%{?fedora}
|
|
||||||
%global use_layers 1
|
|
||||||
%else
|
|
||||||
%global use_layers 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global commit fbb866778e513752444f1bfd6a3fea3e3f4158b1
|
|
||||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
||||||
%global srcname Vulkan-LoaderAndValidationLayers
|
|
||||||
|
|
||||||
%if 0%{?use_layers}
|
|
||||||
%global commit1 81cd764b5ffc475bc73f1fb35f75fd1171bb2343
|
|
||||||
%global srcname1 glslang
|
|
||||||
|
|
||||||
%global commit2 923a4596b44831a07060df45caacb522613730c9
|
|
||||||
%global srcname2 SPIRV-Tools
|
|
||||||
|
|
||||||
%global commit3 33d41376d378761ed3a4c791fc4b647761897f26
|
|
||||||
%global srcname3 SPIRV-Headers
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: vulkan
|
|
||||||
Version: 1.0.30.0
|
|
||||||
%if 0%{?use_git}
|
|
||||||
Release: 0.2.git%{shortcommit}%{?dist}
|
|
||||||
%else
|
|
||||||
Release: 2%{?dist}
|
|
||||||
%endif
|
|
||||||
Summary: Vulkan loader and validation layers
|
|
||||||
|
|
||||||
License: ASL 2.0
|
|
||||||
URL: https://github.com/KhronosGroup
|
|
||||||
|
|
||||||
%if 0%{?use_git}
|
|
||||||
Source0: %url/%{srcname}/archive/%{commit}.tar.gz#/%{srcname}-%{commit}.tar.gz
|
|
||||||
%else
|
|
||||||
Source0: %url/%{srcname}/archive/sdk-%{version}.tar.gz#/%{srcname}-sdk-%{version}.tar.gz
|
|
||||||
%endif
|
|
||||||
%if 0%{?use_layers}
|
|
||||||
Source1: %url/%{srcname1}/archive/%{commit1}.tar.gz#/%{srcname1}-%{commit1}.tar.gz
|
|
||||||
Source2: %url/%{srcname2}/archive/%{commit2}.tar.gz#/%{srcname2}-%{commit2}.tar.gz
|
|
||||||
Source3: %url/%{srcname3}/archive/%{commit3}.tar.gz#/%{srcname3}-%{commit3}.tar.gz
|
|
||||||
%else
|
|
||||||
Source4: https://raw.githubusercontent.com/KhronosGroup/glslang/master/SPIRV/spirv.hpp
|
|
||||||
%endif
|
|
||||||
# All patches taken from ajax's repo
|
|
||||||
# https://github.com/nwnk/Vulkan-LoaderAndValidationLayers/tree/sdk-1.0.3-fedora
|
|
||||||
Patch0: 0003-layers-Don-t-set-an-rpath.patch
|
|
||||||
Patch1: 0004-layers-Install-to-CMAKE_INSTALL_LIBDIR.patch
|
|
||||||
Patch2: 0005-loader-Add-install-rule.patch
|
|
||||||
Patch3: 0008-demos-Don-t-build-tri-or-cube.patch
|
|
||||||
|
|
||||||
# Upstream patches
|
|
||||||
Patch4: 5338f69a0a3dcc8527d81ca5f936b0e066a3d7f7.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
|
||||||
BuildRequires: gcc-c++
|
|
||||||
BuildRequires: bison
|
|
||||||
BuildRequires: cmake
|
|
||||||
BuildRequires: /usr/bin/chrpath
|
|
||||||
BuildRequires: pkgconfig(libsystemd)
|
|
||||||
BuildRequires: pkgconfig(pciaccess)
|
|
||||||
%if 0%{?fedora}
|
|
||||||
BuildRequires: python3
|
|
||||||
BuildRequires: pkgconfig(wayland-client)
|
|
||||||
BuildRequires: pkgconfig(wayland-cursor)
|
|
||||||
BuildRequires: pkgconfig(wayland-server)
|
|
||||||
BuildRequires: pkgconfig(wayland-egl)
|
|
||||||
%else
|
|
||||||
BuildRequires: python34
|
|
||||||
%endif
|
|
||||||
BuildRequires: pkgconfig(x11)
|
|
||||||
BuildRequires: pkgconfig(xcb)
|
|
||||||
|
|
||||||
Requires: vulkan-filesystem = %{version}-%{release}
|
|
||||||
|
|
||||||
%description
|
|
||||||
Vulkan is a new generation graphics and compute API that provides
|
|
||||||
high-efficiency, cross-platform access to modern GPUs used in a wide variety of
|
|
||||||
devices from PCs and consoles to mobile phones and embedded platforms.
|
|
||||||
|
|
||||||
This package contains the reference ICD loader and validation layers for
|
|
||||||
Vulkan.
|
|
||||||
|
|
||||||
%package devel
|
|
||||||
Summary: Vulkan development package
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description devel
|
|
||||||
Development headers for Vulkan applications.
|
|
||||||
|
|
||||||
%package filesystem
|
|
||||||
Summary: Vulkan filesystem package
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description filesystem
|
|
||||||
Filesystem for Vulkan.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%if 0%{?use_git}
|
|
||||||
%autosetup -p1 -n %{srcname}-%{commit}
|
|
||||||
%else
|
|
||||||
%autosetup -p1 -n %{srcname}-sdk-%{version}
|
|
||||||
%endif
|
|
||||||
%if 0%{?use_layers}
|
|
||||||
mkdir -p build/ external/glslang/build/install external/spirv-tools/build/ external/spirv-tools/external/spirv-headers
|
|
||||||
tar -xf %{SOURCE1} -C external/glslang --strip 1
|
|
||||||
tar -xf %{SOURCE2} -C external/spirv-tools --strip 1
|
|
||||||
tar -xf %{SOURCE3} -C external/spirv-tools/external/spirv-headers --strip 1
|
|
||||||
# fix spurious-executable-perm
|
|
||||||
chmod 0644 README.md
|
|
||||||
chmod 0644 external/glslang/SPIRV/spirv.hpp
|
|
||||||
%else
|
|
||||||
mkdir -p build/
|
|
||||||
cp %{SOURCE4} .
|
|
||||||
%endif
|
|
||||||
# fix wrong-script-end-of-line-encoding
|
|
||||||
sed -i 's/\r//' README.md
|
|
||||||
|
|
||||||
# sigh inttypes
|
|
||||||
sed -i 's/inttypes.h/cinttypes/' layers/*.{cpp,h} *.py
|
|
||||||
|
|
||||||
%build
|
|
||||||
%if 0%{?use_layers}
|
|
||||||
pushd external/glslang/build/
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS ;
|
|
||||||
CXXFLAGS="$RPM_OPT_FLAGS" ; export CXXFLAGS ;
|
|
||||||
LDFLAGS="$RPM_LD_FLAGS" ; export LDFLAGS ;
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
|
|
||||||
%make_build
|
|
||||||
make install
|
|
||||||
popd
|
|
||||||
pushd external/spirv-tools/build/
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
|
|
||||||
%make_build
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
pushd build/
|
|
||||||
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=yes \
|
|
||||||
-DCMAKE_SKIP_RPATH:BOOL=yes \
|
|
||||||
-DBUILD_VKJSON=OFF \
|
|
||||||
%if 0%{?fedora}
|
|
||||||
-DBUILD_WSI_WAYLAND_SUPPORT=ON \
|
|
||||||
%endif
|
|
||||||
%if 0%{?use_layers}
|
|
||||||
..
|
|
||||||
%else
|
|
||||||
-DGLSLANG_SPIRV_INCLUDE_DIR=./ \
|
|
||||||
-DBUILD_TESTS=OFF \
|
|
||||||
-DBUILD_LAYERS=OFF ..
|
|
||||||
%endif
|
|
||||||
%make_build
|
|
||||||
popd
|
|
||||||
|
|
||||||
%install
|
|
||||||
pushd build/
|
|
||||||
%{make_install}
|
|
||||||
popd
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_includedir}
|
|
||||||
%if 0%{?use_layers}
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/vulkan/implicit_layer.d
|
|
||||||
mv %{buildroot}%{_sysconfdir}/vulkan/explicit_layer.d/ %{buildroot}%{_datadir}/vulkan/
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# remove RPATH
|
|
||||||
chrpath -d %{buildroot}%{_bindir}/vulkaninfo
|
|
||||||
|
|
||||||
cp -ai include/vulkan %{buildroot}%{_includedir}
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/vulkan/icd.d
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license LICENSE.txt COPYRIGHT.txt
|
|
||||||
%doc README.md CONTRIBUTING.md
|
|
||||||
%{_bindir}/vulkaninfo
|
|
||||||
%if 0%{?use_layers}
|
|
||||||
%{_datadir}/vulkan/explicit_layer.d/*.json
|
|
||||||
%{_libdir}/libVkLayer_*.so
|
|
||||||
%endif
|
|
||||||
%{_libdir}/lib%{name}.so.*
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
%{_includedir}/%{name}/
|
|
||||||
%{_libdir}/lib%{name}.so
|
|
||||||
|
|
||||||
%files filesystem
|
|
||||||
%dir %{_sysconfdir}/vulkan
|
|
||||||
%dir %{_sysconfdir}/vulkan/icd.d
|
|
||||||
%if 0%{?use_layers}
|
|
||||||
%dir %{_datadir}/%{name}
|
|
||||||
%dir %{_datadir}/%{name}/explicit_layer.d
|
|
||||||
%dir %{_datadir}/%{name}/implicit_layer.d
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Thu Dec 01 2016 leigh scott <leigh123linux@googlemail.com> - 1.0.30.0-2
|
|
||||||
- Fix VkLayer undefined symbol: util_GetExtensionProperties
|
|
||||||
|
|
||||||
* Sat Oct 15 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.30.0-1
|
|
||||||
- Update to 1.0.30.0 release
|
|
||||||
|
|
||||||
* Mon Oct 10 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-4
|
|
||||||
- Build with wayland support (rhbz 1383115)
|
|
||||||
|
|
||||||
* Tue Sep 27 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-3
|
|
||||||
- Move unversioned libraries
|
|
||||||
- Disable vkjson build
|
|
||||||
- Fix license tag
|
|
||||||
|
|
||||||
* Sun Sep 11 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-2
|
|
||||||
- Make layers conditional.
|
|
||||||
|
|
||||||
* Sun Sep 11 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-1
|
|
||||||
- Update to 1.0.26.0 release
|
|
||||||
|
|
||||||
* Thu Sep 08 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-0.3.gitfbb8667
|
|
||||||
- Clean up
|
|
||||||
|
|
||||||
* Thu Sep 08 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-0.2.gitfbb8667
|
|
||||||
- Change build requires python3
|
|
||||||
- Use release for cmake
|
|
||||||
- Make build verbose
|
|
||||||
|
|
||||||
* Wed Sep 07 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.26.0-0.1.gitfbb8667
|
|
||||||
- Update to latest git
|
|
||||||
|
|
||||||
* Tue Feb 16 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.0.3-0.1.git1affe90
|
|
||||||
- Add ldconfig in post/postun
|
|
||||||
- Use upstream tarball from commit + patches
|
|
||||||
- Fix versioning. In fact it was never released
|
|
||||||
- Fixup mixing of spaces/tabs
|
|
||||||
- Remove rpath from vulkaninfo
|
|
||||||
- Make filesystem subpkg noarch (it is really noarch)
|
|
||||||
- BuildRequire gcc and gcc-c++ explicitly
|
|
||||||
- Require main pkg with isa tag
|
|
||||||
- Fix perms and perm of README.md
|
|
||||||
- Use %%license tag
|
|
||||||
|
|
||||||
* Tue Feb 16 2016 Adam Jackson <ajax@redhat.com> - 1.0.3-0
|
|
||||||
- Update loader to not build cube or tri. Drop bundled LunarGLASS and llvm
|
|
||||||
since they're only needed for those demos.
|
|
||||||
|
|
||||||
* Tue Feb 16 2016 Adam Jackson <ajax@redhat.com> - 1.0.3-0
|
|
||||||
- Initial packaging
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue