diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch new file mode 100644 index 000000000..5c0d7e54a --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch @@ -0,0 +1,109 @@ +From 663d51cd31fd98411e25f37aaf52b591d9639bf5 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" +Date: Mon, 30 Jul 2018 17:23:29 +0300 +Subject: [PATCH] Don't build demos with questionably licensed data + +Some of the models don't have open source compatible licenses: +don't build demos using those. Also don't build demos that need +resources that are not included. + +ssao: +scenerendering: + Sibenik model, no license found + +deferred: +deferredmultisampling: +deferredshadows: + armor model, CC-BY-3.0 + +vulkanscene: +imgui: +shadowmapping: + vulkanscene model, no license found + +indirectdraw: + plant model, no license found + +hdr: +pbribl: +pbrtexture: + Require external Vulkan Asset Pack + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Jussi Kukkonen +Signed-off-by: Maxin B. John +--- + examples/CMakeLists.txt | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 2ad87f79..3800ab6e 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -70,25 +70,19 @@ set(EXAMPLES + computeraytracing + computeshader + conditionalrender + conservativeraster + debugmarker +- deferred +- deferredmultisampling +- deferredshadows + descriptorsets + displacement + distancefieldfonts + dynamicuniformbuffer + gears + geometryshader + gltfloading + gltfscenerendering + gltfskinning +- hdr +- imgui +- indirectdraw + inlineuniformblocks + inputattachments + instancing + multisampling + multithreading +@@ -98,12 +92,10 @@ set(EXAMPLES + offscreen + oit + parallaxmapping + particlefire + pbrbasic +- pbribl +- pbrtexture + pipelines + pipelinestatistics + pushconstants + pushdescriptors + radialblur +@@ -112,16 +104,12 @@ set(EXAMPLES + raytracingcallable + raytracingreflections + raytracingshadows + renderheadless + screenshot +- shadowmapping +- shadowmappingomni +- shadowmappingcascade + specializationconstants + sphericalenvmapping +- ssao + stencilbuffer + subpasses + terraintessellation + tessellation + textoverlay +@@ -133,9 +121,8 @@ set(EXAMPLES + texturemipmapgen + texturesparseresidency + triangle + variablerateshading + viewportarray +- vulkanscene + ) + + buildExamples() diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Fix-bug-in-computeheadless-and-renderheadless.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Fix-bug-in-computeheadless-and-renderheadless.patch new file mode 100644 index 000000000..d3ee68f92 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Fix-bug-in-computeheadless-and-renderheadless.patch @@ -0,0 +1,72 @@ +From 55949fea34b4392c988b902e4835939d9a8d5574 Mon Sep 17 00:00:00 2001 +From: "yuan.tian" +Date: Thu, 17 Dec 2020 14:19:31 +0800 +Subject: [PATCH] Fix bug in computeheadless and renderheadless. + +The bug passed invalid pointer value to vkCreateInstance. + +Upstream-Status: Submitted [https://github.com/SaschaWillems/Vulkan/issues/792] + +Signed-off-by: yuan.tian +--- + examples/computeheadless/computeheadless.cpp | 4 ++-- + examples/renderheadless/renderheadless.cpp | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/examples/computeheadless/computeheadless.cpp b/examples/computeheadless/computeheadless.cpp +index 49566394..002f74a4 100644 +--- a/examples/computeheadless/computeheadless.cpp ++++ b/examples/computeheadless/computeheadless.cpp +@@ -154,6 +154,7 @@ public: + vkEnumerateInstanceLayerProperties(&instanceLayerCount, nullptr); + std::vector instanceLayers(instanceLayerCount); + vkEnumerateInstanceLayerProperties(&instanceLayerCount, instanceLayers.data()); ++ const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; + + bool layersAvailable = true; + for (auto layerName : validationLayers) { +@@ -172,7 +173,6 @@ public: + + if (layersAvailable) { + instanceCreateInfo.ppEnabledLayerNames = validationLayers; +- const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; + instanceCreateInfo.enabledLayerCount = layerCount; + instanceCreateInfo.enabledExtensionCount = 1; + instanceCreateInfo.ppEnabledExtensionNames = &validationExt; +@@ -562,4 +562,4 @@ int main() { + delete(vulkanExample); + return 0; + } +-#endif +\ No newline at end of file ++#endif +diff --git a/examples/renderheadless/renderheadless.cpp b/examples/renderheadless/renderheadless.cpp +index a0126cf3..295346c0 100644 +--- a/examples/renderheadless/renderheadless.cpp ++++ b/examples/renderheadless/renderheadless.cpp +@@ -184,6 +184,7 @@ public: + vkEnumerateInstanceLayerProperties(&instanceLayerCount, nullptr); + std::vector instanceLayers(instanceLayerCount); + vkEnumerateInstanceLayerProperties(&instanceLayerCount, instanceLayers.data()); ++ const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; + + bool layersAvailable = true; + for (auto layerName : validationLayers) { +@@ -202,7 +203,6 @@ public: + + if (layersAvailable) { + instanceCreateInfo.ppEnabledLayerNames = validationLayers; +- const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; + instanceCreateInfo.enabledLayerCount = layerCount; + instanceCreateInfo.enabledExtensionCount = 1; + instanceCreateInfo.ppEnabledExtensionNames = &validationExt; +@@ -894,4 +894,4 @@ int main() { + delete(vulkanExample); + return 0; + } +-#endif +\ No newline at end of file ++#endif +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Modify-parameter-in-vulkan-demo-computenbody.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Modify-parameter-in-vulkan-demo-computenbody.patch new file mode 100644 index 000000000..82e2a7c1d --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Modify-parameter-in-vulkan-demo-computenbody.patch @@ -0,0 +1,35 @@ +From b955f351f01cf7395f29edf31f864e9a4e99c64a Mon Sep 17 00:00:00 2001 +From: "yuan.tian" +Date: Tue, 15 Dec 2020 15:07:42 +0800 +Subject: [PATCH] Modify parameter in vulkan demo computenbody. + +Decrease the number of particles to reduce rendering workload. + +Upstream-Status: Inappropriate [i.MX-specific] +--- + examples/computenbody/computenbody.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/examples/computenbody/computenbody.cpp b/examples/computenbody/computenbody.cpp +index 84d1c278..0837d424 100644 +--- a/examples/computenbody/computenbody.cpp ++++ b/examples/computenbody/computenbody.cpp +@@ -14,7 +14,7 @@ + // Lower particle count on Android for performance reasons + #define PARTICLES_PER_ATTRACTOR 3 * 1024 + #else +-#define PARTICLES_PER_ATTRACTOR 4 * 1024 ++#define PARTICLES_PER_ATTRACTOR 4 * 64 + #endif + + class VulkanExample : public VulkanExampleBase +@@ -902,4 +902,4 @@ public: + } + }; + +-VULKAN_EXAMPLE_MAIN() +\ No newline at end of file ++VULKAN_EXAMPLE_MAIN() +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend index 33a014134..3d54c5394 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend @@ -1,4 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append = " file://0001-Modify-parameter-in-vulkan-demo-computenbody.patch \ + file://0001-Fix-bug-in-computeheadless-and-renderheadless.patch" +SRCREV = "21f9cd52519fab405827ecc965910bf269af3342" DEPENDS_remove = "vulkan" DEPENDS_append = " vulkan-headers vulkan-loader"