diff --git a/src/dxvk/dxvk_cmdlist.h b/src/dxvk/dxvk_cmdlist.h index f70ad676..720fd685 100644 --- a/src/dxvk/dxvk_cmdlist.h +++ b/src/dxvk/dxvk_cmdlist.h @@ -5,7 +5,7 @@ #include "dxvk_bind_mask.h" #include "dxvk_buffer.h" #include "dxvk_descriptor.h" -#include "dxvk_event_tracker.h" +#include "dxvk_event.h" #include "dxvk_lifetime.h" #include "dxvk_limits.h" #include "dxvk_pipelayout.h" diff --git a/src/dxvk/dxvk_event.cpp b/src/dxvk/dxvk_event.cpp index 068c42e8..8ca0c656 100644 --- a/src/dxvk/dxvk_event.cpp +++ b/src/dxvk/dxvk_event.cpp @@ -52,5 +52,33 @@ namespace dxvk { DxvkEvent::Status DxvkEvent::unpack(uint64_t packed) { return { DxvkEventStatus(packed >> 32), uint32_t(packed) }; } + + + + + DxvkEventTracker::DxvkEventTracker() { + + } + + + DxvkEventTracker::~DxvkEventTracker() { + + } + + + void DxvkEventTracker::trackEvent(const DxvkEventRevision& event) { + m_events.push_back(event); + } + + + void DxvkEventTracker::signalEvents() { + for (const DxvkEventRevision& event : m_events) + event.event->signal(event.revision); + } + + + void DxvkEventTracker::reset() { + m_events.clear(); + } } \ No newline at end of file diff --git a/src/dxvk/dxvk_event.h b/src/dxvk/dxvk_event.h index 3a752543..cef2190a 100644 --- a/src/dxvk/dxvk_event.h +++ b/src/dxvk/dxvk_event.h @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include "dxvk_include.h" @@ -69,7 +70,8 @@ namespace dxvk { static Status unpack(uint64_t packed); }; - + + /** * \brief Event revision * @@ -80,5 +82,44 @@ namespace dxvk { Rc event; uint32_t revision; }; + + + /** + * \brief Event tracker + */ + class DxvkEventTracker { + + public: + + DxvkEventTracker(); + ~DxvkEventTracker(); + + /** + * \brief Adds an event to track + * \param [in] event The event revision + */ + void trackEvent(const DxvkEventRevision& event); + + /** + * \brief Signals tracked events + * + * Retrieves query data from the query pools + * and writes it back to the query objects. + */ + void signalEvents(); + + /** + * \brief Resets event tracker + * + * Releases all events from the tracker. + * Call this after signaling the events. + */ + void reset(); + + private: + + std::vector m_events; + + }; } \ No newline at end of file diff --git a/src/dxvk/dxvk_event_tracker.cpp b/src/dxvk/dxvk_event_tracker.cpp deleted file mode 100644 index 09eb6840..00000000 --- a/src/dxvk/dxvk_event_tracker.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "dxvk_event_tracker.h" - -namespace dxvk { - - DxvkEventTracker::DxvkEventTracker() { - - } - - - DxvkEventTracker::~DxvkEventTracker() { - - } - - - void DxvkEventTracker::trackEvent(const DxvkEventRevision& event) { - m_events.push_back(event); - } - - - void DxvkEventTracker::signalEvents() { - for (const DxvkEventRevision& event : m_events) - event.event->signal(event.revision); - } - - - void DxvkEventTracker::reset() { - m_events.clear(); - } - -} \ No newline at end of file diff --git a/src/dxvk/dxvk_event_tracker.h b/src/dxvk/dxvk_event_tracker.h deleted file mode 100644 index 20e998db..00000000 --- a/src/dxvk/dxvk_event_tracker.h +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once - -#include - -#include "dxvk_event.h" - -namespace dxvk { - - /** - * \brief Event tracker - */ - class DxvkEventTracker { - - public: - - DxvkEventTracker(); - ~DxvkEventTracker(); - - /** - * \brief Adds an event to track - * \param [in] event The event revision - */ - void trackEvent(const DxvkEventRevision& event); - - /** - * \brief Signals tracked events - * - * Retrieves query data from the query pools - * and writes it back to the query objects. - */ - void signalEvents(); - - /** - * \brief Resets event tracker - * - * Releases all events from the tracker. - * Call this after signaling the events. - */ - void reset(); - - private: - - std::vector m_events; - - }; - -} \ No newline at end of file diff --git a/src/dxvk/meson.build b/src/dxvk/meson.build index 4b221396..a267b8f7 100644 --- a/src/dxvk/meson.build +++ b/src/dxvk/meson.build @@ -54,7 +54,6 @@ dxvk_src = files([ 'dxvk_device_filter.cpp', 'dxvk_extensions.cpp', 'dxvk_event.cpp', - 'dxvk_event_tracker.cpp', 'dxvk_format.cpp', 'dxvk_framebuffer.cpp', 'dxvk_graphics.cpp',