MythTV  master
mythwindowvulkan.cpp
Go to the documentation of this file.
1 // MythTV
5 
6 #define LOC QString("VulkanWindow: ")
7 
9  : m_render(Render)
10 {
11  // Most drivers/devices only seem to support these formats. Prefer UNORM.
12  QVector<VkFormat> formats = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_SRGB };
13  setPreferredColorFormats(formats);
14  setFlags(QVulkanWindow::PersistentResources);
15 
16  // Enable dubug markers as appropriate
17  // Note: These will only work when run *from* a debugger (e.g. renderdoc)
18  if (VERBOSE_LEVEL_CHECK(VB_GPU, LOG_INFO))
19  setDeviceExtensions(QByteArrayList() << VK_EXT_DEBUG_MARKER_EXTENSION_NAME);
20 }
21 
23 
24 QVulkanWindowRenderer* MythWindowVulkan::createRenderer(void)
25 {
26  return m_render;
27 }
28 
36 {
37  if (Event->type() == QEvent::UpdateRequest)
38  {
40  {
41  // Log these for now - they may be important (e.g. QVulkanWindow::grab)
42  LOG(VB_GENERAL, LOG_INFO, LOC + "Ignoring spontaneous update request");
43  return QWindow::event(Event); // NOLINT(bugprone-parent-virtual-call)
44  }
45  }
46  return QVulkanWindow::event(Event);
47 }
MythWindowVulkan::~MythWindowVulkan
~MythWindowVulkan() override
mythwindowvulkan.h
MythWindowVulkan::MythWindowVulkan
MythWindowVulkan(MythRenderVulkan *Render)
Definition: mythwindowvulkan.cpp:8
VERBOSE_LEVEL_CHECK
static bool VERBOSE_LEVEL_CHECK(uint64_t mask, LogLevel_t level)
Definition: mythlogging.h:29
MythWindowVulkan::event
bool event(QEvent *Event) override
Override QVulkanWindow::event method.
Definition: mythwindowvulkan.cpp:35
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythRenderVulkan::GetFrameExpected
bool GetFrameExpected(void) const
Definition: mythrendervulkan.cpp:305
mythlogging.h
Event
Event details.
Definition: zmdefines.h:27
formats
const std::array< const std::string, 8 > formats
Definition: vbilut.cpp:189
MythWindowVulkan::m_render
MythRenderVulkan * m_render
Definition: mythwindowvulkan.h:21
MythWindowVulkan::createRenderer
QVulkanWindowRenderer * createRenderer(void) override
Definition: mythwindowvulkan.cpp:24
MythRenderVulkan
Definition: mythrendervulkan.h:57
mythrendervulkan.h
LOC
#define LOC
Definition: mythwindowvulkan.cpp:6