rendervulkan: Add color attachment flag to textures
This commit is contained in:
parent
adee493d8b
commit
d038f8aadc
2 changed files with 8 additions and 1 deletions
|
@ -1690,6 +1690,11 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin
|
|||
usage |= VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
}
|
||||
|
||||
if ( flags.bColorAttachment == true )
|
||||
{
|
||||
usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
}
|
||||
|
||||
if ( flags.bFlippable == true )
|
||||
{
|
||||
flags.bExportable = true;
|
||||
|
@ -2136,7 +2141,7 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin
|
|||
assert ( flags.bStorage == false );
|
||||
}
|
||||
|
||||
if ( flags.bStorage || flags.bSampled )
|
||||
if ( flags.bStorage || flags.bSampled || flags.bColorAttachment )
|
||||
{
|
||||
VkImageViewCreateInfo createInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
|
||||
|
|
|
@ -137,6 +137,7 @@ public:
|
|||
bLinear = false;
|
||||
bExportable = false;
|
||||
bSwapchain = false;
|
||||
bColorAttachment = false;
|
||||
imageType = VK_IMAGE_TYPE_2D;
|
||||
}
|
||||
|
||||
|
@ -149,6 +150,7 @@ public:
|
|||
bool bLinear : 1;
|
||||
bool bExportable : 1;
|
||||
bool bSwapchain : 1;
|
||||
bool bColorAttachment : 1;
|
||||
VkImageType imageType;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue