vulkan: sync recipes with meta-imx

Sync with the scarthgap-6.6.23-2.0.0 branch of meta-imx

https://onedigi.atlassian.net/browse/DEL-9011
https://onedigi.atlassian.net/browse/DEL-9081

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2024-05-21 13:38:03 +02:00
parent 463aa7965c
commit 5def090dd3
29 changed files with 1089 additions and 431 deletions

View File

@ -0,0 +1,32 @@
DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \
various well-known 3D model formats in a uniform manner."
HOMEPAGE = "http://www.assimp.org/"
SECTION = "devel"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d9d5275cab4fb13ae624d42ce64865de"
DEPENDS = "zlib"
SRC_URI = "git://github.com/assimp/assimp.git;protocol=https;branch=master"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
SRCREV = "9519a62dd20799c5493c638d1ef5a6f484e5faf1"
S = "${WORKDIR}/git"
inherit cmake
do_unpack:append() {
bb.build.exec_func('remove_non_compliant_source', d)
}
remove_non_compliant_source() {
# Remove non-compliant files manually. A patch file cannot be used
# since many of the files are binary.
rm -rf ${S}/test/models-nonbsd ${S}/scripts/StepImporter/schema_ifc2x3.exp
}
EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}"
BBCLASSEXTEND = "native nativesdk"

View File

@ -0,0 +1,40 @@
From c7f80bbad43eaf902188f8832f23e03a1e88d49b Mon Sep 17 00:00:00 2001
From: Neena Busireddy <neenareddy.busireddy@nxp.com>
Date: Wed, 6 Apr 2022 12:53:34 -0700
Subject: [PATCH] FindVulkanVersion.cmake: Look for vulkan-headers in sysroot
Upstream-Status: Pending
Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
---
cmake/FindVulkanVersion.cmake | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmake/FindVulkanVersion.cmake b/cmake/FindVulkanVersion.cmake
index 38ff4557..8346064a 100644
--- a/cmake/FindVulkanVersion.cmake
+++ b/cmake/FindVulkanVersion.cmake
@@ -9,8 +9,8 @@ set(VULKAN_VERSION_PATCH "")
find_file (VULKAN_HEADER
vulkan_core.h
HINTS
- external/Vulkan-Headers/include/vulkan
- ../external/Vulkan-Headers/include/vulkan)
+ ${CMAKE_SYSROOT}/usr/include/vulkan
+ ..${CMAKE_SYSROOT}/usr/include/vulkan)
MESSAGE(STATUS "Vulkan Header = ${VULKAN_HEADER}")
@@ -20,8 +20,8 @@ else()
find_file(VULKAN_HEADER
vulkan.h
HINTS
- external/Vulkan-Headers/include/vulkan
- ../external/Vulkan-Headers/include/vulkan)
+ ${CMAKE_SYSROOT}/usr/include/vulkan
+ ..${CMAKE_SYSROOT}/usr/include/vulkan)
set(VulkanHeaders_main_header ${VULKAN_HEADER})
endif()
--
2.17.1

View File

@ -0,0 +1,588 @@
From ba39d3ac768c81a55539d56e705dc3fab4acb3dd Mon Sep 17 00:00:00 2001
From: Kratika Jain <kratika.jain@nxp.com>
Date: Tue, 6 Jun 2023 12:33:20 +0530
Subject: [PATCH 1/2] MGS-7104 [#ccc] gfxreconstruct: Add support for xdg-shell
Work is derived from https://github.com/LunarG/gfxreconstruct/pull/698
Upstream-Status: Inappropriate [not author]
Signed-off-by: Kratika Jain <kratika.jain@nxp.com>
---
framework/application/wayland_context.cpp | 21 +++--
framework/application/wayland_context.h | 7 +-
framework/application/wayland_window.cpp | 96 ++++++++++++-----------
framework/application/wayland_window.h | 20 ++---
framework/util/wayland_loader.cpp | 12 ++-
framework/util/wayland_loader.h | 87 ++++++++++++--------
6 files changed, 144 insertions(+), 99 deletions(-)
diff --git a/framework/application/wayland_context.cpp b/framework/application/wayland_context.cpp
index ac4ebb76..1bfa87d1 100644
--- a/framework/application/wayland_context.cpp
+++ b/framework/application/wayland_context.cpp
@@ -37,6 +37,7 @@ struct wl_keyboard_listener WaylandContext::keyboard_listener_;
struct wl_seat_listener WaylandContext::seat_listener_;
struct wl_registry_listener WaylandContext::registry_listener_;
struct wl_output_listener WaylandContext::output_listener_;
+struct xdg_wm_base_listener WaylandContext::shell_listener_;
WaylandContext::WaylandContext(Application* application) : WsiContext(application)
{
@@ -47,6 +48,7 @@ WaylandContext::WaylandContext(Application* application) : WsiContext(applicatio
registry_listener_.global_remove = HandleRegistryGlobalRemove;
seat_listener_.capabilities = HandleSeatCapabilities;
+ shell_listener_.ping = HandleBaseCapabilities;
keyboard_listener_.keymap = HandleKeyboardKeymap;
keyboard_listener_.enter = HandleKeyboardEnter;
@@ -99,7 +101,7 @@ WaylandContext::WaylandContext(Application* application) : WsiContext(applicatio
GFXRECON_LOG_ERROR("Failed to bind Wayland compositor");
success = false;
}
- else if (shell_ == nullptr)
+ else if (wm_base_ == nullptr)
{
GFXRECON_LOG_ERROR("Failed to bind Wayland shell");
success = false;
@@ -130,9 +132,9 @@ WaylandContext::~WaylandContext()
wl.seat_destroy(seat_);
}
- if (shell_)
+ if (wm_base_)
{
- wl.shell_destroy(shell_);
+ wl.shell_destroy(wm_base_);
}
if (compositor_)
@@ -205,9 +207,10 @@ void WaylandContext::HandleRegistryGlobal(
wayland_context->compositor_ = reinterpret_cast<wl_compositor*>(
wl.registry_bind(registry, id, wl.compositor_interface, WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION));
}
- else if (util::platform::StringCompare(interface, "wl_shell") == 0)
+ else if (util::platform::StringCompare(interface, "xdg_wm_base") == 0)
{
- wayland_context->shell_ = reinterpret_cast<wl_shell*>(wl.registry_bind(registry, id, wl.shell_interface, 1));
+ wayland_context->wm_base_ = reinterpret_cast<xdg_wm_base*>(wl.registry_bind(registry, id, wl.shell_base_interface, 1));
+ wl.xdg_wm_base_add_listener(wayland_context->wm_base_, &shell_listener_, wayland_context);
}
else if (util::platform::StringCompare(interface, "wl_seat") == 0)
{
@@ -254,6 +257,12 @@ void WaylandContext::HandleSeatCapabilities(void* data, wl_seat* seat, uint32_t
}
}
+void WaylandContext::HandleBaseCapabilities(void* data, xdg_wm_base* xdg_wm_base, uint32_t serial)
+{
+ auto window = reinterpret_cast<WaylandWindow*>(data);
+ window->HandlePing(data, xdg_wm_base, serial);
+}
+
void WaylandContext::HandleKeyboardKeymap(
void* data, struct wl_keyboard* keyboard, uint32_t format, int fd, uint32_t size)
{}
@@ -356,7 +365,7 @@ void WaylandContext::HandlePointerButton(
WaylandWindow* window = entry->second;
if ((button == BTN_LEFT) && (state == WL_POINTER_BUTTON_STATE_PRESSED))
{
- wl.shell_surface_move(window->GetShellSurface(), wayland_context->seat_, serial);
+ wl.xdg_toplevel_move(window->GetShellSurface(), wayland_context->seat_, serial);
}
}
}
diff --git a/framework/application/wayland_context.h b/framework/application/wayland_context.h
index 9fefd3b1..faae4ecc 100644
--- a/framework/application/wayland_context.h
+++ b/framework/application/wayland_context.h
@@ -57,7 +57,7 @@ class WaylandContext : public WsiContext
struct wl_display* GetDisplay() const { return display_; }
- struct wl_shell* GetShell() const { return shell_; }
+ struct xdg_wm_base* Getbase() const { return wm_base_; }
struct wl_compositor* GetCompositor() const { return compositor_; }
@@ -77,6 +77,8 @@ class WaylandContext : public WsiContext
static void HandleSeatCapabilities(void* data, wl_seat* seat, uint32_t caps);
+ static void HandleBaseCapabilities(void* data, xdg_wm_base* xdg_wm_base, uint32_t serial);
+
static void HandleKeyboardKeymap(void* data, struct wl_keyboard* keyboard, uint32_t format, int fd, uint32_t size);
static void HandleKeyboardEnter(
@@ -137,8 +139,9 @@ class WaylandContext : public WsiContext
static struct wl_seat_listener seat_listener_;
static struct wl_registry_listener registry_listener_;
static struct wl_output_listener output_listener_;
+ static struct xdg_wm_base_listener shell_listener_;
struct wl_display* display_{};
- struct wl_shell* shell_{};
+ struct xdg_wm_base* wm_base_{};
struct wl_compositor* compositor_{};
struct wl_registry* registry_{};
struct wl_seat* seat_{};
diff --git a/framework/application/wayland_window.cpp b/framework/application/wayland_window.cpp
index 55d7d7d2..5b313d09 100644
--- a/framework/application/wayland_window.cpp
+++ b/framework/application/wayland_window.cpp
@@ -31,22 +31,16 @@
GFXRECON_BEGIN_NAMESPACE(gfxrecon)
GFXRECON_BEGIN_NAMESPACE(application)
-struct wl_surface_listener WaylandWindow::surface_listener_;
-struct wl_shell_surface_listener WaylandWindow::shell_surface_listener_;
+struct xdg_surface_listener WaylandWindow::surface_listener_;
+bool m_configured = false;
WaylandWindow::WaylandWindow(WaylandContext* wayland_context) :
- wayland_context_(wayland_context), surface_(nullptr), shell_surface_(nullptr), width_(0), height_(0), scale_(1),
+ wayland_context_(wayland_context), surface_(nullptr), xdg_toplevel_(nullptr), width_(0), height_(0), scale_(1),
output_(nullptr)
{
assert(wayland_context_ != nullptr);
- // Populate callback structs
- surface_listener_.enter = HandleSurfaceEnter;
- surface_listener_.leave = HandleSurfaceLeave;
-
- shell_surface_listener_.ping = HandlePing;
- shell_surface_listener_.configure = HandleConfigure;
- shell_surface_listener_.popup_done = HandlePopupDone;
+ surface_listener_.configure = HandleConfigure;
}
WaylandWindow::~WaylandWindow()
@@ -54,9 +48,13 @@ WaylandWindow::~WaylandWindow()
auto& wl = wayland_context_->GetWaylandFunctionTable();
if (surface_)
{
- if (shell_surface_)
+ if (xdg_toplevel_)
+ {
+ wl.xdg_toplevel_destroy(xdg_toplevel_);
+ }
+ if(xdg_surface_)
{
- wl.shell_surface_destroy(shell_surface_);
+ wl.xdg_surface_destroy(xdg_surface_);
}
wl.surface_destroy(surface_);
@@ -68,32 +66,41 @@ bool WaylandWindow::Create(
{
GFXRECON_UNREFERENCED_PARAMETER(x);
GFXRECON_UNREFERENCED_PARAMETER(y);
-
+
auto& wl = wayland_context_->GetWaylandFunctionTable();
+
surface_ = wl.compositor_create_surface(wayland_context_->GetCompositor());
-
if (surface_ == nullptr)
{
GFXRECON_LOG_ERROR("Failed to create Wayland surface");
return false;
}
+
+ m_configured = false;
+ if (wayland_context_->Getbase())
+ {
+ xdg_surface_ = wl.xdg_wm_base_get_xdg_surface(wayland_context_->Getbase(), surface_);
+ if (!xdg_surface_)
+ {
+ GFXRECON_LOG_ERROR("Failed to create xdg shell surface");
+ return false;
+ }
+ wayland_context_->RegisterWaylandWindow(this);
- shell_surface_ = wl.shell_get_shell_surface(wayland_context_->GetShell(), surface_);
- if (!shell_surface_)
+ wl.xdg_surface_add_listener(xdg_surface_, &WaylandWindow::surface_listener_, this);
+ xdg_toplevel_= wl.xdg_surface_get_toplevel(xdg_surface_);
+ }
+ if(xdg_toplevel_)
{
- GFXRECON_LOG_ERROR("Failed to create Wayland shell surface");
- return false;
+ wl.xdg_toplevel_set_title(xdg_toplevel_, title.c_str());
+ wl.wl_surface_commit(surface_);
}
- wayland_context_->RegisterWaylandWindow(this);
-
- wl.surface_add_listener(surface_, &WaylandWindow::surface_listener_, this);
- wl.shell_surface_add_listener(shell_surface_, &WaylandWindow::shell_surface_listener_, this);
- wl.shell_surface_set_title(shell_surface_, title.c_str());
-
width_ = width;
height_ = height;
UpdateWindowSize();
+ while(!m_configured)
+ wl.display_dispatch(wayland_context_->GetDisplay());
return true;
}
@@ -103,10 +110,15 @@ bool WaylandWindow::Destroy()
if (surface_)
{
auto& wl = wayland_context_->GetWaylandFunctionTable();
- if (shell_surface_)
+ if (xdg_toplevel_)
+ {
+ wl.xdg_toplevel_destroy(xdg_toplevel_);
+ xdg_toplevel_= nullptr;
+ }
+ if (xdg_surface_)
{
- wl.shell_surface_destroy(shell_surface_);
- shell_surface_ = nullptr;
+ wl.xdg_surface_destroy(xdg_surface_);
+ xdg_surface_ = nullptr;
}
wl.surface_destroy(surface_);
@@ -121,14 +133,13 @@ bool WaylandWindow::Destroy()
void WaylandWindow::SetTitle(const std::string& title)
{
auto& wl = wayland_context_->GetWaylandFunctionTable();
- wl.shell_surface_set_title(shell_surface_, title.c_str());
+ wl.xdg_toplevel_set_title(xdg_toplevel_, title.c_str());
}
void WaylandWindow::SetPosition(const int32_t x, const int32_t y)
{
GFXRECON_UNREFERENCED_PARAMETER(x);
GFXRECON_UNREFERENCED_PARAMETER(y);
- // TODO: May be possible with xdg-shell extension.
}
void WaylandWindow::SetSize(const uint32_t width, const uint32_t height)
@@ -215,19 +226,18 @@ void WaylandWindow::UpdateWindowSize()
if (output_info.width == width_ && output_info.height == height_)
{
- wl.shell_surface_set_fullscreen(shell_surface_, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, output_);
+ wl.xdg_toplevel_set_fullscreen(xdg_toplevel_, NULL);
}
- else
- {
- wl.shell_surface_set_toplevel(shell_surface_);
- }
- }
- else
- {
- wl.shell_surface_set_toplevel(shell_surface_);
}
}
+void WaylandWindow::HandleConfigure(void* data, struct xdg_surface* surface, uint32_t serial)
+{
+ auto& wl = reinterpret_cast<WaylandWindow*>(data)->wayland_context_->GetWaylandFunctionTable();
+ wl.xdg_surface_ack_configure(surface, serial);
+ m_configured = true;
+}
+
void WaylandWindow::HandleSurfaceEnter(void* data, struct wl_surface* surface, struct wl_output* output)
{
auto window = reinterpret_cast<WaylandWindow*>(data);
@@ -238,17 +248,13 @@ void WaylandWindow::HandleSurfaceEnter(void* data, struct wl_surface* surface, s
void WaylandWindow::HandleSurfaceLeave(void* data, struct wl_surface* surface, struct wl_output* output) {}
-void WaylandWindow::HandlePing(void* data, wl_shell_surface* shell_surface, uint32_t serial)
+void WaylandWindow::HandlePing(void* data, xdg_wm_base* xdg_wm_base, uint32_t serial)
{
auto& wl = reinterpret_cast<WaylandWindow*>(data)->wayland_context_->GetWaylandFunctionTable();
- wl.shell_surface_pong(shell_surface, serial);
+ wl.xdg_wm_base_pong(xdg_wm_base, serial);
}
-void WaylandWindow::HandleConfigure(
- void* data, wl_shell_surface* shell_surface, uint32_t edges, int32_t width, int32_t height)
-{}
-
-void WaylandWindow::HandlePopupDone(void* data, wl_shell_surface* shell_surface) {}
+void WaylandWindow::HandlePopupDone(void* data, xdg_toplevel* shell_surface) {}
WaylandWindowFactory::WaylandWindowFactory(WaylandContext* wayland_context) : wayland_context_(wayland_context)
{
diff --git a/framework/application/wayland_window.h b/framework/application/wayland_window.h
index a4966557..a14096f7 100644
--- a/framework/application/wayland_window.h
+++ b/framework/application/wayland_window.h
@@ -29,6 +29,7 @@
#include "util/defines.h"
#include <wayland-client.h>
+#include "util/xdg-shell-client-protocol.h"
GFXRECON_BEGIN_NAMESPACE(gfxrecon)
GFXRECON_BEGIN_NAMESPACE(application)
@@ -42,7 +43,9 @@ class WaylandWindow : public decode::Window
struct wl_surface* GetSurface() const { return surface_; }
- struct wl_shell_surface* GetShellSurface() const { return shell_surface_; }
+ static void HandlePing(void* data, xdg_wm_base* xdg_wm_base, uint32_t serial);
+
+ struct xdg_toplevel* GetShellSurface() const { return xdg_toplevel_; }
virtual bool Create(const std::string& title,
const int32_t x,
@@ -80,21 +83,20 @@ class WaylandWindow : public decode::Window
static void HandleSurfaceEnter(void* data, struct wl_surface* surface, struct wl_output* output);
static void HandleSurfaceLeave(void* data, struct wl_surface* surface, struct wl_output* output);
- static void HandlePing(void* data, wl_shell_surface* shell_surface, uint32_t serial);
-
static void
- HandleConfigure(void* data, wl_shell_surface* shell_surface, uint32_t edges, int32_t width, int32_t height);
+ HandleConfigure(void* data, struct xdg_surface* shell_surface, uint32_t serial);
- static void HandlePopupDone(void* data, wl_shell_surface* shell_surface);
+ static void HandlePopupDone(void* data, xdg_toplevel* xdg_toplevel);
void UpdateWindowSize();
private:
- static struct wl_surface_listener surface_listener_;
- static struct wl_shell_surface_listener shell_surface_listener_;
+ static struct xdg_surface_listener surface_listener_;
+ static struct xdg_toplevel_listener xdg_toplevel_listener_;
WaylandContext* wayland_context_;
struct wl_surface* surface_;
- struct wl_shell_surface* shell_surface_;
+ struct xdg_surface* xdg_surface_;
+ struct xdg_toplevel* xdg_toplevel_;
uint32_t width_;
uint32_t height_;
int32_t scale_;
@@ -124,4 +126,4 @@ class WaylandWindowFactory : public decode::WindowFactory
GFXRECON_END_NAMESPACE(util)
GFXRECON_END_NAMESPACE(gfxrecon)
-#endif // GFXRECON_APPLICATION_WAYLAND_WINDOW_H
\ No newline at end of file
+#endif // GFXRECON_APPLICATION_WAYLAND_WINDOW_H
diff --git a/framework/util/wayland_loader.cpp b/framework/util/wayland_loader.cpp
index 53565d80..086816e1 100644
--- a/framework/util/wayland_loader.cpp
+++ b/framework/util/wayland_loader.cpp
@@ -72,10 +72,10 @@ bool WaylandLoader::Initialize()
util::platform::GetProcAddress(libwayland_, "wl_display_roundtrip"));
function_table_.compositor_interface = reinterpret_cast<decltype(wl_compositor_interface)*>(
util::platform::GetProcAddress(libwayland_, "wl_compositor_interface"));
- function_table_.shell_interface = reinterpret_cast<decltype(wl_shell_interface)*>(
- util::platform::GetProcAddress(libwayland_, "wl_shell_interface"));
function_table_.seat_interface = reinterpret_cast<decltype(wl_seat_interface)*>(
util::platform::GetProcAddress(libwayland_, "wl_seat_interface"));
+ function_table_.shell_base_interface = reinterpret_cast<decltype(xdg_wm_base_interface)*>(&xdg_wm_base_interface);
+
// Proxy functions
function_table_.proxy_add_listener = reinterpret_cast<decltype(wl_proxy_add_listener)*>(
@@ -89,6 +89,10 @@ bool WaylandLoader::Initialize()
function_table_.proxy_marshal_constructor_versioned =
reinterpret_cast<decltype(wl_proxy_marshal_constructor_versioned)*>(
util::platform::GetProcAddress(libwayland_, "wl_proxy_marshal_constructor_versioned"));
+ function_table_.proxy_marshal_flags = reinterpret_cast<decltype(wl_proxy_marshal_flags)*>(
+ util::platform::GetProcAddress(libwayland_, "wl_proxy_marshal_flags"));
+ function_table_.proxy_marshal_array_flags = reinterpret_cast<decltype(wl_proxy_marshal_array_flags)*>(
+ util::platform::GetProcAddress(libwayland_, "wl_proxy_marshal_array_flags"));
// Interfaces
function_table_.registry_interface = reinterpret_cast<decltype(wl_registry_interface)*>(
@@ -99,10 +103,10 @@ bool WaylandLoader::Initialize()
util::platform::GetProcAddress(libwayland_, "wl_output_interface"));
function_table_.pointer_interface = reinterpret_cast<decltype(wl_pointer_interface)*>(
util::platform::GetProcAddress(libwayland_, "wl_pointer_interface"));
- function_table_.shell_surface_interface = reinterpret_cast<decltype(wl_shell_surface_interface)*>(
- util::platform::GetProcAddress(libwayland_, "wl_shell_surface_interface"));
function_table_.surface_interface = reinterpret_cast<decltype(wl_surface_interface)*>(
util::platform::GetProcAddress(libwayland_, "wl_surface_interface"));
+ function_table_.shell_surface_interface = reinterpret_cast<decltype(xdg_surface_interface)*>(&xdg_surface_interface);
+ function_table_.toplevel_interface = reinterpret_cast<decltype(xdg_toplevel_interface)*>(&xdg_toplevel_interface);
}
else
{
diff --git a/framework/util/wayland_loader.h b/framework/util/wayland_loader.h
index 8c704670..70643246 100644
--- a/framework/util/wayland_loader.h
+++ b/framework/util/wayland_loader.h
@@ -28,6 +28,7 @@
#include "util/platform.h"
#include <wayland-client.h>
+#include "xdg-shell-client-protocol.h"
GFXRECON_BEGIN_NAMESPACE(gfxrecon)
GFXRECON_BEGIN_NAMESPACE(util)
@@ -46,7 +47,7 @@ class WaylandLoader
decltype(wl_display_flush)* display_flush;
decltype(wl_display_roundtrip)* display_roundtrip;
decltype(wl_compositor_interface)* compositor_interface;
- decltype(wl_shell_interface)* shell_interface;
+ decltype(xdg_wm_base_interface)* shell_base_interface;
decltype(wl_seat_interface)* seat_interface;
// proxy functions
@@ -55,20 +56,23 @@ class WaylandLoader
decltype(wl_proxy_marshal)* proxy_marshal;
decltype(wl_proxy_marshal_constructor)* proxy_marshal_constructor;
decltype(wl_proxy_marshal_constructor_versioned)* proxy_marshal_constructor_versioned;
+ decltype(wl_proxy_marshal_flags)* proxy_marshal_flags;
+ decltype(wl_proxy_marshal_array_flags)* proxy_marshal_array_flags;
+
// interfaces
decltype(wl_registry_interface)* registry_interface;
decltype(wl_keyboard_interface)* keyboard_interface;
decltype(wl_output_interface)* output_interface;
decltype(wl_pointer_interface)* pointer_interface;
- decltype(wl_shell_surface_interface)* shell_surface_interface;
+ decltype(xdg_surface_interface)* shell_surface_interface;
+ decltype(xdg_toplevel_interface)* toplevel_interface;
decltype(wl_surface_interface)* surface_interface;
// inline functions, adapted from wayland-client-protocol.h
struct wl_surface* compositor_create_surface(struct wl_compositor* wl_compositor) const
{
struct wl_proxy* id;
-
id = this->proxy_marshal_constructor(reinterpret_cast<struct wl_proxy*>(wl_compositor),
WL_COMPOSITOR_CREATE_SURFACE,
this->surface_interface,
@@ -76,6 +80,10 @@ class WaylandLoader
return reinterpret_cast<struct wl_surface*>(id);
}
+ void wl_surface_commit(struct wl_surface *wl_surface) const
+ {
+ this->proxy_marshal(reinterpret_cast<struct wl_proxy*>(wl_surface), WL_SURFACE_COMMIT);
+ }
void compositor_destroy(struct wl_compositor* wl_compositor) const
{
@@ -185,72 +193,85 @@ class WaylandLoader
return reinterpret_cast<struct wl_pointer*>(id);
}
- void shell_destroy(struct wl_shell* wl_shell) const
+ void shell_destroy(struct xdg_wm_base* xdg_wm_base) const
{
- this->proxy_destroy(reinterpret_cast<struct wl_proxy*>(wl_shell));
+ this->proxy_destroy(reinterpret_cast<struct wl_proxy*>(xdg_wm_base));
}
- struct wl_shell_surface* shell_get_shell_surface(struct wl_shell* wl_shell, struct wl_surface* surface) const
+ struct xdg_surface* xdg_wm_base_get_xdg_surface(struct xdg_wm_base* xdg_wm_base, struct wl_surface* surface) const
{
struct wl_proxy* id;
-
- id = this->proxy_marshal_constructor(reinterpret_cast<struct wl_proxy*>(wl_shell),
- WL_SHELL_GET_SHELL_SURFACE,
+ id = this->proxy_marshal_constructor(reinterpret_cast<struct wl_proxy*>(xdg_wm_base),
+ XDG_WM_BASE_GET_XDG_SURFACE,
this->shell_surface_interface,
NULL,
surface);
- return reinterpret_cast<struct wl_shell_surface*>(id);
+ return reinterpret_cast<struct xdg_surface*>(id);
}
- int shell_surface_add_listener(struct wl_shell_surface* wl_shell_surface,
- struct wl_shell_surface_listener* listener,
- void* data) const
+ struct xdg_toplevel* xdg_surface_get_toplevel(struct xdg_surface* xdg_surface) const
{
- return this->proxy_add_listener(reinterpret_cast<struct wl_proxy*>(wl_shell_surface),
- reinterpret_cast<void (**)(void)>(listener),
- data);
+ struct wl_proxy *id;
+ id = this->proxy_marshal_constructor(reinterpret_cast<struct wl_proxy*>(xdg_surface),
+ XDG_SURFACE_GET_TOPLEVEL, this->toplevel_interface, NULL);
+
+ return reinterpret_cast<struct xdg_toplevel*>(id);
+ }
+
+ void xdg_toplevel_destroy(struct xdg_toplevel* xdg_toplevel) const
+ {
+ this->proxy_destroy(reinterpret_cast<struct wl_proxy*>(xdg_toplevel));
}
- void shell_surface_destroy(struct wl_shell_surface* wl_shell_surface) const
+ void xdg_surface_destroy(struct xdg_surface *xdg_surface) const
{
- this->proxy_destroy(reinterpret_cast<struct wl_proxy*>(wl_shell_surface));
+ this->proxy_destroy(reinterpret_cast<struct wl_proxy*>(xdg_surface));
}
- void shell_surface_move(struct wl_shell_surface* wl_shell_surface, struct wl_seat* seat, uint32_t serial) const
+ void xdg_toplevel_move(struct xdg_toplevel* xdg_toplevel, struct wl_seat* seat, uint32_t serial) const
{
this->proxy_marshal(
- reinterpret_cast<struct wl_proxy*>(wl_shell_surface), WL_SHELL_SURFACE_MOVE, seat, serial);
+ reinterpret_cast<struct wl_proxy*>(xdg_toplevel), XDG_TOPLEVEL_MOVE, seat, serial);
+ }
+ int xdg_wm_base_add_listener(struct xdg_wm_base* xdg_wm_base,
+ struct xdg_wm_base_listener *listener,
+ void *data) const
+ {
+ return this->proxy_add_listener(reinterpret_cast<struct wl_proxy*>(xdg_wm_base),
+ reinterpret_cast<void (**)(void)>(listener),
+ data);
+ }
+ void xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial) const
+ {
+ this->proxy_marshal(reinterpret_cast<struct wl_proxy*>(xdg_surface), XDG_SURFACE_ACK_CONFIGURE, serial);
}
- void shell_surface_pong(struct wl_shell_surface* wl_shell_surface, uint32_t serial) const
+ void xdg_wm_base_pong(struct xdg_wm_base* xdg_wm_base, uint32_t serial) const
{
- this->proxy_marshal(reinterpret_cast<struct wl_proxy*>(wl_shell_surface), WL_SHELL_SURFACE_PONG, serial);
+ this->proxy_marshal(reinterpret_cast<struct wl_proxy*>(xdg_wm_base), XDG_WM_BASE_PONG, serial);
}
- void shell_surface_set_fullscreen(struct wl_shell_surface* wl_shell_surface,
- uint32_t method,
- uint32_t framerate,
- struct wl_output* output) const
+ void xdg_toplevel_set_fullscreen(struct xdg_toplevel *xdg_toplevel, struct wl_output *output) const
{
- this->proxy_marshal(reinterpret_cast<struct wl_proxy*>(wl_shell_surface), WL_SHELL_SURFACE_SET_FULLSCREEN);
+ this->proxy_marshal(reinterpret_cast<struct wl_proxy*>(xdg_toplevel), XDG_TOPLEVEL_SET_FULLSCREEN, output);
}
- void shell_surface_set_title(struct wl_shell_surface* wl_shell_surface, const char* title) const
+ void xdg_toplevel_set_title(struct xdg_toplevel* xdg_toplevel, const char* title) const
{
this->proxy_marshal(
- reinterpret_cast<struct wl_proxy*>(wl_shell_surface), WL_SHELL_SURFACE_SET_TITLE, title);
+ reinterpret_cast<struct wl_proxy*>(xdg_toplevel), XDG_TOPLEVEL_SET_TITLE, title);
}
- void shell_surface_set_toplevel(struct wl_shell_surface* wl_shell_surface) const
+ void shell_surface_set_toplevel(struct xdg_toplevel* xdg_toplevel) const
{
- this->proxy_marshal(reinterpret_cast<struct wl_proxy*>(wl_shell_surface), WL_SHELL_SURFACE_SET_TOPLEVEL);
+ this->proxy_marshal(reinterpret_cast<struct wl_proxy*>(xdg_toplevel), WL_SHELL_SURFACE_SET_TOPLEVEL);
}
- int surface_add_listener(struct wl_surface* wl_surface, struct wl_surface_listener* listener, void* data) const
+ int xdg_surface_add_listener(struct xdg_surface* xdg_surface, struct xdg_surface_listener* listener, void* data) const
{
return this->proxy_add_listener(
- reinterpret_cast<struct wl_proxy*>(wl_surface), reinterpret_cast<void (**)(void)>(listener), data);
+ reinterpret_cast<struct wl_proxy*>(xdg_surface), reinterpret_cast<void (**)(void)>(listener), data);
}
void surface_set_buffer_scale(struct wl_surface* wl_surface, int32_t scale) const
--
2.34.1

View File

@ -0,0 +1,65 @@
From 7ab6040ea9b7a0c93d3df918d7164b25940c925a Mon Sep 17 00:00:00 2001
From: Kratika Jain <kratika.jain@nxp.com>
Date: Tue, 6 Jun 2023 13:19:49 +0530
Subject: [PATCH 2/2] MGS-7104 [#ccc] gfxreconstruct: Generate xdg-shell
protocol files
Work is derived from https://github.com/LunarG/gfxreconstruct/pull/698
Upstream-Status: Inappropriate [not author]
Signed-off-by: Kratika Jain <kratika.jain@nxp.com>
---
framework/util/CMakeLists.txt | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
Index: git/framework/util/CMakeLists.txt
===================================================================
--- git.orig/framework/util/CMakeLists.txt
+++ git/framework/util/CMakeLists.txt
@@ -27,9 +27,36 @@
###############################################################################
add_library(gfxrecon_util STATIC "")
+add_library(gfxrecon_xdg STATIC "")
+project(gfxrecon_xdg C)
+
+find_library(WAYLAND_CLIENT_LIBRARY NAMES wayland-client libwayland-client)
+find_library(WAYLAND_EGL_LIBRARY NAMES wayland-egl libwayland-egl )
+find_library(WAYLAND_CURSOR_LIBRARY NAMES wayland-cursor libwayland-cursor)
+
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/xdg-shell-client-protocol.h
+ COMMAND wayland-scanner client-header
+ $ENV{SDKTARGETSYSROOT}/usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/xdg-shell-client-protocol.h
+ COMMENT "Generating sources...")
+
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/xdg-shell-protocol.c
+ COMMAND wayland-scanner private-code
+ $ENV{SDKTARGETSYSROOT}/usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/xdg-shell-protocol.c
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/xdg-shell-client-protocol.h
+ COMMENT "Generating sources...")
+
+set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/xdg-shell-protocol.c PROPERTIES GENERATED 1)
+
+target_sources(gfxrecon_xdg PRIVATE ${CMAKE_CURRENT_LIST_DIR}/xdg-shell-protocol.c)
target_sources(gfxrecon_util
PRIVATE
+ ${CMAKE_CURRENT_LIST_DIR}/xdg-shell-client-protocol.h
+ ${CMAKE_CURRENT_LIST_DIR}/xdg-shell-protocol.c
${CMAKE_CURRENT_LIST_DIR}/argument_parser.h
${CMAKE_CURRENT_LIST_DIR}/argument_parser.cpp
${CMAKE_CURRENT_LIST_DIR}/compressor.h
@@ -112,6 +139,9 @@ target_include_directories(gfxrecon_util
PUBLIC
${CMAKE_SOURCE_DIR}/framework
$<$<BOOL:${D3D12_SUPPORT}>:${CMAKE_SOURCE_DIR}/external/AgilitySDK/inc>)
+
+target_link_libraries(gfxrecon_xdg ${WAYLAND_CLIENT_LIBRARY} ${WAYLAND_EGL_LIBRARY} ${WAYLAND_CURSOR_LIBRARY})
+target_link_libraries(gfxrecon_util gfxrecon_xdg)
target_link_libraries(gfxrecon_util platform_specific vulkan_registry nlohmann_json::nlohmann_json ${CMAKE_DL_LIBS})
target_link_libraries(gfxrecon_util $<$<BOOL:${WIN32}>:version.lib>)

View File

@ -0,0 +1,87 @@
From 2f0b7d10e49d0156afe9f20f8847a25fcc32e5d9 Mon Sep 17 00:00:00 2001
From: Yuan Tian <yuan.tian@nxp.com>
Date: Mon, 25 Mar 2024 15:40:15 +0800
Subject: [PATCH] Change gfxreconstruct layer to implicit layer
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
---
layer/CMakeLists.txt | 2 +-
layer/json/VkLayer_gfxreconstruct.json.in | 6 +++++
.../capture-vulkan/gfxrecon-capture-vulkan.py | 23 +++----------------
3 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/layer/CMakeLists.txt b/layer/CMakeLists.txt
index 856b72f3..29be8159 100644
--- a/layer/CMakeLists.txt
+++ b/layer/CMakeLists.txt
@@ -91,7 +91,7 @@ endif()
install(TARGETS VkLayer_gfxreconstruct RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if (UNIX)
- install(FILES $<TARGET_FILE_DIR:VkLayer_gfxreconstruct>/staging-json/VkLayer_gfxreconstruct.json DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/vulkan/explicit_layer.d)
+ install(FILES $<TARGET_FILE_DIR:VkLayer_gfxreconstruct>/staging-json/VkLayer_gfxreconstruct.json DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/vulkan/implicit_layer.d)
else()
install(FILES $<TARGET_FILE_DIR:VkLayer_gfxreconstruct>/VkLayer_gfxreconstruct.json DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
diff --git a/layer/json/VkLayer_gfxreconstruct.json.in b/layer/json/VkLayer_gfxreconstruct.json.in
index 914f8e62..e568c8b3 100644
--- a/layer/json/VkLayer_gfxreconstruct.json.in
+++ b/layer/json/VkLayer_gfxreconstruct.json.in
@@ -473,6 +473,12 @@
]
}
]
+ },
+ "enable_environment": {
+ "ENABLE_VULKAN_GFXRECONSTRUCT_CAPTURE": "1"
+ },
+ "disable_environment": {
+ "DISABLE_VULKAN_GFXRECONSTRUCT_CAPTURE": "1"
}
}
}
diff --git a/tools/capture-vulkan/gfxrecon-capture-vulkan.py b/tools/capture-vulkan/gfxrecon-capture-vulkan.py
index 6ad804c4..93937918 100644
--- a/tools/capture-vulkan/gfxrecon-capture-vulkan.py
+++ b/tools/capture-vulkan/gfxrecon-capture-vulkan.py
@@ -250,24 +250,8 @@ def validate_args(args):
def set_env_vars(args):
'''Set environment variables for capture layer
'''
- # Set VK_INSTANCE_LAYERS
- # If gfxr layer is not already in VK_INSTANCE_LAYER, append gfxr layer
- # to VK_INSTANCE_LAYERS
- if os.getenv('VK_INSTANCE_LAYERS') is None:
- os.environ['VK_INSTANCE_LAYERS'] = 'VK_LAYER_LUNARG_gfxreconstruct'
- elif (not ('VK_LAYER_LUNARG_gfxreconstruct' in os.getenv('VK_INSTANCE_LAYERS'))):
- os.environ['VK_INSTANCE_LAYERS'] = os.environ['VK_INSTANCE_LAYERS'] + \
- os.pathsep + 'VK_LAYER_LUNARG_gfxreconstruct'
- if args.capture_layer is not None:
- # Prefix the layer path provided by the user to the layer search path
- path_delimiter = ':'
- if 'windows' == platform.system().lower():
- path_delimiter = ';'
- vk_layer_path = ''
- if 'VK_LAYER_PATH' in os.environ:
- vk_layer_path = os.environ['VK_LAYER_PATH']
- os.environ['VK_LAYER_PATH'] = path_delimiter.join([
- args.capture_layer, vk_layer_path])
+ # Set ENABLE_VULKAN_GFXRECONSTRUCT_CAPTURE
+ os.environ['ENABLE_VULKAN_GFXRECONSTRUCT_CAPTURE'] = '1'
# Set GFXRECON_* capture options
# The capture layer will validate these options and generate errors as needed
@@ -311,8 +295,7 @@ def PrintLayerEnv():
print_env_var('GFXRECON_LOG_LEVEL')
print_env_var('GFXRECON_LOG_OUTPUT_TO_OS_DEBUG_STRING')
print_env_var('GFXRECON_MEMORY_TRACKING_MODE')
- print_env_var('VK_INSTANCE_LAYERS')
- print_env_var('VK_LAYER_PATH')
+ print_env_var('ENABLE_VULKAN_GFXRECONSTRUCT_CAPTURE')
if '__main__' == __name__:
--
2.17.1

View File

@ -0,0 +1,34 @@
SUMMARY = "Tools for the capture and replay of Vulkan API calls"
SECTION = "graphics"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d2ddcd9b5c3b713fcf90c3223f6b10bd"
DEPENDS = "vulkan-headers zstd"
SRC_URI = " \
git://github.com/LunarG/gfxreconstruct.git;protocol=https;branch=vulkan-sdk-1.3.275 \
file://0001-FindVulkanVersion.cmake-Look-for-vulkan-headers-in-s.patch \
file://0002-MGS-7104-ccc-gfxreconstruct-Add-support-for-xdg-shel.patch \
file://0003-MGS-7104-ccc-gfxreconstruct-Generate-xdg-shell-proto.patch \
file://0004-Change-gfxreconstruct-layer-to-implicit-layer.patch \
"
SRCREV = "ad85498e33a53f4c89979e0af8e3fe3b512aa47c"
S = "${WORKDIR}/git"
inherit cmake features_check
ANY_OF_DISTRO_FEATURES = "wayland x11"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON,-DBUILD_WSI_WAYLAND_SUPPORT=OFF,wayland-native wayland wayland-protocols"
PACKAGECONFIG[x11] = "-DBUILD_WSI_XCB_SUPPORT=ON,-DBUILD_WSI_XCB_SUPPORT=OFF,libxcb libx11 xcb-util-keysyms"
EXTRA_OECMAKE += "\
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \
"
export SDKTARGETSYSROOT = "${STAGING_DIR_HOST}"
FILES:${PN} += "${datadir}/vulkan"
INSANE_SKIP:${PN}-dev += "dev-elf"

View File

@ -1,4 +1,4 @@
From 436b5b09a0f5fcd3b4f2c1711e850b52b357befb Mon Sep 17 00:00:00 2001 From d88b1869c51581c56624eaf6cbedfdf6bdb19a41 Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com> From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Wed, 13 Jun 2018 22:02:20 +0000 Date: Wed, 13 Jun 2018 22:02:20 +0000
Subject: [PATCH] scenes: Use depth format supported by i.MX Subject: [PATCH] scenes: Use depth format supported by i.MX
@ -6,6 +6,7 @@ Subject: [PATCH] scenes: Use depth format supported by i.MX
Upstream-Status: Inappropriate [i.MX-specific] Upstream-Status: Inappropriate [i.MX-specific]
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
--- ---
src/scenes/shading_scene.cpp | 2 +- src/scenes/shading_scene.cpp | 2 +-
src/scenes/texture_scene.cpp | 2 +- src/scenes/texture_scene.cpp | 2 +-
@ -51,6 +52,3 @@ index 0fd7fe7..4f6d49a 100644
aspect = static_cast<float>(extent.height) / extent.width; aspect = static_cast<float>(extent.height) / extent.width;
mesh = Model{"horse.3ds"}.to_mesh( mesh = Model{"horse.3ds"}.to_mesh(
--
2.7.4

View File

@ -1,4 +1,4 @@
From 3e3da71c62a36516fa16cfb1d5d55e9e5c86e573 Mon Sep 17 00:00:00 2001 From 316d477d0f8dc0936b4e057545ff83f1993047a6 Mon Sep 17 00:00:00 2001
From: Neena Busireddy <neenareddy.busireddy@nxp.com> From: Neena Busireddy <neenareddy.busireddy@nxp.com>
Date: Mon, 3 May 2021 11:44:46 -0700 Date: Mon, 3 May 2021 11:44:46 -0700
Subject: [PATCH] src/meson.build: Prepend sysroot for the includedir Subject: [PATCH] src/meson.build: Prepend sysroot for the includedir
@ -8,6 +8,7 @@ Need to prepend PKG_CONFIG_SYSROOT_DIR to the dir path for cross compilation
Upstream-Status: Inappropriate [OE-specific] Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com> Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
--- ---
src/meson.build | 3 +++ src/meson.build | 3 +++
1 file changed, 3 insertions(+) 1 file changed, 3 insertions(+)
@ -26,6 +27,3 @@ index 35813c5..9032706 100644
format_map_gen_h = custom_target( format_map_gen_h = custom_target(
'format_map_gen.h', 'format_map_gen.h',
output: 'format_map_gen.h', output: 'format_map_gen.h',
--
2.17.1

View File

@ -0,0 +1,37 @@
From ec56eaab16cb99dad7d9b3fa45ddbcd3a3bc469c Mon Sep 17 00:00:00 2001
From: Neena Busireddy <neenareddy.busireddy@nxp.com>
Date: Tue, 11 Oct 2022 12:42:10 -0700
Subject: [PATCH] meson.build: Enable native wayland scanner
With openembedded commit e525db4eb9 ("wayland: update 1.20.0 -> 1.21.0")
package config seems no longer to provide the path to the native
wayland scanner.
This patch fixes the following build break:
Program /usr/bin/wayland-scanner found: NO
|
| ../git/src/meson.build:93:4: ERROR: Program '/usr/bin/wayland-scanner' not found or not executable
|
Upstream-Status: Inappropriate [imx specific]
Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 0d83918..9c33652 100644
--- a/meson.build
+++ b/meson.build
@@ -29,7 +29,7 @@ xcb_icccm_dep = dependency('xcb-icccm', required : get_option('xcb') == 'true')
wayland_client_dep = dependency('wayland-client', required : get_option('wayland') == 'true')
wayland_protocols_dep = dependency('wayland-protocols', version : '>= 1.12',
required : get_option('wayland') == 'true')
-wayland_scanner_dep = dependency('wayland-scanner', required : get_option('wayland') == 'true')
+wayland_scanner_dep = dependency('wayland-scanner', required : get_option('wayland') == 'true', native: true)
libdrm_dep = dependency('libdrm', required : get_option('kms') == 'true')
gbm_dep = dependency('gbm', required : get_option('kms') == 'true')

View File

@ -10,12 +10,13 @@ DEPENDS = "vulkan-loader assimp glm"
SRC_URI = " \ SRC_URI = " \
git://github.com/vkmark/vkmark;protocol=https;branch=master \ git://github.com/vkmark/vkmark;protocol=https;branch=master \
file://0001-scenes-Use-depth-format-supported-by-i.MX.patch \ file://0001-scenes-Use-depth-format-supported-by-i.MX.patch \
file://0001-src-meson.build-Prepend-sysroot-for-the-includedir.patch \ file://0002-src-meson.build-Prepend-sysroot-for-the-includedir.patch \
file://0003-meson.build-Enable-native-wayland-scanner.patch \
" "
SRCREV = "53abc4f660191051fba91ea30de084f412e7c68e" SRCREV = "ab6e6f34077722d5ae33f6bd40b18ef9c0e99a15"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
inherit meson inherit meson pkgconfig
PACKAGECONFIG ?= " \ PACKAGECONFIG ?= " \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \

View File

@ -41,27 +41,27 @@ Index: git/examples/CMakeLists.txt
=================================================================== ===================================================================
--- git.orig/examples/CMakeLists.txt --- git.orig/examples/CMakeLists.txt
+++ git/examples/CMakeLists.txt +++ git/examples/CMakeLists.txt
@@ -72,9 +72,6 @@ set(EXAMPLES @@ -89,9 +89,6 @@ set(EXAMPLES
conditionalrender conditionalrender
conservativeraster conservativeraster
debugmarker debugmarker
- deferred - deferred
- deferredmultisampling - deferredmultisampling
- deferredshadows - deferredshadows
descriptorbuffer
descriptorindexing descriptorindexing
descriptorsets descriptorsets
displacement @@ -106,9 +103,6 @@ set(EXAMPLES
@@ -85,9 +82,6 @@ set(EXAMPLES
gltfloading
gltfscenerendering gltfscenerendering
gltfskinning gltfskinning
graphicspipelinelibrary
- hdr - hdr
- imgui - imgui
- indirectdraw - indirectdraw
inlineuniformblocks inlineuniformblocks
inputattachments inputattachments
instancing instancing
@@ -101,8 +95,6 @@ set(EXAMPLES @@ -123,8 +117,6 @@ set(EXAMPLES
parallaxmapping parallaxmapping
particlefire particlefire
pbrbasic pbrbasic
@ -70,10 +70,10 @@ Index: git/examples/CMakeLists.txt
pipelines pipelines
pipelinestatistics pipelinestatistics
pushconstants pushconstants
@@ -115,12 +107,8 @@ set(EXAMPLES @@ -141,12 +133,8 @@ set(EXAMPLES
raytracingshadows
renderheadless renderheadless
screenshot screenshot
shaderobjects
- shadowmapping - shadowmapping
- shadowmappingomni - shadowmappingomni
- shadowmappingcascade - shadowmappingcascade
@ -83,9 +83,9 @@ Index: git/examples/CMakeLists.txt
stencilbuffer stencilbuffer
subpasses subpasses
terraintessellation terraintessellation
@@ -136,7 +124,6 @@ set(EXAMPLES @@ -163,7 +151,6 @@ set(EXAMPLES
triangle
variablerateshading variablerateshading
vertexattributes
viewportarray viewportarray
- vulkanscene - vulkanscene
) )

View File

@ -10,10 +10,10 @@ Upstream-Status: Inappropriate [i.MX-specific]
examples/computenbody/computenbody.cpp | 4 ++-- examples/computenbody/computenbody.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/computenbody/computenbody.cpp b/examples/computenbody/computenbody.cpp Index: git/examples/computenbody/computenbody.cpp
index 84d1c278..0837d424 100644 ===================================================================
--- a/examples/computenbody/computenbody.cpp --- git.orig/examples/computenbody/computenbody.cpp
+++ b/examples/computenbody/computenbody.cpp +++ git/examples/computenbody/computenbody.cpp
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
// Lower particle count on Android for performance reasons // Lower particle count on Android for performance reasons
#define PARTICLES_PER_ATTRACTOR 3 * 1024 #define PARTICLES_PER_ATTRACTOR 3 * 1024
@ -23,13 +23,3 @@ index 84d1c278..0837d424 100644
#endif #endif
class VulkanExample : public VulkanExampleBase class VulkanExample : public VulkanExampleBase
@@ -902,4 +902,4 @@ public:
}
};
-VULKAN_EXAMPLE_MAIN()
\ No newline at end of file
+VULKAN_EXAMPLE_MAIN()
--
2.17.1

View File

@ -1,38 +1,38 @@
DESCRIPTION = "Collection of Vulkan examples" DESCRIPTION = "Vulkan C++ examples and demos"
LICENSE = "MIT" LICENSE = "MIT"
DEPENDS = "zlib"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=dcf473723faabf17baa9b5f2207599d0 \ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=dcf473723faabf17baa9b5f2207599d0 \
file://examples/triangle/triangle.cpp;endline=12;md5=bccd1bf9cadd9e10086cf7872157e4fa" file://examples/triangle/triangle.cpp;endline=12;md5=6ff76c9a8e7b7dd640157f5d77b79339"
DEPENDS = "assimp vulkan-loader zlib"
SRC_URI = "git://github.com/SaschaWillems/Vulkan.git;protocol=https;branch=master \
git://github.com/g-truc/glm;destsuffix=git/external/glm;name=glm;protocol=https;branch=master \
git://github.com/KhronosGroup/KTX-Software;destsuffix=git/external/ktx;name=ktx;lfs=0;protocol=https;branch=master \
file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \
file://0002-Modify-parameter-in-vulkan-demo-computenbody.patch \
"
SRCREV = "054a765eaaa552d5d12d869373dea211eda6fb16"
SRCREV_glm = "1ad55c5016339b83b7eec98c31007e0aee57d2bf" SRCREV_glm = "1ad55c5016339b83b7eec98c31007e0aee57d2bf"
SRCREV_ktx = "726d14d02c95bb21ec9e43807751b491d295dd3c" SRCREV_ktx = "726d14d02c95bb21ec9e43807751b491d295dd3c"
SRC_URI = "git://github.com/SaschaWillems/Vulkan.git;branch=master;protocol=https \ SRCREV_FORMAT = "default_glm_ktx"
git://github.com/g-truc/glm;destsuffix=git/external/glm;name=glm;branch=master;protocol=https \
git://github.com/KhronosGroup/KTX-Software;destsuffix=git/external/ktx;name=ktx;lfs=0;branch=master;protocol=https \
file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \
"
UPSTREAM_CHECK_COMMITS = "1"
SRCREV = "a2a604be473c829763854ffb34f7978bc0358afb"
UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
UPSTREAM_CHECK_COMMITS = "1"
UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
inherit cmake features_check pkgconfig
ANY_OF_DISTRO_FEATURES = "wayland x11"
REQUIRED_DISTRO_FEATURES = 'vulkan' REQUIRED_DISTRO_FEATURES = 'vulkan'
inherit cmake features_check PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb', d)}"
DEPENDS = "vulkan-loader assimp wayland-protocols wayland-native"
do_install:append () { PACKAGECONFIG[wayland] = "-DUSE_WAYLAND_WSI=ON,-DUSE_WAYLAND_WSI=OFF,wayland-native wayland wayland-protocols"
PACKAGECONFIG[xcb] = ",,libxcb"
mv ${D}${bindir}/screenshot ${D}${bindir}/vulkan-screenshot
}
EXTRA_OECMAKE = "-DRESOURCE_INSTALL_DIR=${datadir}/vulkan-demos" EXTRA_OECMAKE = "-DRESOURCE_INSTALL_DIR=${datadir}/vulkan-demos"
ANY_OF_DISTRO_FEATURES = "x11 wayland" do_install:append () {
mv ${D}${bindir}/screenshot ${D}${bindir}/vulkan-screenshot
# Can only pick one of [wayland,xcb] }
PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb', d)}"
PACKAGECONFIG[wayland] = "-DUSE_WAYLAND_WSI=ON, -DUSE_WAYLAND_WSI=OFF, wayland"
PACKAGECONFIG[xcb] = ",,libxcb"

View File

@ -1,5 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://0001-Modify-parameter-in-vulkan-demo-computenbody.patch \
"

View File

@ -0,0 +1,52 @@
From 3448c245b15928aa5a5a3695d9271fb201eb2e3b Mon Sep 17 00:00:00 2001
From: Yuan Tian <yuan.tian@nxp.com>
Date: Sat, 27 Apr 2024 06:06:54 +0800
Subject: [PATCH] LF-11869 change mali wsi layer activating order
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
---
loader/loader.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/loader/loader.c b/loader/loader.c
index e646b28b4..55912c178 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -2906,6 +2906,7 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s
#if !defined(_WIN32)
char temp_path[2048];
#endif
+ bool has_wsi_layer = false;
// Now, parse the paths
next_file = search_path;
@@ -2965,6 +2966,10 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s
name = full_path;
VkResult local_res;
+ if(!strcmp(name,"/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json")) {
+ has_wsi_layer = true;
+ continue;
+ }
local_res = add_if_manifest_file(inst, name, out_files);
// Incomplete means this was not a valid data file.
@@ -2975,6 +2980,13 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s
break;
}
}
+
+ if(has_wsi_layer) {
+ name = "/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json";
+ vk_result = add_if_manifest_file(inst, name, out_files);
+ has_wsi_layer = false;
+ }
+
loader_closedir(inst, dir_stream);
if (vk_result != VK_SUCCESS) {
goto out;
--
2.34.1

View File

@ -0,0 +1,13 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-LF-11869-change-mali-wsi-layer-activating-order.patch"
# libvulkan.so is loaded dynamically, so put it in the main package
SOLIBS = ".so*"
FILES_SOLIBSDEV = ""
INSANE_SKIP:${PN} += "dev-so"
# Override default mesa drivers with i.MX GPU drivers
RRECOMMENDS:${PN}:imxvulkan = "libvulkan-imx"
# Override default mesa drivers with i.MX GPU drivers
RRECOMMENDS:${PN}:mx95-nxp-bsp = "mali-imx-libvulkan"

View File

@ -1,87 +0,0 @@
From 7b27a46d14acf050e6e836c41ca2f286680e6edc Mon Sep 17 00:00:00 2001
From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Date: Tue, 11 May 2021 17:28:06 -0500
Subject: [PATCH 1/3] Add support for wayland.
Use VKB_BUILD_WAYLAND=1 and GLFW_USE_WAYLAND=1 to enable wayland
Signed-off-by: Hugo Osornio <hugo.osornio@nxp.com>
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
---
bldsys/cmake/template/entrypoint_main.cpp.in | 2 ++
framework/platform/unix/unix_platform.cpp | 7 +++++++
third_party/CMakeLists.txt | 19 ++++++++++++-------
3 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/bldsys/cmake/template/entrypoint_main.cpp.in b/bldsys/cmake/template/entrypoint_main.cpp.in
index 92ec703..eaf158e 100644
--- a/bldsys/cmake/template/entrypoint_main.cpp.in
+++ b/bldsys/cmake/template/entrypoint_main.cpp.in
@@ -47,6 +47,8 @@ int main(int argc, char *argv[])
vkb::UnixPlatform platform{vkb::UnixType::Mac, argc, argv};
# elif defined(VK_USE_PLATFORM_XCB_KHR)
vkb::UnixPlatform platform{vkb::UnixType::Linux, argc, argv};
+# elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
+ vkb::UnixPlatform platform{vkb::UnixType::Linux, argc, argv};
# endif
#endif
diff --git a/framework/platform/unix/unix_platform.cpp b/framework/platform/unix/unix_platform.cpp
index 53a0502..84e8f79 100644
--- a/framework/platform/unix/unix_platform.cpp
+++ b/framework/platform/unix/unix_platform.cpp
@@ -35,6 +35,10 @@ VKBP_ENABLE_WARNINGS()
# define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
#endif
+#ifndef VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME
+# define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
+#endif
+
namespace vkb
{
namespace
@@ -95,6 +99,9 @@ const char *UnixPlatform::get_surface_extension()
}
else
{
+#ifdef VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME
+ return VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME;
+#endif
return VK_KHR_XCB_SURFACE_EXTENSION_NAME;
}
}
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 499fe9a..de13c11 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -57,14 +57,19 @@ elseif(WIN32)
elseif(APPLE)
target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_MACOS_MVK)
elseif(UNIX)
- # See whether X11 is available. If not, fall back to direct-to-display mode.
- find_package(X11 QUIET)
- if (X11_FOUND)
- target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_XCB_KHR)
+ if (VKB_BUILD_WAYLAND)
+ message(STATUS "Using Vulkan platform wayland")
+ target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_WAYLAND_KHR)
else()
- set(DIRECT_TO_DISPLAY TRUE)
- set(DIRECT_TO_DISPLAY TRUE PARENT_SCOPE)
- target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_DISPLAY_KHR)
+ # See whether X11 is available. If not, fall back to direct-to-display mode.
+ find_package(X11 QUIET)
+ if (X11_FOUND)
+ target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_XCB_KHR)
+ else()
+ set(DIRECT_TO_DISPLAY TRUE)
+ set(DIRECT_TO_DISPLAY TRUE PARENT_SCOPE)
+ target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_DISPLAY_KHR)
+ endif()
endif()
endif()
--
2.25.1

View File

@ -0,0 +1,44 @@
From c4fdd52842b1ce80c2531c00b43e40d173757e93 Mon Sep 17 00:00:00 2001
From: Yuan Tian <yuan.tian@nxp.com>
Date: Tue, 24 Oct 2023 17:32:08 +0800
Subject: [PATCH] The workload of case 16bit_arithmetic is heavy for 8ulp and
8mn board. It caused TIMEOUT and running aborted. Increase timeout value to
resolve the issue.
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Yuan Tian <yuan.tian@nxp.com>
---
framework/fence_pool.cpp | 2 +-
framework/fence_pool.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/framework/fence_pool.cpp b/framework/fence_pool.cpp
index f2fecd2..a0b77ed 100644
--- a/framework/fence_pool.cpp
+++ b/framework/fence_pool.cpp
@@ -66,7 +66,7 @@ VkFence FencePool::request_fence()
return fences.back();
}
-VkResult FencePool::wait(uint32_t timeout) const
+VkResult FencePool::wait(uint64_t timeout) const
{
if (active_fence_count < 1 || fences.empty())
{
diff --git a/framework/fence_pool.h b/framework/fence_pool.h
index 934990e..8a5037c 100644
--- a/framework/fence_pool.h
+++ b/framework/fence_pool.h
@@ -40,7 +40,7 @@ class FencePool
VkFence request_fence();
- VkResult wait(uint32_t timeout = std::numeric_limits<uint32_t>::max()) const;
+ VkResult wait(uint64_t timeout = std::numeric_limits<uint64_t>::max()) const;
VkResult reset();
--
2.17.1

View File

@ -1,66 +0,0 @@
From 49198f6ccb388e511e40c963744033b9732b4de8 Mon Sep 17 00:00:00 2001
From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Date: Tue, 11 May 2021 17:29:48 -0500
Subject: [PATCH 2/3] Wayland support : Use local context window size.
The default extent will use 0xFFFFFFFF for W and H.
Signed-off-by: Hugo Osornio <hugo.osornio@nxp.com>
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
---
framework/core/swapchain.cpp | 4 +++-
framework/rendering/render_target.cpp | 9 +++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/framework/core/swapchain.cpp b/framework/core/swapchain.cpp
index 3821889..bed25a5 100644
--- a/framework/core/swapchain.cpp
+++ b/framework/core/swapchain.cpp
@@ -356,7 +356,9 @@ Swapchain::Swapchain(Swapchain & old_swapchain,
// Chose best properties based on surface capabilities
properties.image_count = choose_image_count(image_count, surface_capabilities.minImageCount, surface_capabilities.maxImageCount);
- properties.extent = choose_extent(extent, surface_capabilities.minImageExtent, surface_capabilities.maxImageExtent, surface_capabilities.currentExtent);
+ VkExtent2D localExtent{800,800};
+ LOGI("Using local Extent");
+ properties.extent = localExtent;//choose_extent(extent, surface_capabilities.minImageExtent, surface_capabilities.maxImageExtent, surface_capabilities.currentExtent);
properties.array_layers = choose_image_array_layers(1U, surface_capabilities.maxImageArrayLayers);
properties.surface_format = choose_surface_format(properties.surface_format, surface_formats, surface_format_priority_list);
VkFormatProperties format_properties;
diff --git a/framework/rendering/render_target.cpp b/framework/rendering/render_target.cpp
index f9940b2..068cafa 100644
--- a/framework/rendering/render_target.cpp
+++ b/framework/rendering/render_target.cpp
@@ -40,8 +40,9 @@ Attachment::Attachment(VkFormat format, VkSampleCountFlagBits samples, VkImageUs
}
const RenderTarget::CreateFunc RenderTarget::DEFAULT_CREATE_FUNC = [](core::Image &&swapchain_image) -> std::unique_ptr<RenderTarget> {
VkFormat depth_format = get_suitable_depth_format(swapchain_image.get_device().get_gpu().get_handle());
-
- core::Image depth_image{swapchain_image.get_device(), swapchain_image.get_extent(),
+ VkExtent3D localExtent{800,800,1}; // = swapchain_image.get_extent();
+ LOGI("About to create Depth Image {}, {}, {}", localExtent.width, localExtent.height, localExtent.depth);
+ core::Image depth_image{swapchain_image.get_device(), /*swapchain_image.get_extent()*/ localExtent,
depth_format,
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT,
VMA_MEMORY_USAGE_GPU_ONLY};
@@ -70,7 +71,7 @@ vkb::RenderTarget::RenderTarget(std::vector<core::Image> &&images) :
// Allow only one extent size for a render target
if (unique_extent.size() != 1)
{
- throw VulkanException{VK_ERROR_INITIALIZATION_FAILED, "Extent size is not unique"};
+ //throw VulkanException{VK_ERROR_INITIALIZATION_FAILED, "Extent size is not unique"};
}
extent = *unique_extent.begin();
@@ -109,7 +110,7 @@ vkb::RenderTarget::RenderTarget(std::vector<core::ImageView> &&image_views) :
std::transform(views.begin(), views.end(), std::inserter(unique_extent, unique_extent.end()), get_view_extent);
if (unique_extent.size() != 1)
{
- throw VulkanException{VK_ERROR_INITIALIZATION_FAILED, "Extent size is not unique"};
+ //throw VulkanException{VK_ERROR_INITIALIZATION_FAILED, "Extent size is not unique"};
}
extent = *unique_extent.begin();
--
2.25.1

View File

@ -1,36 +0,0 @@
From 01cc6cdf6ceb6a8b20dab4338adb771373cdbbfe Mon Sep 17 00:00:00 2001
From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Date: Tue, 11 May 2021 17:31:25 -0500
Subject: [PATCH 3/3] wayland support for Hello triangle sample
Signed-off-by: Hugo Osornio <hugo.osornio@nxp.com>
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
---
samples/api/hello_triangle/hello_triangle.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/samples/api/hello_triangle/hello_triangle.cpp b/samples/api/hello_triangle/hello_triangle.cpp
index 3f2b8e7..b62ef82 100644
--- a/samples/api/hello_triangle/hello_triangle.cpp
+++ b/samples/api/hello_triangle/hello_triangle.cpp
@@ -187,6 +187,8 @@ void HelloTriangle::init_instance(Context & context,
active_instance_extensions.push_back(VK_MVK_MACOS_SURFACE_EXTENSION_NAME);
#elif defined(VK_USE_PLATFORM_XCB_KHR)
active_instance_extensions.push_back(VK_KHR_XCB_SURFACE_EXTENSION_NAME);
+#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
+ active_instance_extensions.push_back(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME);
#elif defined(VK_USE_PLATFORM_DISPLAY_KHR)
active_instance_extensions.push_back(VK_KHR_DISPLAY_EXTENSION_NAME);
#else
@@ -466,7 +468,7 @@ void HelloTriangle::init_swapchain(Context &context)
}
}
- VkExtent2D swapchain_size = surface_properties.currentExtent;
+ VkExtent2D swapchain_size{800,800};
// FIFO must be supported by all implementations.
VkPresentModeKHR swapchain_present_mode = VK_PRESENT_MODE_FIFO_KHR;
--
2.25.1

View File

@ -1,25 +0,0 @@
From 01e6667afa4b11e541f78d74076a780d046f5fa7 Mon Sep 17 00:00:00 2001
From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Date: Wed, 12 May 2021 16:44:32 -0500
Subject: [PATCH 4/4] glfw : define GLFW_INCLUDE_NONE to avoid using default GL
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
---
framework/platform/glfw_window.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/framework/platform/glfw_window.cpp b/framework/platform/glfw_window.cpp
index 0f2de95..91e9228 100644
--- a/framework/platform/glfw_window.cpp
+++ b/framework/platform/glfw_window.cpp
@@ -22,6 +22,7 @@
#include "common/error.h"
VKBP_DISABLE_WARNINGS()
+#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>
#include <spdlog/sinks/stdout_color_sinks.h>
--
2.25.1

View File

@ -1,32 +0,0 @@
From 69bfc75b74c4b554fb576562684ba0b970771fb4 Mon Sep 17 00:00:00 2001
From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Date: Wed, 12 May 2021 17:20:50 -0500
Subject: [PATCH 5/5] glfw: fix glfw3.h gl error
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
---
samples/extensions/open_gl_interop/offscreen_context.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/samples/extensions/open_gl_interop/offscreen_context.h b/samples/extensions/open_gl_interop/offscreen_context.h
index c125aeb..7260c11 100644
--- a/samples/extensions/open_gl_interop/offscreen_context.h
+++ b/samples/extensions/open_gl_interop/offscreen_context.h
@@ -57,6 +57,7 @@ struct ContextData
};
#else
// Desktop
+#define GLFW_INCLUDE_ES31
# include <GLFW/glfw3.h>
# include <GLFW/glfw3native.h>
@@ -87,4 +88,4 @@ class OffscreenContext
ContextData data;
GLuint load_shader(const char *shader_source, GLenum shader_type);
-};
\ No newline at end of file
+};
--
2.25.1

View File

@ -0,0 +1,14 @@
Upstream-Status: Pending
Index: git/framework/platform/parser.h
===================================================================
--- git.orig/framework/platform/parser.h
+++ git/framework/platform/parser.h
@@ -18,6 +18,7 @@
#pragma once
#include <cassert>
+#include <cstdint>
#include <string>
#include <typeindex>
#include <vector>

View File

@ -1,24 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://0001-Add-support-for-wayland.patch \
file://0002-Wayland-support-Use-local-context-window-size.patch \
file://0003-wayland-support-for-Hello-triangle-sample.patch \
file://0004-glfw-define-GLFW_INCLUDE_NONE-to-avoid-using-default.patch \
file://0005-glfw-fix-glfw3.h-gl-error.patch \
"
DEPENDS = "extra-cmake-modules"
# Can only pick one of [wayland,xcb]
PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb', d)}"
PACKAGECONFIG[wayland] = "-DVKB_BUILD_WAYLAND=1 -DGLFW_USE_WAYLAND=1, ,wayland wayland-native wayland-protocols libxkbcommon"
PACKAGECONFIG[xcb] = ",,libxcb"
do_install() {
install -d ${D}${bindir}
cp ${B}/app/bin/aarch64/vulkan_samples ${D}${bindir}/
chmod a+x ${D}${bindir}/vulkan_samples
cp -r ${S}/assets ${D}${bindir}/
cp -r ${S}/shaders ${D}${bindir}/
}

View File

@ -0,0 +1,38 @@
SRC_URI:remove = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0"
SRC_URI += " \
gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0;name=main \
git://github.com/glfw/glfw.git;branch=master;protocol=https;name=glfw;destsuffix=git/third_party/glfw"
SRC_URI:remove = "file://32bit.patch"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://Fix-gcc-13.patch"
SRC_URI += "file://0001-The-workload-of-case-16bit_arithmetic-is-heavy-for-8.patch"
SRCREV_FORMAT = "main_glfw"
SRCREV_main = "8b945bebf8b2fd987dcf0eeca048068adf4ea44d"
SRCREV_glfw = "8f470597d625ae28758c16b4293dd42d63e8a83a"
inherit pkgconfig
# Can only pick one of [wayland,xcb]
PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb', d)}"
PACKAGECONFIG[wayland] = " \
-DVKB_WSI_SELECTION=WAYLAND -DGLFW_BUILD_WAYLAND=true -DGLFW_BUILD_X11=false -DGLFW_INCLUDE_VULKAN=true, \
, \
wayland wayland-native wayland-protocols libxkbcommon, \
, \
, \
xcb"
PACKAGECONFIG[xcb] = " \
, \
, \
libxcb, \
, \
, \
wayland"
do_install() {
install -d ${D}${bindir}
cp ${B}/app/bin/aarch64/vulkan_samples ${D}${bindir}/
chmod a+x ${D}${bindir}/vulkan_samples
cp -r ${S}/assets ${D}${bindir}/
cp -r ${S}/shaders ${D}${bindir}/
}

View File

@ -1,36 +0,0 @@
From 1f2837e05ed090ec553a3fc4fccee5618cf26d12 Mon Sep 17 00:00:00 2001
From: Neena Busireddy <neenareddy.busireddy@nxp.com>
Date: Thu, 8 Aug 2019 11:27:01 -0500
Subject: [PATCH] CMakeLists.txt: Change the installation path of JSON files
Also modify the library path in JSON files to /usr/lib/libVK*.so
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
---
layers/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: git/layers/CMakeLists.txt
===================================================================
--- git.orig/layers/CMakeLists.txt
+++ git/layers/CMakeLists.txt
@@ -93,7 +93,7 @@ if(BUILD_LAYERS)
elseif(UNIX) # UNIX includes APPLE
foreach(TARGET_NAME ${TARGET_NAMES})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/staging-json/${TARGET_NAME}.json
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/vulkan/explicit_layer.d)
+ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/vulkan/explicit_layer.d)
endforeach()
endif()
endif()
@@ -270,7 +270,7 @@ if(BUILD_LAYERS)
-DVK_VERSION=1.2.${vk_header_version})
# If this json file is not a metalayer, get the needed properties from that target
if(TARGET ${TARGET_NAME})
- set(INSTALL_DEFINES ${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY="$<TARGET_FILE_NAME:${TARGET_NAME}>")
+ set(INSTALL_DEFINES ${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/$<TARGET_FILE_NAME:${TARGET_NAME}>")
endif()
add_custom_target(${TARGET_NAME}-staging-json ALL
COMMAND ${CMAKE_COMMAND} ${INSTALL_DEFINES} -P "${CMAKE_CURRENT_BINARY_DIR}/generator.cmake")

View File

@ -1,7 +0,0 @@
{
"file_format_version": "1.0.0",
"ICD": {
"library_path": "/usr/lib/libvulkan_VSI.so",
"api_version": "1.1.82"
}
}

View File

@ -1,42 +0,0 @@
SUMMARY = "Vulkan ValidationLayers"
DESCRIPTION = "This project provides Vulkan validation layers that \
can be enabled to assist development by enabling developers to verify \
their applications correct use of the Vulkan API."
HOMEPAGE = "https://www.khronos.org/vulkan/"
BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-ValidationLayers"
SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac"
SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=sdk-1.2.170;protocol=https"
SRCREV = "4fdcd0eebfed3505732720fc6fd98293e847d697"
S = "${WORKDIR}/git"
REQUIRED_DISTRO_FEATURES = "vulkan"
inherit cmake features_check
ANY_OF_DISTRO_FEATURES = "x11 wayland"
DEPENDS = "vulkan-headers glslang spirv-tools spirv-headers"
EXTRA_OECMAKE = " \
-DGLSLANG_INSTALL_DIR=${STAGING_DIR_HOST}/usr \
-DSPIRV_HEADERS_INSTALL_DIR=${STAGING_DIR_HOST}/usr \
-DSPIRV_TOOLS_INSTALL_DIR=${STAGING_DIR_HOST}/usr \
"
# must choose x11 or wayland or both
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr"
PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
# The output library is unversioned
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
RRECOMMENDS:${PN} = "mesa-vulkan-drivers"
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"

View File

@ -1,13 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://icd_VSI.json \
file://0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch \
"
do_install:append () {
install -d ${D}${sysconfdir}/vulkan/icd.d
cp ${WORKDIR}/icd_VSI.json ${D}${sysconfdir}/vulkan/icd.d
sed -i "s,/usr/lib,${libdir}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json
sed -i "s,1.0.30,${PV}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json
}