mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 04:24:11 +01:00
[dxvk] Add convenience method to retrieve image descriptor
This commit is contained in:
parent
fc8f49899a
commit
d7d1db1b8b
@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "dxvk_descriptor.h"
|
||||||
#include "dxvk_format.h"
|
#include "dxvk_format.h"
|
||||||
#include "dxvk_memory.h"
|
#include "dxvk_memory.h"
|
||||||
#include "dxvk_resource.h"
|
#include "dxvk_resource.h"
|
||||||
@ -392,6 +393,21 @@ namespace dxvk {
|
|||||||
return m_image->pickLayout(layout);
|
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:
|
private:
|
||||||
|
|
||||||
Rc<vk::DeviceFn> m_vkd;
|
Rc<vk::DeviceFn> m_vkd;
|
||||||
|
Loading…
Reference in New Issue
Block a user