mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Create new query pool and forward it to the context
This commit is contained in:
parent
772fa3074f
commit
a8144370c8
@ -10,6 +10,7 @@ namespace dxvk {
|
||||
const Rc<DxvkDevice>& device,
|
||||
const Rc<DxvkPipelineManager>& pipelineManager,
|
||||
const Rc<DxvkGpuEventPool>& gpuEventPool,
|
||||
const Rc<DxvkGpuQueryPool>& gpuQueryPool,
|
||||
const Rc<DxvkMetaClearObjects>& metaClearObjects,
|
||||
const Rc<DxvkMetaCopyObjects>& metaCopyObjects,
|
||||
const Rc<DxvkMetaMipGenObjects>& metaMipGenObjects,
|
||||
@ -23,7 +24,10 @@ namespace dxvk {
|
||||
m_metaMipGen (metaMipGenObjects),
|
||||
m_metaPack (metaPackObjects),
|
||||
m_metaResolve (metaResolveObjects),
|
||||
m_queries (device->vkd()) { }
|
||||
m_queries (device->vkd()),
|
||||
m_queryManager(gpuQueryPool) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
DxvkContext::~DxvkContext() {
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "dxvk_data.h"
|
||||
#include "dxvk_event.h"
|
||||
#include "dxvk_gpu_event.h"
|
||||
#include "dxvk_gpu_query.h"
|
||||
#include "dxvk_meta_clear.h"
|
||||
#include "dxvk_meta_copy.h"
|
||||
#include "dxvk_meta_mipgen.h"
|
||||
@ -36,6 +37,7 @@ namespace dxvk {
|
||||
const Rc<DxvkDevice>& device,
|
||||
const Rc<DxvkPipelineManager>& pipelineManager,
|
||||
const Rc<DxvkGpuEventPool>& gpuEventPool,
|
||||
const Rc<DxvkGpuQueryPool>& gpuQueryPool,
|
||||
const Rc<DxvkMetaClearObjects>& metaClearObjects,
|
||||
const Rc<DxvkMetaCopyObjects>& metaCopyObjects,
|
||||
const Rc<DxvkMetaMipGenObjects>& metaMipGenObjects,
|
||||
@ -809,6 +811,7 @@ namespace dxvk {
|
||||
DxvkBarrierControlFlags m_barrierControl;
|
||||
|
||||
DxvkQueryManager m_queries;
|
||||
DxvkGpuQueryManager m_queryManager;
|
||||
|
||||
VkPipeline m_gpActivePipeline = VK_NULL_HANDLE;
|
||||
VkPipeline m_cpActivePipeline = VK_NULL_HANDLE;
|
||||
|
@ -20,6 +20,7 @@ namespace dxvk {
|
||||
m_renderPassPool (new DxvkRenderPassPool (vkd)),
|
||||
m_pipelineManager (new DxvkPipelineManager (this, m_renderPassPool.ptr())),
|
||||
m_gpuEventPool (new DxvkGpuEventPool (vkd)),
|
||||
m_gpuQueryPool (new DxvkGpuQueryPool (vkd)),
|
||||
m_metaClearObjects (new DxvkMetaClearObjects (vkd)),
|
||||
m_metaCopyObjects (new DxvkMetaCopyObjects (vkd)),
|
||||
m_metaMipGenObjects (new DxvkMetaMipGenObjects (vkd)),
|
||||
@ -142,6 +143,7 @@ namespace dxvk {
|
||||
return new DxvkContext(this,
|
||||
m_pipelineManager,
|
||||
m_gpuEventPool,
|
||||
m_gpuQueryPool,
|
||||
m_metaClearObjects,
|
||||
m_metaCopyObjects,
|
||||
m_metaMipGenObjects,
|
||||
@ -155,6 +157,14 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkGpuQuery> DxvkDevice::createGpuQuery(
|
||||
VkQueryType type,
|
||||
VkQueryControlFlags flags,
|
||||
uint32_t index) {
|
||||
return new DxvkGpuQuery(m_vkd, type, flags, index);
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkFramebuffer> DxvkDevice::createFramebuffer(
|
||||
const DxvkRenderTargets& renderTargets) {
|
||||
const DxvkFramebufferSize defaultSize = {
|
||||
|
@ -208,6 +208,19 @@ namespace dxvk {
|
||||
*/
|
||||
Rc<DxvkGpuEvent> createGpuEvent();
|
||||
|
||||
/**
|
||||
* \brief Creates a query
|
||||
*
|
||||
* \param [in] type Query type
|
||||
* \param [in] flags Query flags
|
||||
* \param [in] index Query index
|
||||
* \returns New query
|
||||
*/
|
||||
Rc<DxvkGpuQuery> createGpuQuery(
|
||||
VkQueryType type,
|
||||
VkQueryControlFlags flags,
|
||||
uint32_t index);
|
||||
|
||||
/**
|
||||
* \brief Creates framebuffer for a set of render targets
|
||||
*
|
||||
@ -405,6 +418,7 @@ namespace dxvk {
|
||||
Rc<DxvkPipelineManager> m_pipelineManager;
|
||||
|
||||
Rc<DxvkGpuEventPool> m_gpuEventPool;
|
||||
Rc<DxvkGpuQueryPool> m_gpuQueryPool;
|
||||
|
||||
Rc<DxvkMetaClearObjects> m_metaClearObjects;
|
||||
Rc<DxvkMetaCopyObjects> m_metaCopyObjects;
|
||||
|
Loading…
x
Reference in New Issue
Block a user