1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[vulkan] Add makeSubresourceLayers helper

This commit is contained in:
Philip Rebohle 2018-11-07 18:30:44 +01:00
parent 3d2e5a7cde
commit 2d8c9c6a26
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -26,6 +26,16 @@ namespace dxvk::vk {
return range;
}
inline VkImageSubresourceLayers makeSubresourceLayers(
const VkImageSubresource& subres) {
VkImageSubresourceLayers layers;
layers.aspectMask = subres.aspectMask;
layers.mipLevel = subres.mipLevel;
layers.baseArrayLayer = subres.arrayLayer;
layers.layerCount = 1;
return layers;
}
inline VkImageSubresourceLayers pickSubresourceLayers(
const VkImageSubresourceRange& range,
uint32_t level) {