mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[dxvk] Create GPU event pool and forward it to the context
This commit is contained in:
parent
4da89ccc48
commit
6b9653d261
@ -9,6 +9,7 @@ namespace dxvk {
|
||||
DxvkContext::DxvkContext(
|
||||
const Rc<DxvkDevice>& device,
|
||||
const Rc<DxvkPipelineManager>& pipelineManager,
|
||||
const Rc<DxvkGpuEventPool>& gpuEventPool,
|
||||
const Rc<DxvkMetaClearObjects>& metaClearObjects,
|
||||
const Rc<DxvkMetaCopyObjects>& metaCopyObjects,
|
||||
const Rc<DxvkMetaMipGenObjects>& metaMipGenObjects,
|
||||
@ -16,6 +17,7 @@ namespace dxvk {
|
||||
const Rc<DxvkMetaResolveObjects>& metaResolveObjects)
|
||||
: m_device (device),
|
||||
m_pipeMgr (pipelineManager),
|
||||
m_gpuEvents (gpuEventPool),
|
||||
m_metaClear (metaClearObjects),
|
||||
m_metaCopy (metaCopyObjects),
|
||||
m_metaMipGen (metaMipGenObjects),
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "dxvk_context_state.h"
|
||||
#include "dxvk_data.h"
|
||||
#include "dxvk_event.h"
|
||||
#include "dxvk_gpu_event.h"
|
||||
#include "dxvk_meta_clear.h"
|
||||
#include "dxvk_meta_copy.h"
|
||||
#include "dxvk_meta_mipgen.h"
|
||||
@ -34,6 +35,7 @@ namespace dxvk {
|
||||
DxvkContext(
|
||||
const Rc<DxvkDevice>& device,
|
||||
const Rc<DxvkPipelineManager>& pipelineManager,
|
||||
const Rc<DxvkGpuEventPool>& gpuEventPool,
|
||||
const Rc<DxvkMetaClearObjects>& metaClearObjects,
|
||||
const Rc<DxvkMetaCopyObjects>& metaCopyObjects,
|
||||
const Rc<DxvkMetaMipGenObjects>& metaMipGenObjects,
|
||||
@ -782,6 +784,7 @@ namespace dxvk {
|
||||
|
||||
const Rc<DxvkDevice> m_device;
|
||||
const Rc<DxvkPipelineManager> m_pipeMgr;
|
||||
const Rc<DxvkGpuEventPool> m_gpuEvents;
|
||||
const Rc<DxvkMetaClearObjects> m_metaClear;
|
||||
const Rc<DxvkMetaCopyObjects> m_metaCopy;
|
||||
const Rc<DxvkMetaMipGenObjects> m_metaMipGen;
|
||||
|
@ -19,6 +19,7 @@ namespace dxvk {
|
||||
m_memory (new DxvkMemoryAllocator (this)),
|
||||
m_renderPassPool (new DxvkRenderPassPool (vkd)),
|
||||
m_pipelineManager (new DxvkPipelineManager (this, m_renderPassPool.ptr())),
|
||||
m_gpuEventPool (new DxvkGpuEventPool (vkd)),
|
||||
m_metaClearObjects (new DxvkMetaClearObjects (vkd)),
|
||||
m_metaCopyObjects (new DxvkMetaCopyObjects (vkd)),
|
||||
m_metaMipGenObjects (new DxvkMetaMipGenObjects (vkd)),
|
||||
@ -140,12 +141,18 @@ namespace dxvk {
|
||||
Rc<DxvkContext> DxvkDevice::createContext() {
|
||||
return new DxvkContext(this,
|
||||
m_pipelineManager,
|
||||
m_gpuEventPool,
|
||||
m_metaClearObjects,
|
||||
m_metaCopyObjects,
|
||||
m_metaMipGenObjects,
|
||||
m_metaPackObjects,
|
||||
m_metaResolveObjects);
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkGpuEvent> DxvkDevice::createGpuEvent() {
|
||||
return new DxvkGpuEvent(m_vkd);
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkFramebuffer> DxvkDevice::createFramebuffer(
|
||||
|
@ -201,6 +201,12 @@ namespace dxvk {
|
||||
* \returns The context object
|
||||
*/
|
||||
Rc<DxvkContext> createContext();
|
||||
|
||||
/**
|
||||
* \brief Creates a GPU event
|
||||
* \returns New GPU event
|
||||
*/
|
||||
Rc<DxvkGpuEvent> createGpuEvent();
|
||||
|
||||
/**
|
||||
* \brief Creates framebuffer for a set of render targets
|
||||
@ -398,6 +404,8 @@ namespace dxvk {
|
||||
Rc<DxvkRenderPassPool> m_renderPassPool;
|
||||
Rc<DxvkPipelineManager> m_pipelineManager;
|
||||
|
||||
Rc<DxvkGpuEventPool> m_gpuEventPool;
|
||||
|
||||
Rc<DxvkMetaClearObjects> m_metaClearObjects;
|
||||
Rc<DxvkMetaCopyObjects> m_metaCopyObjects;
|
||||
Rc<DxvkMetaMipGenObjects> m_metaMipGenObjects;
|
||||
|
Loading…
Reference in New Issue
Block a user