vulkan: Changes to 'debian-unstable'
.gitignore | 2
BUILD.md | 101
CMakeLists.txt | 41
CONTRIBUTING.md | 2
build_windows_targets.bat | 8
cmake/FindImageMagick.cmake | 153
common/android_util.cpp | 87
common/android_util.h | 32
debian/changelog | 9
debian/patches/demos-add-install-rule.diff | 9
debian/patches/demos-dont-build-tri-or-cube-or-smoke.diff | 87
debian/patches/layers-install-to-cmake-install-libdir.diff | 26
debian/patches/loader-add-install-rule.diff | 14
debian/patches/series | 3
debian/patches/trim-build.diff | 2
debian/patches/use-mxgot-for-mips64.patch | 4
demos/CMakeLists.txt | 92
demos/android/AndroidManifest.xml.cube | 22
demos/android/AndroidManifest.xml.tri | 22
demos/android/cube-with-layers/AndroidManifest.xml | 27
demos/android/cube-with-layers/custom_rules.xml | 25
demos/android/cube-with-layers/res/values/strings.xml | 24
demos/android/cube/AndroidManifest.xml | 27
demos/android/cube/custom_rules.xml | 6
demos/android/cube/res/values/strings.xml | 24
demos/android/include/tri.frag.h | 95
demos/android/include/tri.vert.h | 128
demos/android/jni/Android.mk | 16
demos/android/jni/Application.mk | 2
demos/android/res/values/strings.xml | 24
demos/cube.c | 653
demos/cube.cpp | 2880 +
demos/smoke/CMakeLists.txt | 5
demos/smoke/Game.cpp | 36
demos/smoke/Game.h | 36
demos/smoke/Smoke.cpp | 10
demos/smoke/android/build-and-install | 27
demos/smoke/android/build.gradle | 6
demos/smoke/android/gradle/wrapper/gradle-wrapper.properties | 2
demos/smoke/android/src/main/AndroidManifest.xml | 5
demos/smoke/generate-dispatch-table | 492
demos/smoke/generate-dispatch-table.py | 492
demos/tri.c | 2797 -
demos/tri.frag | 29
demos/tri.vcxproj.user | 11
demos/tri.vert | 33
demos/vulkaninfo.c | 37
generator.py | 3318 -
genvk.py | 358
glslang_revision | 2
include/vulkan/vk_icd.h | 9
include/vulkan/vk_platform.h | 2
include/vulkan/vulkan.h | 44
include/vulkan/vulkan.hpp | 407
layers/CMakeLists.txt | 78
layers/README.md | 19
layers/core_validation.cpp | 4345 +
layers/core_validation.h | 106
layers/core_validation_error_enums.h | 13
layers/core_validation_types.h | 215
layers/descriptor_sets.cpp | 382
layers/descriptor_sets.h | 34
layers/image.cpp | 399
layers/image.h | 4
layers/linux/VkLayer_core_validation.json | 2
layers/linux/VkLayer_image.json | 2
layers/linux/VkLayer_object_tracker.json | 2
layers/linux/VkLayer_parameter_validation.json | 2
layers/linux/VkLayer_swapchain.json | 2
layers/linux/VkLayer_threading.json | 2
layers/linux/VkLayer_unique_objects.json | 2
layers/object_tracker.cpp | 1170
layers/object_tracker.h | 2
layers/parameter_validation.cpp | 1860
layers/parameter_validation_utils.h | 11
layers/spec.py | 552
layers/swapchain.cpp | 484
layers/swapchain.h | 48
layers/unique_objects.cpp | 727
layers/unique_objects.h | 565
layers/vk_layer_config.cpp | 56
layers/vk_layer_extension_utils.cpp | 8
layers/vk_layer_extension_utils.h | 8
layers/vk_layer_logging.h | 12
layers/vk_layer_settings.txt | 79
layers/vk_layer_utils.cpp | 131
layers/vk_layer_utils.h | 31
layers/vk_validation_error_database.txt | 2295
layers/vk_validation_error_messages.h | 4607 +
layers/vk_validation_layer_details.md | 34
layers/vk_validation_stats.py | 345
layers/windows/VkLayer_core_validation.json | 2
layers/windows/VkLayer_image.json | 2
layers/windows/VkLayer_object_tracker.json | 2
layers/windows/VkLayer_parameter_validation.json | 2
layers/windows/VkLayer_swapchain.json | 2
layers/windows/VkLayer_threading.json | 2
layers/windows/VkLayer_unique_objects.json | 2
libs/vkjson/CMakeLists.txt | 4
loader/CMakeLists.txt | 27
loader/LoaderAndLayerInterface.md | 90
loader/debug_report.c | 119
loader/extensions.c | 127
loader/extensions.h | 9
loader/loader.c | 821
loader/loader.h | 106
loader/table_ops.h | 31
loader/trampoline.c | 86
loader/vk-loader-generate.py | 464
loader/vk_loader_platform.h | 69
loader/wsi.c | 902
loader/wsi.h | 35
lvl_genvk.py | 275
parameter_validation_generator.py | 987
reg.py | 80
spirv-headers_revision | 2
spirv-tools_revision | 2
tests/CMakeLists.txt | 14
tests/_run_all_tests.ps1 | 4
tests/layer_validation_tests.cpp |27704 ++++++-----
tests/layers/CMakeLists.txt | 18
tests/run_loader_tests.sh | 2
tests/run_wrap_objects_tests.sh | 17
tests/vkrenderframework.cpp | 31
tests/vkrenderframework.h | 2
threading_generator.py | 467
unique_objects_generator.py | 760
update_external_sources.bat | 2
update_external_sources.sh | 78
vk-generate.py | 142
vk-layer-generate.py | 1081
vk-layer-introspect | 399
vk-layer-introspect.py | 399
vk.xml | 1645
vk_helper.py | 31
vk_layer_documentation_generate.py | 10
vulkan.py | 266
137 files changed, 38861 insertions(+), 29900 deletions(-)
New commits:
commit bbf22f9a04648bd8782eeba397a37a589615f31f
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Wed Dec 14 20:10:46 2016 +0200
refresh patches, drop upstreamed ones
diff --git a/debian/changelog b/debian/changelog
index 1fd3848..96aa9a7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ vulkan (1.0.33.0+dfsg1-1) UNRELEASED; urgency=medium
[ Timo Aaltonen ]
* New upstream release.
+ * Refresh patches.
+ * demos-add-install-rule.diff, layers-install-to-cmake-install-libdir.diff,
+ loader-add-install-rule.diff: Dropped, upstream.
-- Andreas Boll <andreas.boll.dev@gmail.com> Thu, 06 Oct 2016 11:59:16 +0200
diff --git a/debian/patches/demos-add-install-rule.diff b/debian/patches/demos-add-install-rule.diff
deleted file mode 100644
index 3347402..0000000
--- a/debian/patches/demos-add-install-rule.diff
+++ /dev/null
@@ -1,9 +0,0 @@
-Description: Add an install rule for vulkaninfo
---- a/demos/CMakeLists.txt
-+++ b/demos/CMakeLists.txt
-@@ -114,3 +114,5 @@ endif()
-
- add_executable(vulkaninfo vulkaninfo.c)
- target_link_libraries(vulkaninfo ${LIBRARIES})
-+install(TARGETS vulkaninfo RUNTIME DESTINATION /usr/bin)
-+
diff --git a/debian/patches/demos-dont-build-tri-or-cube-or-smoke.diff b/debian/patches/demos-dont-build-tri-or-cube-or-smoke.diff
index 5c73929..dfee487 100644
--- a/debian/patches/demos-dont-build-tri-or-cube-or-smoke.diff
+++ b/debian/patches/demos-dont-build-tri-or-cube-or-smoke.diff
@@ -10,21 +10,62 @@ Date: Tue Feb 16 10:05:25 2016 -0500
--- a/demos/CMakeLists.txt
+++ b/demos/CMakeLists.txt
-@@ -114,27 +114,3 @@ endif()
+@@ -25,46 +25,6 @@ elseif(UNIX)
+ else()
+ endif()
- add_executable(vulkaninfo vulkaninfo.c)
- target_link_libraries(vulkaninfo ${LIBRARIES})
+-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()
-
--if(UNIX)
-- add_executable(tri tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv)
+- 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()
-- add_executable(tri WIN32 tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv)
+- 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()
--target_link_libraries(tri ${LIBRARIES})
--
+
+ if(NOT WIN32)
+ if(BUILD_WSI_XCB_SUPPORT)
+@@ -95,43 +55,6 @@ endif()
+ add_executable(${API_LOWERCASE}info vulkaninfo.c)
+ target_link_libraries(${API_LOWERCASE}info ${LIBRARIES})
+
-if(NOT WIN32)
-- add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
-- target_link_libraries(cube ${LIBRARIES})
+- 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")
@@ -33,8 +74,30 @@ Date: Tue Feb 16 10:05:25 2016 -0500
- 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} )
+- target_link_libraries(cube ${LIBRARIES})
-endif()
-
--add_subdirectory(smoke)
+-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}))
+- if (BUILD_WSI_XCB_SUPPORT OR BUILD_WSI_WAYLAND_SUPPORT OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Android"))
+- add_subdirectory(smoke)
+- endif()
+-endif()
+
+ if(UNIX)
+ install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/debian/patches/layers-install-to-cmake-install-libdir.diff b/debian/patches/layers-install-to-cmake-install-libdir.diff
deleted file mode 100644
index 710144b..0000000
--- a/debian/patches/layers-install-to-cmake-install-libdir.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 991a05cc657345d24cb86658a2d3fbd25643bdb2
-Author: Adam Jackson <ajax@redhat.com>
-Date: Wed Feb 10 15:11:54 2016 -0500
-
- layers: Install to CMAKE_INSTALL_LIBDIR
-
---- a/layers/CMakeLists.txt
-+++ b/layers/CMakeLists.txt
-@@ -81,7 +81,7 @@ else()
- target_link_Libraries(VkLayer_${target} VkLayer_utils)
- add_dependencies(VkLayer_${target} generate_vk_layer_helpers)
- set_target_properties(VkLayer_${target} PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic")
-- install(TARGETS VkLayer_${target} DESTINATION ${PROJECT_BINARY_DIR}/install_staging)
-+ install(TARGETS VkLayer_${target} DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endmacro()
- endif()
-
-@@ -146,7 +146,7 @@ if (WIN32)
- 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 ${PROJECT_BINARY_DIR}/install_staging)
-+ 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)
diff --git a/debian/patches/loader-add-install-rule.diff b/debian/patches/loader-add-install-rule.diff
deleted file mode 100644
index b7bf0f7..0000000
--- a/debian/patches/loader-add-install-rule.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-commit 68165bda903b68520c21dd132ebc23be0177b7f4
-Author: Adam Jackson <ajax@redhat.com>
-Date: Wed Feb 10 15:17:06 2016 -0500
-
- loader: Add install rule
-
---- a/loader/CMakeLists.txt
-+++ b/loader/CMakeLists.txt
-@@ -86,4 +86,5 @@ else()
- add_library(vulkan SHARED ${LOADER_SRCS})
- set_target_properties(vulkan PROPERTIES SOVERSION "1" VERSION "1.0.26")
- target_link_libraries(vulkan -ldl -lpthread -lm)
-+ install(TARGETS vulkan DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endif()
diff --git a/debian/patches/series b/debian/patches/series
index 611ed45..8c8f655 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,4 @@
trim-build.diff
demos-dont-build-tri-or-cube-or-smoke.diff
-loader-add-install-rule.diff
-demos-add-install-rule.diff
-layers-install-to-cmake-install-libdir.diff
use-mxgot-for-mips64.patch
install-vulkan-intel-header.diff
diff --git a/debian/patches/trim-build.diff b/debian/patches/trim-build.diff
index 1992e09..40dfafd 100644
--- a/debian/patches/trim-build.diff
+++ b/debian/patches/trim-build.diff
@@ -1,6 +1,6 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -101,10 +101,10 @@ else()
+@@ -110,10 +110,10 @@ else()
endif()
option(BUILD_LOADER "Build loader" ON)
diff --git a/debian/patches/use-mxgot-for-mips64.patch b/debian/patches/use-mxgot-for-mips64.patch
index 2c1f17f..cf100e8 100644
--- a/debian/patches/use-mxgot-for-mips64.patch
+++ b/debian/patches/use-mxgot-for-mips64.patch
@@ -3,8 +3,8 @@ Author: Dejan Latinovic <Dejan.Latinovic@imgtec.com>
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
-@@ -102,6 +102,12 @@ else()
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wno-unused-function -Wno-sign-compare -fvisibility=default")
+@@ -113,6 +113,12 @@ else()
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wno-unused-function -Wno-sign-compare")
endif()
+if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips64")
commit ffe6c122351d98175411cbc9944eb0f6e734e25b
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Wed Dec 14 19:50:50 2016 +0200
update changelog
diff --git a/debian/changelog b/debian/changelog
index 7cb1345..1fd3848 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-vulkan (1.0.26.0+dfsg1-2) UNRELEASED; urgency=medium
+vulkan (1.0.33.0+dfsg1-1) UNRELEASED; urgency=medium
+ [ Andreas Boll ]
* Ship vulkan_intel.h via libvulkan-dev (Imported from Mesa source
package).
+ [ Timo Aaltonen ]
+ * New upstream release.
+
-- Andreas Boll <andreas.boll.dev@gmail.com> Thu, 06 Oct 2016 11:59:16 +0200
vulkan (1.0.26.0+dfsg1-1) unstable; urgency=medium
commit 77f8fc721521bc562c7cb385d3ea6e87b5d9e0a9
Author: Mark Young <marky@lunarg.com>
Date: Mon Nov 21 16:20:06 2016 -0700
loader: Fix debug report memory leaks
Found a couple of memory leaks in the debug report code in the loader
while testing out allocators in cube.
Change-Id: I56b401394ca43bd8eb9b4f85baa52dfa597a6f49
diff --git a/loader/debug_report.c b/loader/debug_report.c
index 8ad4102..a54314a 100644
--- a/loader/debug_report.c
+++ b/loader/debug_report.c
@@ -215,14 +215,18 @@ VkResult util_CopyDebugReportCreateInfos(
((VkDebugReportCallbackEXT *)pAllocator->pfnAllocation(
pAllocator->pUserData, n * sizeof(VkDebugReportCallbackEXT),
sizeof(void *), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT));
+ if (!pCallbacks) {
+ pAllocator->pfnFree(pAllocator->pUserData, pInfos);
+ return VK_ERROR_OUT_OF_HOST_MEMORY;
+ }
} else {
#endif
pCallbacks = *callbacks = ((VkDebugReportCallbackEXT *)malloc(
n * sizeof(VkDebugReportCallbackEXT)));
- }
- if (!pCallbacks) {
- free(pInfos);
- return VK_ERROR_OUT_OF_HOST_MEMORY;
+ if (!pCallbacks) {
+ free(pInfos);
+ return VK_ERROR_OUT_OF_HOST_MEMORY;
+ }
}
// 4th, copy each VkDebugReportCallbackCreateInfoEXT for use by
// vkDestroyInstance, and assign a unique handle to each callback (just
@@ -244,8 +248,17 @@ VkResult util_CopyDebugReportCreateInfos(
void util_FreeDebugReportCreateInfos(const VkAllocationCallbacks *pAllocator,
VkDebugReportCallbackCreateInfoEXT *infos,
VkDebugReportCallbackEXT *callbacks) {
- free(infos);
- free(callbacks);
+#if (DEBUG_DISABLE_APP_ALLOCATORS == 1)
+ {
+#else
+ if (pAllocator != NULL) {
+ pAllocator->pfnFree(pAllocator->pUserData, infos);
+ pAllocator->pfnFree(pAllocator->pUserData, callbacks);
+ } else {
+#endif
+ free(infos);
+ free(callbacks);
+ }
}
VkResult util_CreateDebugReportCallbacks(
@@ -450,6 +463,16 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyDebugReportCallback(
}
storage_idx++;
}
+
+#if (DEBUG_DISABLE_APP_ALLOCATORS == 1)
+ {
+#else
+ if (pAllocator != NULL) {
+ pAllocator->pfnFree(pAllocator->pUserData, icd_info);
+ } else {
+#endif
+ free(icd_info);
+ }
}
/*
commit 8215e0d6c5c0ddd13a7ddc3d8f5965ed92fe0e24
Author: Mark Young <marky@lunarg.com>
Date: Tue Nov 22 08:44:21 2016 -0700
docs: Fix loader doc mention of linux dirs
The Linux "Properly-Installed ICDs" section wasn't coming across
into HTML properly.
Change-Id: I2538b3c027c88ad5923d23f554bba1734c60ec06
diff --git a/loader/LoaderAndLayerInterface.md b/loader/LoaderAndLayerInterface.md
index 104eccc..c3492d3 100644
--- a/loader/LoaderAndLayerInterface.md
+++ b/loader/LoaderAndLayerInterface.md
@@ -464,11 +464,13 @@ Notice the semi-colon between "C:\\Windows\\System32\\vendorc\_icd.json" and
In order to find properly-installed ICDs, the Vulkan loader will scan the files
in the following Linux directories:
+```
/usr/local/etc/vulkan/icd.d
/usr/local/share/vulkan/icd.d
/etc/vulkan/icd.d
/usr/share/vulkan/icd.d
$HOME/.local/share/vulkan/icd.d
+```
The "/usr/local/*" directories can be configured to be other directories at build time.
commit 3fb0832efefc683ab475875a46390d5cbd213901
Author: Tony Barbour <tony@LunarG.com>
Date: Mon Nov 21 12:56:25 2016 -0700
demos: Set attachment description flag bits in cube
Fixes a cubepp crash running on AMD
Change-Id: Ie8ef8625a2e8a8a416bcbfe4a62871fef5e07f71
diff --git a/demos/cube.c b/demos/cube.c
index fb8b7c1..0cd7e0f 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -1549,6 +1549,7 @@ static void demo_prepare_render_pass(struct demo *demo) {
[0] =
{
.format = demo->format,
+ .flags = 0,
.samples = VK_SAMPLE_COUNT_1_BIT,
.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
.storeOp = VK_ATTACHMENT_STORE_OP_STORE,
@@ -1560,6 +1561,7 @@ static void demo_prepare_render_pass(struct demo *demo) {
[1] =
{
.format = demo->depth.format,
+ .flags = 0,
.samples = VK_SAMPLE_COUNT_1_BIT,
.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
.storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE,
@@ -1593,6 +1595,7 @@ static void demo_prepare_render_pass(struct demo *demo) {
const VkRenderPassCreateInfo rp_info = {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
.pNext = NULL,
+ .flags = 0,
.attachmentCount = 2,
.pAttachments = attachments,
.subpassCount = 1,
diff --git a/demos/cube.cpp b/demos/cube.cpp
index e91b0c3..4c6acd3 100644
--- a/demos/cube.cpp
+++ b/demos/cube.cpp
@@ -1742,7 +1742,6 @@ struct Demo {
// the renderpass, no barriers are necessary.
const vk::AttachmentDescription attachments[2] = {
vk::AttachmentDescription()
- .setFlags(vk::AttachmentDescriptionFlagBits::eMayAlias)
.setFormat(format)
.setSamples(vk::SampleCountFlagBits::e1)
.setLoadOp(vk::AttachmentLoadOp::eClear)
@@ -1752,7 +1751,6 @@ struct Demo {
.setInitialLayout(vk::ImageLayout::eUndefined)
.setFinalLayout(vk::ImageLayout::ePresentSrcKHR),
vk::AttachmentDescription()
- .setFlags(vk::AttachmentDescriptionFlagBits::eMayAlias)
.setFormat(depth.format)
.setSamples(vk::SampleCountFlagBits::e1)
.setLoadOp(vk::AttachmentLoadOp::eClear)
commit 11259fc3c7ba493d7041f047f19d7ce39d7c379f
Author: David Pinedo <david@lunarg.com>
Date: Thu Nov 17 15:03:16 2016 -0700
codegen: change script to handle NV ext structs
Modified vk_helper.py to handle NV-specific structures
diff --git a/vk_helper.py b/vk_helper.py
index 6d29063..9412650 100755
--- a/vk_helper.py
+++ b/vk_helper.py
@@ -377,8 +377,6 @@ def recreate_structs():
def get_struct_name_from_struct_type(struct_type):
# Note: All struct types are now camel-case
# Debug Report has an inconsistency - so need special case.
- if ("VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT" == struct_type):
- return "VkDebugReportCallbackCreateInfoEXT"
caps_struct_name = struct_type.replace("_STRUCTURE_TYPE", "")
char_idx = 0
struct_name = ''
@@ -391,6 +389,12 @@ def get_struct_name_from_struct_type(struct_type):
struct_name += caps_struct_name[char_idx].lower()
char_idx += 1
+ # Vendor extension structs ending in vendor TLA need to be uppercase.
+ if (caps_struct_name[-2:] == "NV"):
+ struct_name = struct_name[:-2] + caps_struct_name[-2:]
+ if ((caps_struct_name[-3:] == "AMD") or (caps_struct_name[-3:] == "IMG") or (caps_struct_name[-3:] == "EXT")):
+ struct_name = struct_name[:-3] + caps_struct_name[-3:]
+
return struct_name
# Emit an ifdef if incoming func matches a platform identifier
@@ -1163,12 +1167,16 @@ class StructWrapperGen:
struct_name = get_struct_name_from_struct_type(v)
if struct_name not in self.struct_dict:
continue
+ if 'WIN32' in v:
+ sh_funcs.append("#ifdef VK_USE_PLATFORM_WIN32_KHR")
print_func_name = self._get_sh_func_name(struct_name)
#sh_funcs.append('string %s(const %s* pStruct, const string prefix);' % (self._get_sh_func_name(s), typedef_fwd_dict[s]))
sh_funcs.append(' case %s:\n {' % (v))
sh_funcs.append(' return %s((%s*)pStruct, indent);' % (print_func_name, struct_name))
sh_funcs.append(' }')
sh_funcs.append(' break;')
+ if 'WIN32' in v:
+ sh_funcs.append("#endif // VK_USE_PLATFORM_WIN32_KHR")
sh_funcs.append(" default:")
sh_funcs.append(" return string();")
sh_funcs.append('%s' % lineinfo.get())
@@ -1418,7 +1426,7 @@ class StructWrapperGen:
sh_funcs.append('%s}' % (indent))
else:
sh_funcs.append('%sstructSize += pStruct->%s*sizeof(%s);' % (indent, self.struct_dict[s][m]['array_size'], self.struct_dict[s][m]['type']))
- elif self.struct_dict[s][m]['ptr'] and 'pNext' != self.struct_dict[s][m]['name']:
+ elif self.struct_dict[s][m]['ptr'] and 'pNext' != self.struct_dict[s][m]['name'] and 'dpy' != self.struct_dict[s][m]['name']:
if 'char' in self.struct_dict[s][m]['type'].lower():
sh_funcs.append('%sstructSize += (pStruct->%s != NULL) ? sizeof(%s)*(1+strlen(pStruct->%s)) : 0;' % (indent, self.struct_dict[s][m]['name'], self.struct_dict[s][m]['type'], self.struct_dict[s][m]['name']))
elif is_type(self.struct_dict[s][m]['type'], 'struct'):
@@ -1460,6 +1468,8 @@ class StructWrapperGen:
if struct_name not in self.struct_dict:
continue
+ if 'WIN32' in v:
+ sh_funcs.append("#ifdef VK_USE_PLATFORM_WIN32_KHR")
sh_funcs.append('%scase %s:' % (indent, v))
sh_funcs.append('%s{' % (indent))
indent += ' '
@@ -1467,6 +1477,8 @@ class StructWrapperGen:
sh_funcs.append('%sbreak;' % (indent))
indent = indent[:-4]
sh_funcs.append('%s}' % (indent))
+ if 'WIN32' in v:
+ sh_funcs.append("#endif // VK_USE_PLATFORM_WIN32_KHR")
sh_funcs.append('%sdefault:' % (indent))
indent += ' '
sh_funcs.append('%sassert(0);' % (indent))
commit 07467d23d3233ff1ea7efc702d0e9ebfc72f379c
Author: Mark Lobodzinski <mark@lunarg.com>
Date: Thu Nov 17 10:20:12 2016 -0700
Revert "layers: Update vulkan.py with new extensions"
This reverts commit f504ff6e45bb15a0517a8de2e2d75e90df7e4627.
This caused huge issues in the VulkanTools repo, reverting for
now.
diff --git a/vulkan.py b/vulkan.py
index a42ca3b..9000765 100644
--- a/vulkan.py
+++ b/vulkan.py
@@ -1,8 +1,9 @@
-"""Vulkan API description"""
-# See vulkan_api_generator.py for modifications
+" ""VK API description"""
# Copyright (c) 2015-2016 The Khronos Group Inc.
-# Copyright (c) 2015-2016 Valve Corporation# Copyright (c) 2015-2016 LunarG, Inc.# Copyright (c) 2015-2016 Google Inc.
+# Copyright (c) 2015-2016 Valve Corporation
+# Copyright (c) 2015-2016 LunarG, Inc.
+# Copyright (c) 2015-2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -22,11 +23,9 @@
# Author: Tobin Ehlis <tobin@lunarg.com>
# Author: Tony Barbour <tony@LunarG.com>
# Author: Gwan-gyeong Mun <kk.moon@samsung.com>
-# Author: Mark Lobodzinski <mark@lunarg.com>
-#
class Param(object):
- """Function parameter"""
+ """A function parameter."""
def __init__(self, ty, name):
self.ty = ty
@@ -42,11 +41,33 @@ class Param(object):
else:
return "%s %s" % (self.ty, self.name)
+ def indirection_level(self):
+ """Return the level of indirection."""
+ return self.ty.count("*") + self.ty.count("[")
+
+ def dereferenced_type(self, level=0):
+ """Return the type after dereferencing."""
+ if not level:
+ level = self.indirection_level()
+
+ deref = self.ty if level else ""
+ while level > 0:
+ idx = deref.rfind("[")
+ if idx < 0:
+ idx = deref.rfind("*")
+ if idx < 0:
+ deref = ""
+ break
+ deref = deref[:idx]
+ level -= 1;
+
+ return deref.rstrip()
+
class Proto(object):
- """Function prototype"""
+ """A function prototype."""
def __init__(self, ret, name, params=[]):
- # Prototype has only a param
+ # the proto has only a param
if not isinstance(params, list):
params = [params]
@@ -89,11 +110,13 @@ class Proto(object):
idx = param.ty.find("[")
if idx < 0:
idx = len(param.ty)
+
pad = 44 - idx
if pad <= 0:
pad = 1
- plist.append(" %s%s%s%s" % (param.ty[:idx], " " * pad, param.name, param.ty[idx:]))
+ plist.append(" %s%s%s%s" % (param.ty[:idx],
+ " " * pad, param.name, param.ty[idx:]))
return "%s%s %s%s(\n%s)" % (
attr + "_ATTR " if attr else "",
@@ -114,13 +137,19 @@ class Proto(object):
"""Return the params that are simple VK objects and are inputs."""
return [param for param in self.params if param.ty in objects]
+ def object_out_params(self):
+ """Return the params that are simple VK objects and are outputs."""
+ return [param for param in self.params
+ if param.dereferenced_type() in objects]
+
def __repr__(self):
param_strs = []
for param in self.params:
param_strs.append(str(param))
param_str = " [%s]" % (",\n ".join(param_strs))
- return "Proto(\"%s\", \"%s\",\n%s)" % (self.ret, self.name, param_str)
+ return "Proto(\"%s\", \"%s\",\n%s)" % \
+ (self.ret, self.name, param_str)
class Extension(object):
def __init__(self, name, headers, objects, protos, ifdef = None):
@@ -130,1537 +159,1262 @@ class Extension(object):
self.protos = protos
self.ifdef = ifdef
-
+# VK core API
VK_VERSION_1_0 = Extension(
name="VK_VERSION_1_0",
headers=["vulkan/vulkan.h"],
- ifdef="",
objects=[
"VkInstance",
"VkPhysicalDevice",
"VkDevice",
"VkQueue",
+ "VkSemaphore",
+ "VkCommandBuffer",
"VkFence",
"VkDeviceMemory",
"VkBuffer",
"VkImage",
- "VkSemaphore",
"VkEvent",
"VkQueryPool",
"VkBufferView",
"VkImageView",
"VkShaderModule",
"VkPipelineCache",
- "VkPipeline",
"VkPipelineLayout",
- "VkSampler",
+ "VkRenderPass",
+ "VkPipeline",
"VkDescriptorSetLayout",
+ "VkSampler",
"VkDescriptorPool",
"VkDescriptorSet",
"VkFramebuffer",
- "VkRenderPass",
"VkCommandPool",
- "VkCommandBuffer",
],
protos=[
Proto("VkResult", "CreateInstance",
- [
- Param("VkInstanceCreateInfo", "pCreateInfo"),
- Param("VkAllocationCallbacks", "pAllocator"),
- Param("VkInstance", "pInstance"),
- ]),
+ [Param("const VkInstanceCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocationCallbacks*", "pAllocator"),
+ Param("VkInstance*", "pInstance")]),
+
Proto("void", "DestroyInstance",
- [
- Param("VkInstance", "instance"),
- Param("VkAllocationCallbacks", "pAllocator"),
- ]),
+ [Param("VkInstance", "instance"),
+ Param("const VkAllocationCallbacks*", "pAllocator")]),
+
Proto("VkResult", "EnumeratePhysicalDevices",
- [
- Param("VkInstance", "instance"),
- Param("uint32_t", "pPhysicalDeviceCount"),
- Param("VkPhysicalDevice", "pPhysicalDevices"),
- ]),
+ [Param("VkInstance", "instance"),
+ Param("uint32_t*", "pPhysicalDeviceCount"),
+ Param("VkPhysicalDevice*", "pPhysicalDevices")]),
+
Proto("void", "GetPhysicalDeviceFeatures",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
- Param("VkPhysicalDeviceFeatures", "pFeatures"),
- ]),
+ [Param("VkPhysicalDevice", "physicalDevice"),
+ Param("VkPhysicalDeviceFeatures*", "pFeatures")]),
+
Proto("void", "GetPhysicalDeviceFormatProperties",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
+ [Param("VkPhysicalDevice", "physicalDevice"),
Param("VkFormat", "format"),
- Param("VkFormatProperties", "pFormatProperties"),
- ]),
+ Param("VkFormatProperties*", "pFormatProperties")]),
+
Proto("VkResult", "GetPhysicalDeviceImageFormatProperties",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
+ [Param("VkPhysicalDevice", "physicalDevice"),
Param("VkFormat", "format"),
Param("VkImageType", "type"),
Param("VkImageTiling", "tiling"),
Param("VkImageUsageFlags", "usage"),
Param("VkImageCreateFlags", "flags"),
- Param("VkImageFormatProperties", "pImageFormatProperties"),
- ]),
+ Param("VkImageFormatProperties*", "pImageFormatProperties")]),
+
Proto("void", "GetPhysicalDeviceProperties",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
- Param("VkPhysicalDeviceProperties", "pProperties"),
- ]),
+ [Param("VkPhysicalDevice", "physicalDevice"),
+ Param("VkPhysicalDeviceProperties*", "pProperties")]),
+
Proto("void", "GetPhysicalDeviceQueueFamilyProperties",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
- Param("uint32_t", "pQueueFamilyPropertyCount"),
- Param("VkQueueFamilyProperties", "pQueueFamilyProperties"),
- ]),
+ [Param("VkPhysicalDevice", "physicalDevice"),
+ Param("uint32_t*", "pQueueFamilyPropertyCount"),
+ Param("VkQueueFamilyProperties*", "pQueueFamilyProperties")]),
+
Proto("void", "GetPhysicalDeviceMemoryProperties",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
- Param("VkPhysicalDeviceMemoryProperties", "pMemoryProperties"),
- ]),
+ [Param("VkPhysicalDevice", "physicalDevice"),
+ Param("VkPhysicalDeviceMemoryProperties*", "pMemoryProperties")]),
+
Proto("PFN_vkVoidFunction", "GetInstanceProcAddr",
- [
- Param("VkInstance", "instance"),
- Param("char", "pName"),
- ]),
+ [Param("VkInstance", "instance"),
+ Param("const char*", "pName")]),
+
Proto("PFN_vkVoidFunction", "GetDeviceProcAddr",
- [
- Param("VkDevice", "device"),
- Param("char", "pName"),
- ]),
+ [Param("VkDevice", "device"),
+ Param("const char*", "pName")]),
+
Proto("VkResult", "CreateDevice",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
- Param("VkDeviceCreateInfo", "pCreateInfo"),
- Param("VkAllocationCallbacks", "pAllocator"),
- Param("VkDevice", "pDevice"),
- ]),
+ [Param("VkPhysicalDevice", "physicalDevice"),
+ Param("const VkDeviceCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocationCallbacks*", "pAllocator"),
+ Param("VkDevice*", "pDevice")]),
+
Proto("void", "DestroyDevice",
- [
- Param("VkDevice", "device"),
- Param("VkAllocationCallbacks", "pAllocator"),
- ]),
+ [Param("VkDevice", "device"),
+ Param("const VkAllocationCallbacks*", "pAllocator")]),
+
Proto("VkResult", "EnumerateInstanceExtensionProperties",
- [
- Param("char", "pLayerName"),
- Param("uint32_t", "pPropertyCount"),
- Param("VkExtensionProperties", "pProperties"),
- ]),
+ [Param("const char*", "pLayerName"),
+ Param("uint32_t*", "pPropertyCount"),
+ Param("VkExtensionProperties*", "pProperties")]),
+
Proto("VkResult", "EnumerateDeviceExtensionProperties",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
- Param("char", "pLayerName"),
- Param("uint32_t", "pPropertyCount"),
- Param("VkExtensionProperties", "pProperties"),
- ]),
+ [Param("VkPhysicalDevice", "physicalDevice"),
+ Param("const char*", "pLayerName"),
+ Param("uint32_t*", "pPropertyCount"),
+ Param("VkExtensionProperties*", "pProperties")]),
+
Proto("VkResult", "EnumerateInstanceLayerProperties",
- [
- Param("uint32_t", "pPropertyCount"),
- Param("VkLayerProperties", "pProperties"),
- ]),
+ [Param("uint32_t*", "pPropertyCount"),
+ Param("VkLayerProperties*", "pProperties")]),
+
Proto("VkResult", "EnumerateDeviceLayerProperties",
- [
- Param("VkPhysicalDevice", "physicalDevice"),
- Param("uint32_t", "pPropertyCount"),
- Param("VkLayerProperties", "pProperties"),
- ]),
+ [Param("VkPhysicalDevice", "physicalDevice"),
+ Param("uint32_t*", "pPropertyCount"),
+ Param("VkLayerProperties*", "pProperties")]),
+
Proto("void", "GetDeviceQueue",
- [
- Param("VkDevice", "device"),
+ [Param("VkDevice", "device"),
Param("uint32_t", "queueFamilyIndex"),
Param("uint32_t", "queueIndex"),
- Param("VkQueue", "pQueue"),
- ]),
+ Param("VkQueue*", "pQueue")]),
+
Proto("VkResult", "QueueSubmit",
- [
- Param("VkQueue", "queue"),
+ [Param("VkQueue", "queue"),
Param("uint32_t", "submitCount"),
- Param("VkSubmitInfo", "pSubmits"),
- Param("VkFence", "fence"),
- ]),
+ Param("const VkSubmitInfo*", "pSubmits"),
+ Param("VkFence", "fence")]),
+
Proto("VkResult", "QueueWaitIdle",
- [
- Param("VkQueue", "queue"),
- ]),
+ [Param("VkQueue", "queue")]),
+
Proto("VkResult", "DeviceWaitIdle",
- [
- Param("VkDevice", "device"),
- ]),
+ [Param("VkDevice", "device")]),
+
Proto("VkResult", "AllocateMemory",
- [
- Param("VkDevice", "device"),
- Param("VkMemoryAllocateInfo", "pAllocateInfo"),
- Param("VkAllocationCallbacks", "pAllocator"),
- Param("VkDeviceMemory", "pMemory"),
Reply to: