mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Expose a way to increment stat counters
In case the counters come from external sources.
This commit is contained in:
parent
b6121c84aa
commit
52666a33c6
@ -102,7 +102,7 @@ namespace dxvk {
|
|||||||
* \param [in] ctr The counter to increment
|
* \param [in] ctr The counter to increment
|
||||||
* \param [in] val The value to add
|
* \param [in] val The value to add
|
||||||
*/
|
*/
|
||||||
void addStatCtr(DxvkStatCounter ctr, uint32_t val) {
|
void addStatCtr(DxvkStatCounter ctr, uint64_t val) {
|
||||||
m_statCounters.addCtr(ctr, val);
|
m_statCounters.addCtr(ctr, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1068,6 +1068,19 @@ namespace dxvk {
|
|||||||
*/
|
*/
|
||||||
void insertDebugLabel(VkDebugUtilsLabelEXT *label);
|
void insertDebugLabel(VkDebugUtilsLabelEXT *label);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Increments a given stat counter
|
||||||
|
*
|
||||||
|
* The stat counters will be merged into the global
|
||||||
|
* stat counters upon execution of the command list.
|
||||||
|
* \param [in] counter Stat counter to increment
|
||||||
|
* \param [in] value Increment value
|
||||||
|
*/
|
||||||
|
void addStatCtr(DxvkStatCounter counter, uint64_t value) {
|
||||||
|
if (m_cmd != nullptr)
|
||||||
|
m_cmd->addStatCtr(counter, value);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Rc<DxvkDevice> m_device;
|
Rc<DxvkDevice> m_device;
|
||||||
|
@ -456,6 +456,17 @@ namespace dxvk {
|
|||||||
return m_submissionQueue.pendingSubmissions();
|
return m_submissionQueue.pendingSubmissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Increments a given stat counter
|
||||||
|
*
|
||||||
|
* \param [in] counter Stat counter to increment
|
||||||
|
* \param [in] value Increment value
|
||||||
|
*/
|
||||||
|
void addStatCtr(DxvkStatCounter counter, uint64_t value) {
|
||||||
|
std::lock_guard<sync::Spinlock> lock(m_statLock);
|
||||||
|
m_statCounters.addCtr(counter, value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Waits for a given submission
|
* \brief Waits for a given submission
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user