From 40028a5b8c8d407359319d7b75468128bceffed4 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 30 Jul 2019 19:05:40 +0200 Subject: [PATCH] [dxvk] Pass DxvkDevice to DxvkMetaClearObjects constructor --- src/dxvk/dxvk_device.cpp | 2 +- src/dxvk/dxvk_meta_clear.cpp | 5 +++-- src/dxvk/dxvk_meta_clear.h | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index 47b77048..87018b72 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -22,7 +22,7 @@ namespace dxvk { m_pipelineManager (new DxvkPipelineManager (this, m_renderPassPool.ptr())), m_gpuEventPool (new DxvkGpuEventPool (vkd)), m_gpuQueryPool (new DxvkGpuQueryPool (this)), - m_metaClearObjects (new DxvkMetaClearObjects (vkd)), + m_metaClearObjects (new DxvkMetaClearObjects (this)), m_metaCopyObjects (new DxvkMetaCopyObjects (this)), m_metaResolveObjects(new DxvkMetaResolveObjects (this)), m_metaMipGenObjects (new DxvkMetaMipGenObjects (this)), diff --git a/src/dxvk/dxvk_meta_clear.cpp b/src/dxvk/dxvk_meta_clear.cpp index 9f16e549..d5b3381d 100644 --- a/src/dxvk/dxvk_meta_clear.cpp +++ b/src/dxvk/dxvk_meta_clear.cpp @@ -1,4 +1,5 @@ #include "dxvk_meta_clear.h" +#include "dxvk_device.h" #include #include @@ -15,8 +16,8 @@ namespace dxvk { - DxvkMetaClearObjects::DxvkMetaClearObjects(const Rc& vkd) - : m_vkd(vkd) { + DxvkMetaClearObjects::DxvkMetaClearObjects(const DxvkDevice* device) + : m_vkd(device->vkd()) { // Create descriptor set layouts m_clearBufDsetLayout = createDescriptorSetLayout(VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER); m_clearImgDsetLayout = createDescriptorSetLayout(VK_DESCRIPTOR_TYPE_STORAGE_IMAGE); diff --git a/src/dxvk/dxvk_meta_clear.h b/src/dxvk/dxvk_meta_clear.h index da044f40..3f869e76 100644 --- a/src/dxvk/dxvk_meta_clear.h +++ b/src/dxvk/dxvk_meta_clear.h @@ -6,6 +6,8 @@ #include "../spirv/spirv_code_buffer.h" namespace dxvk { + + class DxvkDevice; /** * \brief Clear args @@ -46,7 +48,7 @@ namespace dxvk { public: - DxvkMetaClearObjects(const Rc& vkd); + DxvkMetaClearObjects(const DxvkDevice* device); ~DxvkMetaClearObjects(); /**