diff options
Diffstat (limited to 'meta-amd-bsp/recipes-graphics')
6 files changed, 0 insertions, 343 deletions
diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0001-CMakeLists-add-include-path-so-Xlib.h-is-found-as-ne.patch b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0001-CMakeLists-add-include-path-so-Xlib.h-is-found-as-ne.patch deleted file mode 100644 index 10337189..00000000 --- a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0001-CMakeLists-add-include-path-so-Xlib.h-is-found-as-ne.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 49d4dd326b9d4b7b013f4a1d21498568d76443b2 Mon Sep 17 00:00:00 2001 -From: Awais Belal <awais_belal@mentor.com> -Date: Tue, 4 Sep 2018 14:09:12 +0500 -Subject: [PATCH 1/5] CMakeLists: add include path so Xlib.h is found as needed - -All the targets including vk_platform.h or directly including -X11/Xlib.h require to know the directory for the installed -header. Add the directory to these so the requirements are -filled in properly. - -Signed-off-by: Awais Belal <awais_belal@mentor.com> ---- - CMakeLists.txt | 2 ++ - demos/CMakeLists.txt | 1 + - layers/CMakeLists.txt | 1 + - libs/vkjson/CMakeLists.txt | 1 + - loader/CMakeLists.txt | 1 + - 5 files changed, 6 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5cf85d487..5ce69d216 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -225,6 +225,8 @@ find_path(SPIRV_TOOLS_INCLUDE_DIR spirv-tools/libspirv.h HINTS "${EXTERNAL_SOURC - "${CMAKE_SOURCE_DIR}/../glslang/External/spirv-tools/include" - DOC "Path to spirv-tools/libspirv.h") - -+find_path(X11_XLIB_INCLUDE_DIR X11/Xlib.h DOC "Path to X11/Xlib.h") -+ - find_library(GLSLANG_LIB NAMES glslang - HINTS ${GLSLANG_SEARCH_PATH} ) - -diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt -index 487b19910..fb5022bf5 100644 ---- a/demos/CMakeLists.txt -+++ b/demos/CMakeLists.txt -@@ -41,6 +41,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(DEMO_INCLUDE_DIRS - ${X11_INCLUDE_DIR} - ${DEMO_INCLUDE_DIRS} -+ ${X11_XLIB_INCLUDE_DIR} - ) - link_libraries(${X11_LIBRARIES}) - add_definitions(-DVK_USE_PLATFORM_XLIB_KHR) -diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt -index 08b0e2090..6068d0031 100644 ---- a/layers/CMakeLists.txt -+++ b/layers/CMakeLists.txt -@@ -146,6 +146,7 @@ include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${PROJECT_BINARY_DIR} - ${CMAKE_BINARY_DIR} -+ ${X11_XLIB_INCLUDE_DIR} - ) - - if (WIN32) -diff --git a/libs/vkjson/CMakeLists.txt b/libs/vkjson/CMakeLists.txt -index 2e79d9109..4b1df5988 100644 ---- a/libs/vkjson/CMakeLists.txt -+++ b/libs/vkjson/CMakeLists.txt -@@ -23,6 +23,7 @@ include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../../loader - ${CMAKE_CURRENT_SOURCE_DIR}/../../include/vulkan -+ ${X11_XLIB_INCLUDE_DIR} - ) - - add_library(vkjson STATIC vkjson.cc vkjson_instance.cc ../../loader/cJSON.c) -diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt -index 4d1d08fc8..55ae2cb85 100644 ---- a/loader/CMakeLists.txt -+++ b/loader/CMakeLists.txt -@@ -3,6 +3,7 @@ include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${PROJECT_BINARY_DIR} - ${CMAKE_BINARY_DIR} -+ ${X11_XLIB_INCLUDE_DIR} - ) - - # Check for the existance of the secure_getenv or __secure_getenv commands --- -2.11.1 - diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0002-demos-CMakeLists.txt-install-demos.patch b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0002-demos-CMakeLists.txt-install-demos.patch deleted file mode 100644 index 1ffc283e..00000000 --- a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0002-demos-CMakeLists.txt-install-demos.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0ee0a0502b96b46190f6e47243b0a008ff04ebbd Mon Sep 17 00:00:00 2001 -From: Awais Belal <awais_belal@mentor.com> -Date: Tue, 4 Sep 2018 14:10:37 +0500 -Subject: [PATCH 2/5] demos/CMakeLists.txt: install demos - -Install demos to the target. - -Signed-off-by: Awais Belal <awais_belal@mentor.com> ---- - demos/CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt -index fb5022bf5..5a723805d 100644 ---- a/demos/CMakeLists.txt -+++ b/demos/CMakeLists.txt -@@ -148,6 +148,7 @@ if(NOT WIN32) - if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) - add_executable(cube cube.c ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc) - target_link_libraries(cube ${LIBRARIES}) -+ install(TARGETS cube DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - else() - if (CMAKE_CL_64) -@@ -164,6 +165,7 @@ if(NOT WIN32) - if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) - add_executable(cubepp cube.cpp ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc) - target_link_libraries(cubepp ${LIBRARIES}) -+ install(TARGETS cubepp DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - else() - if (CMAKE_CL_64) --- -2.11.1 - diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0003-CMakeLists.txt-use-a-fixed-header-for-spirv_commit.patch b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0003-CMakeLists.txt-use-a-fixed-header-for-spirv_commit.patch deleted file mode 100644 index c18441f5..00000000 --- a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0003-CMakeLists.txt-use-a-fixed-header-for-spirv_commit.patch +++ /dev/null @@ -1,71 +0,0 @@ -From af1706e021e900f2cfb15e7bc0f9f68cdd1bd04c Mon Sep 17 00:00:00 2001 -From: Awais Belal <awais_belal@mentor.com> -Date: Tue, 4 Sep 2018 14:58:18 +0500 -Subject: [PATCH 3/5] CMakeLists.txt: use a fixed header for spirv_commit - -Signed-off-by: Awais Belal <awais_belal@mentor.com> ---- - CMakeLists.txt | 3 --- - spirv_tools_commit_id.h | 29 +++++++++++++++++++++++++++++ - 2 files changed, 29 insertions(+), 3 deletions(-) - create mode 100644 spirv_tools_commit_id.h - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5cf85d487..b0ec3cbaf 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -343,7 +343,6 @@ add_custom_target(generate_helper_files DEPENDS - vk_dispatch_table_helper.h - vk_extension_helper.h - vk_typemap_helper.h -- spirv_tools_commit_id.h - ) - set_target_properties(generate_helper_files PROPERTIES FOLDER ${LVL_TARGET_FOLDER}) - -@@ -358,8 +357,6 @@ run_vk_xml_generate(helper_file_generator.py vk_enum_string_helper.h) - run_vk_xml_generate(helper_file_generator.py vk_object_types.h) - run_vk_xml_generate(helper_file_generator.py vk_extension_helper.h) - run_vk_xml_generate(helper_file_generator.py vk_typemap_helper.h) --run_external_revision_generate(${EXTERNAL_SOURCE_ROOT}/glslang/External/spirv-tools SPIRV_TOOLS_COMMIT_ID spirv_tools_commit_id.h) -- - - - if(NOT WIN32) -diff --git a/include/vulkan/spirv_tools_commit_id.h b/include/vulkan/spirv_tools_commit_id.h -new file mode 100644 -index 000000000..ae588b33f ---- /dev/null -+++ b/include/vulkan/spirv_tools_commit_id.h -@@ -0,0 +1,29 @@ -+// *** THIS FILE IS GENERATED - DO NOT EDIT *** -+// See external_revision_generator.py for modifications -+ -+/*************************************************************************** -+ * -+ * Copyright (c) 2015-2017 The Khronos Group Inc. -+ * Copyright (c) 2015-2017 Valve Corporation -+ * Copyright (c) 2015-2017 LunarG, Inc. -+ * Copyright (c) 2015-2017 Google Inc. -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ * -+ * Author: Chris Forbes <chrisforbes@google.com> -+ * Author: Cort Stratton <cort@google.com> -+ * -+ ****************************************************************************/ -+#pragma once -+ -+#define SPIRV_TOOLS_COMMIT_ID "2651ccaec8170b3257642b3c438f50dc4f181fdd" --- -2.11.1 - diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0004-layer_validation_tests-include-math.h.patch b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0004-layer_validation_tests-include-math.h.patch deleted file mode 100644 index bd9713ea..00000000 --- a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0004-layer_validation_tests-include-math.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a5beebd78eb232596f2b6b4de1ee417b629ada47 Mon Sep 17 00:00:00 2001 -From: Awais Belal <awais_belal@mentor.com> -Date: Tue, 4 Sep 2018 15:33:12 +0500 -Subject: [PATCH 4/5] layer_validation_tests: include math.h - -Without the inclusion several math functions -fail as expected. - -Signed-off-by: Awais Belal <awais_belal@mentor.com> ---- - tests/layer_validation_tests.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp -index 132578f85..26b0671fa 100644 ---- a/tests/layer_validation_tests.cpp -+++ b/tests/layer_validation_tests.cpp -@@ -45,6 +45,7 @@ - #include "vk_typemap_helper.h" - - #include <limits.h> -+#include <math.h> - - #include <algorithm> - #include <functional> --- -2.11.1 - diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0005-demos-cube-use-absolute-location-for-data-files.patch b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0005-demos-cube-use-absolute-location-for-data-files.patch deleted file mode 100644 index 85c15b89..00000000 --- a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers/0005-demos-cube-use-absolute-location-for-data-files.patch +++ /dev/null @@ -1,70 +0,0 @@ -From f6c2eeaad968b1ad0ebef7fad79eb5f01305a6e3 Mon Sep 17 00:00:00 2001 -From: Awais Belal <awais_belal@mentor.com> -Date: Wed, 5 Sep 2018 11:43:07 +0500 -Subject: [PATCH 5/5] demos/cube*: use absolute location for data files - -If absolute locations are not used here the demo -looks for texture files in a haphazard way and -can only be launched from the same directory. -This allows running the demo from anywhere and -consolidate any data files that are needed. - -Signed-off-by: Awais Belal <awais_belal@mentor.com> ---- - demos/cube.c | 7 ++++++- - demos/cube.cpp | 7 ++++++- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/demos/cube.c b/demos/cube.c -index 29a484260..6b5f0b7af 100644 ---- a/demos/cube.c -+++ b/demos/cube.c -@@ -67,6 +67,8 @@ - #define APP_SHORT_NAME "cube" - #define APP_LONG_NAME "The Vulkan Cube Demo Program" - -+#define VULKAN_DATA_LOC "/usr/share/vulkan-data/" -+ - // Allow a maximum of two outstanding presentation operations. - #define FRAME_LAG 2 - -@@ -1484,7 +1486,10 @@ bool loadTexture(const char *filename, uint8_t *rgba_data, VkSubresourceLayout * - - return true; - #else -- FILE *fPtr = fopen(filename, "rb"); -+ char abs_filename[256]; -+ strcpy(abs_filename, VULKAN_DATA_LOC); -+ strcat(abs_filename, filename); -+ FILE *fPtr = fopen(abs_filename, "rb"); - char header[256], *cPtr, *tmp; - - if (!fPtr) return false; -diff --git a/demos/cube.cpp b/demos/cube.cpp -index fe8cb7c90..3eee7d9c8 100644 ---- a/demos/cube.cpp -+++ b/demos/cube.cpp -@@ -57,6 +57,8 @@ - // Allow a maximum of two outstanding presentation operations. - #define FRAME_LAG 2 - -+#define VULKAN_DATA_LOC "/usr/share/vulkan-data/" -+ - #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) - - #ifdef _WIN32 -@@ -2261,7 +2263,10 @@ void Demo::update_data_buffer() { - } - - bool Demo::loadTexture(const char *filename, uint8_t *rgba_data, vk::SubresourceLayout *layout, int32_t *width, int32_t *height) { -- FILE *fPtr = fopen(filename, "rb"); -+ char abs_filename[256]; -+ strcpy(abs_filename, VULKAN_DATA_LOC); -+ strcat(abs_filename, filename); -+ FILE *fPtr = fopen(abs_filename, "rb"); - if (!fPtr) { - return false; - } --- -2.11.1 - diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers_1.1.70.bb b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers_1.1.70.bb deleted file mode 100644 index 1acb3fe2..00000000 --- a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-loader-layers_1.1.70.bb +++ /dev/null @@ -1,56 +0,0 @@ -SUMMARY = "Vulkan Ecosystem Components - Loader and Validation Layers" -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." -SECTION = "graphics" -HOMEPAGE = "https://www.khronos.org/vulkan" -DEPENDS = "bison-native libx11 libxcb glslang glslang-native spirv-tools \ - libice libxext libsm libxrandr" - -RDEPENDS_${PN} = "${PN}-layer-libs libxcb-sync libxcb-present libxcb-dri3" - -inherit cmake python3native - -REQUIRED_DISTRO_FEATURES = "x11" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99c647ca3d4f6a4b9d8628f757aad156" - -S = "${WORKDIR}/git" - -SRCREV = "1fede1a6b8d6103cc9fcacb567747aa2af167849" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers;branch=sdk-${PV} \ - file://0001-CMakeLists-add-include-path-so-Xlib.h-is-found-as-ne.patch \ - file://0002-demos-CMakeLists.txt-install-demos.patch \ - file://0003-CMakeLists.txt-use-a-fixed-header-for-spirv_commit.patch \ - file://0004-layer_validation_tests-include-math.h.patch \ - file://0005-demos-cube-use-absolute-location-for-data-files.patch" - -EXTRA_OECMAKE = " \ - -DCUSTOM_GLSLANG_BIN_ROOT=1 \ - -DGLSLANG_BINARY_ROOT=${STAGING_DIR_HOST}/usr \ - -DCUSTOM_SPIRV_TOOLS_BIN_ROOT=1 \ - -DSPIRV_TOOLS_BINARY_ROOT=${STAGING_DIR_HOST}/usr \ - -DBUILD_TESTS=1 \ - -DBUILD_WSI_MIR_SUPPORT=0 \ - -DBUILD_WSI_WAYLAND_SUPPORT=0 \ -" - -PACKAGES =+ "${PN}-layer-libs" -FILES_${PN}-layer-libs = "${libdir}/libVkLayer_*.so" - -FILES_SOLIBSDEV = "" -FILES_${PN} += "${libdir}/libvulkan.so \ - ${datadir}" -INSANE_SKIP_${PN} = "dev-so" - -do_install_append() { - mv ${D}${bindir}/cube ${D}${bindir}/cube-vulkan - mv ${D}${bindir}/cubepp ${D}${bindir}/cubepp-vulkan - - install -D ${B}/demos/lunarg.ppm ${D}${datadir}/vulkan-data/lunarg.ppm - - # drop the spirv_tools_commit_id.h from installation - rm -f ${D}${includedir}/vulkan/spirv_tools_commit_id.h -} |