1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +01:00

[dxvk] Add convenience method to retrieve image descriptor

This commit is contained in:
Philip Rebohle 2018-11-08 18:05:16 +01:00
parent fc8f49899a
commit d7d1db1b8b
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -1,5 +1,6 @@
#pragma once
#include "dxvk_descriptor.h"
#include "dxvk_format.h"
#include "dxvk_memory.h"
#include "dxvk_resource.h"
@ -392,6 +393,21 @@ namespace dxvk {
return m_image->pickLayout(layout);
}
/**
* \brief Retrieves descriptor info
*
* \param [in] type Exact view type
* \param [in] layout Image layout
* \returns Image descriptor
*/
DxvkDescriptorInfo getDescriptor(VkImageViewType type, VkImageLayout layout) const {
DxvkDescriptorInfo result;
result.image.sampler = VK_NULL_HANDLE;
result.image.imageView = handle(type);
result.image.imageLayout = layout;
return result;
}
private:
Rc<vk::DeviceFn> m_vkd;