mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-02-25 03:43:58 +11:00
wayland/screencopy: support dmabufs in vulkan mode
This commit is contained in:
parent
158db16b93
commit
a99519c3ad
8 changed files with 375 additions and 2 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include <qqmlengine.h>
|
||||
#include <qqmlinfo.h>
|
||||
#include <qqmllist.h>
|
||||
#include <qquickgraphicsconfiguration.h>
|
||||
#include <qquickitem.h>
|
||||
#include <qquickwindow.h>
|
||||
#include <qregion.h>
|
||||
|
|
@ -147,6 +148,15 @@ void ProxyWindowBase::ensureQWindow() {
|
|||
this->window = nullptr; // createQQuickWindow may indirectly reference this->window
|
||||
this->window = this->createQQuickWindow();
|
||||
this->window->setFormat(format);
|
||||
|
||||
// needed for vulkan dmabuf import, qt ignores these if not applicable
|
||||
auto graphicsConfig = this->window->graphicsConfiguration();
|
||||
graphicsConfig.setDeviceExtensions({
|
||||
"VK_KHR_external_memory_fd",
|
||||
"VK_EXT_external_memory_dma_buf",
|
||||
"VK_EXT_image_drm_format_modifier",
|
||||
});
|
||||
this->window->setGraphicsConfiguration(graphicsConfig);
|
||||
}
|
||||
|
||||
void ProxyWindowBase::createWindow() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue