debian/control | 9 +++ debian/libvulkan1.install | 4 - debian/local/cube-frag.spv |binary debian/local/cube-vert.spv |binary debian/local/tri-frag.spv |binary debian/local/tri-vert.spv |binary debian/patches/demos-add-install-rule.diff | 5 + debian/patches/demos-dont-build-tri-or-cube.diff | 39 ------------- debian/patches/demos-read-from-installed-paths.diff | 59 ++++++++++++++++++++ debian/patches/demos-use-prebuilt-spvs.diff | 44 ++++++++++++++ debian/patches/layers-dont-set-an-rpath.diff | 2 debian/patches/series | 3 - debian/rules | 4 + debian/vulkan-utils.install | 5 + 14 files changed, 129 insertions(+), 45 deletions(-)
New commits: commit 871ea91322a66793869c3c60fd4e068c8358ff88 Author: Timo Aaltonen <tjaal...@debian.org> Date: Thu Feb 18 20:36:17 2016 +0200 build cube & tri, and hack around so they have what they need to work diff --git a/debian/control b/debian/control index 4cec439..2e83e9b 100644 --- a/debian/control +++ b/debian/control @@ -39,3 +39,12 @@ Description: Vulkan loader library -- development files layers, based on the GPU object selected by the application. . This package includes files needed for development. + +Package: vulkan-utils +Architecture: any +Section: graphics +Depends: ${shlibs:Depends}, ${misc:Depends}, + libvulkan1, +Description: Miscellaneous Vulkan utilities + This package provides a few demo programs to test Vulkan functionality, + including vkcube, vktri and vulkaninfo. diff --git a/debian/libvulkan1.install b/debian/libvulkan1.install index 6f85934..b90e938 100644 --- a/debian/libvulkan1.install +++ b/debian/libvulkan1.install @@ -1,5 +1,5 @@ -usr/bin/vulkaninfo usr/lib/*/lib*.so.* usr/lib/*/liblayer_utils.so usr/lib/*/libVk*.so -usr/share/vulkan +usr/share/vulkan/explicit_layer.d +usr/share/vulkan/implicit_layer.d diff --git a/debian/local/cube-frag.spv b/debian/local/cube-frag.spv new file mode 100644 index 0000000..15db12c Binary files /dev/null and b/debian/local/cube-frag.spv differ diff --git a/debian/local/cube-vert.spv b/debian/local/cube-vert.spv new file mode 100644 index 0000000..0e27210 Binary files /dev/null and b/debian/local/cube-vert.spv differ diff --git a/debian/local/tri-frag.spv b/debian/local/tri-frag.spv new file mode 100644 index 0000000..122c06f Binary files /dev/null and b/debian/local/tri-frag.spv differ diff --git a/debian/local/tri-vert.spv b/debian/local/tri-vert.spv new file mode 100644 index 0000000..45ca768 Binary files /dev/null and b/debian/local/tri-vert.spv differ diff --git a/debian/patches/demos-add-install-rule.diff b/debian/patches/demos-add-install-rule.diff index c1f56e2..ce2580e 100644 --- a/debian/patches/demos-add-install-rule.diff +++ b/debian/patches/demos-add-install-rule.diff @@ -1,8 +1,11 @@ Description: Add an install rule for vulkaninfo --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt -@@ -93,3 +93,4 @@ else() +@@ -93,6 +93,7 @@ else() add_executable(vulkaninfo WIN32 vulkaninfo.c) endif() target_link_libraries(vulkaninfo ${LIBRARIES}) +install(TARGETS vulkaninfo RUNTIME DESTINATION /usr/bin) + + if(UNIX) + add_executable(tri tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv) diff --git a/debian/patches/demos-dont-build-tri-or-cube.diff b/debian/patches/demos-dont-build-tri-or-cube.diff deleted file mode 100644 index f26490e..0000000 --- a/debian/patches/demos-dont-build-tri-or-cube.diff +++ /dev/null @@ -1,39 +0,0 @@ -commit f63cbe944107b5cd8f150ceaaec43b26099d5688 -Author: Adam Jackson <a...@redhat.com> -Date: Tue Feb 16 10:05:25 2016 -0500 - - demos: Don't build tri or cube - - There are more interesting demos, all we really want here is vulkaninfo. - This helps because we don't need to pre-build glslang/llvm/lunarglass - just to get the loader and layers. - -diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt -index ebc406b..a21760b 100644 ---- a/demos/CMakeLists.txt -+++ b/demos/CMakeLists.txt -@@ -93,24 +93,3 @@ else() - add_executable(vulkaninfo WIN32 vulkaninfo.c) - endif() - target_link_libraries(vulkaninfo ${LIBRARIES}) -- --if(UNIX) -- add_executable(tri tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv) --else() -- add_executable(tri WIN32 tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv) --endif() --target_link_libraries(tri ${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}) --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() diff --git a/debian/patches/demos-read-from-installed-paths.diff b/debian/patches/demos-read-from-installed-paths.diff new file mode 100644 index 0000000..99616d3 --- /dev/null +++ b/debian/patches/demos-read-from-installed-paths.diff @@ -0,0 +1,59 @@ +commit d30409f6d173041be7730c84f4c7784dc159199f +Author: Adam Jackson <a...@redhat.com> +Date: Mon Feb 15 17:19:48 2016 -0500 + + demos: Read from installed paths + +diff --git a/demos/cube.c b/demos/cube.c +index f337e0f..68a2215 100644 +--- a/demos/cube.c ++++ b/demos/cube.c +@@ -115,7 +115,7 @@ struct texture_object { + int32_t tex_width, tex_height; + }; + +-static char *tex_files[] = {"lunarg.ppm"}; ++static char *tex_files[] = {"/usr/share/vulkan/cube.ppm"}; + + struct vkcube_vs_uniform { + // Must start with MVP +@@ -1478,7 +1478,7 @@ static VkShaderModule demo_prepare_vs(struct demo *demo) { + 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); +@@ -1492,7 +1492,7 @@ static VkShaderModule demo_prepare_fs(struct demo *demo) { + 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); +diff --git a/demos/tri.c b/demos/tri.c +index 5910c37..87f2cb7 100644 +--- a/demos/tri.c ++++ b/demos/tri.c +@@ -1229,7 +1229,7 @@ static VkShaderModule demo_prepare_vs(struct demo *demo) { + void *vertShaderCode; + size_t size; + +- 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); +@@ -1243,7 +1243,7 @@ static VkShaderModule demo_prepare_fs(struct demo *demo) { + 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); diff --git a/debian/patches/demos-use-prebuilt-spvs.diff b/debian/patches/demos-use-prebuilt-spvs.diff new file mode 100644 index 0000000..a5f0352 --- /dev/null +++ b/debian/patches/demos-use-prebuilt-spvs.diff @@ -0,0 +1,44 @@ +--- a/demos/CMakeLists.txt ++++ b/demos/CMakeLists.txt +@@ -50,24 +50,6 @@ if(WIN32) + file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos) + file(COPY tri.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos) + file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos) +-else() +- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/tri-vert.spv +- COMMAND ${GLSLANG_PREFIX}/build/install/bin/glslangValidator -s -V -o tri-vert.spv ${PROJECT_SOURCE_DIR}/demos/tri.vert +- DEPENDS tri.vert ${GLSLANG_PREFIX}/build/install/bin/glslangValidator +- ) +- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/tri-frag.spv +- COMMAND ${GLSLANG_PREFIX}/build/install/bin/glslangValidator -s -V -o tri-frag.spv ${PROJECT_SOURCE_DIR}/demos/tri.frag +- DEPENDS tri.frag ${GLSLANG_PREFIX}/build/install/bin/glslangValidator +- ) +- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv +- COMMAND ${GLSLANG_PREFIX}/build/install/bin/glslangValidator -s -V -o cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert +- DEPENDS cube.vert ${GLSLANG_PREFIX}/build/install/bin/glslangValidator +- ) +- +- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv +- COMMAND ${GLSLANG_PREFIX}/build/install/bin/glslangValidator -s -V -o cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag +- DEPENDS cube.frag ${GLSLANG_PREFIX}/build/install/bin/glslangValidator +- ) + endif() + + if(NOT WIN32) +@@ -96,14 +78,14 @@ target_link_libraries(vulkaninfo ${LIBRA + install(TARGETS vulkaninfo RUNTIME DESTINATION /usr/bin) + + if(UNIX) +- add_executable(tri tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv) ++ add_executable(tri tri.c ${CMAKE_SOURCE_DIR}/debian/local/tri-vert.spv ${CMAKE_SOURCE_DIR}//debian/local/tri-frag.spv) + else() + add_executable(tri WIN32 tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv) + endif() + target_link_libraries(tri ${LIBRARIES}) + + if(NOT WIN32) +- add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) ++ add_executable(cube cube.c ${CMAKE_SOURCE_DIR}/debian/local/cube-vert.spv ${CMAKE_SOURCE_DIR}//debian/local/cube-frag.spv) + target_link_libraries(cube ${LIBRARIES}) + else() + if (CMAKE_CL_64) diff --git a/debian/patches/layers-dont-set-an-rpath.diff b/debian/patches/layers-dont-set-an-rpath.diff index 5d46379..86cc026 100644 --- a/debian/patches/layers-dont-set-an-rpath.diff +++ b/debian/patches/layers-dont-set-an-rpath.diff @@ -4,8 +4,6 @@ Date: Wed Feb 10 14:52:34 2016 -0500 layers: Don't set an rpath -diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt -index 0406a57..daa0069 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -26,9 +26,6 @@ set(LAYER_JSON_FILES diff --git a/debian/patches/series b/debian/patches/series index 8561267..37d55be 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,7 +1,8 @@ trim-build.diff -demos-dont-build-tri-or-cube.diff loader-add-install-rule.diff demos-add-install-rule.diff layers-use-local-spirv-hpp.diff layers-install-to-cmake-install-libdir.diff layers-dont-set-an-rpath.diff +demos-use-prebuilt-spvs.diff +demos-read-from-installed-paths.diff diff --git a/debian/rules b/debian/rules index 7dc8b5d..c5866a9 100755 --- a/debian/rules +++ b/debian/rules @@ -29,6 +29,10 @@ override_dh_auto_install: debian/tmp/usr/share/vulkan/explicit_layer.d/$$i \ ; done + install -T build/demos/cube debian/tmp/usr/bin/vulkancube + install -T build/demos/tri debian/tmp/usr/bin/vulkantri + install -T demos/lunarg.ppm debian/tmp/usr/share/vulkan/cube.ppm + override_dh_install: dh_install --fail-missing diff --git a/debian/vulkan-utils.install b/debian/vulkan-utils.install index 4f60378..0c92473 100644 --- a/debian/vulkan-utils.install +++ b/debian/vulkan-utils.install @@ -1 +1,6 @@ +usr/bin/vulkancube usr/bin/vulkaninfo +usr/bin/vulkantri +usr/share/vulkan/cube.ppm +debian/local/cube-*.spv usr/share/vulkan +debian/local/tri-*.spv usr/share/vulkan