Fix upload and sampling bug for array textures in the vulkan backend
This commit is contained in:
parent
f5c8953fc7
commit
8c54015b4b
5 changed files with 11 additions and 9 deletions
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "vk_imagetransition.h"
|
||||
|
||||
void VkImageTransition::addImage(VkTextureImage *image, VkImageLayout targetLayout, bool undefinedSrcLayout)
|
||||
void VkImageTransition::addImage(VkTextureImage *image, VkImageLayout targetLayout, bool undefinedSrcLayout, int baseMipLevel, int levelCount)
|
||||
{
|
||||
if (image->Layout == targetLayout)
|
||||
return;
|
||||
|
|
@ -91,7 +91,7 @@ void VkImageTransition::addImage(VkTextureImage *image, VkImageLayout targetLayo
|
|||
I_FatalError("Unimplemented dst image layout transition\n");
|
||||
}
|
||||
|
||||
barrier.addImage(image->Image.get(), undefinedSrcLayout ? VK_IMAGE_LAYOUT_UNDEFINED : image->Layout, targetLayout, srcAccess, dstAccess, aspectMask);
|
||||
barrier.addImage(image->Image.get(), undefinedSrcLayout ? VK_IMAGE_LAYOUT_UNDEFINED : image->Layout, targetLayout, srcAccess, dstAccess, aspectMask, baseMipLevel, levelCount);
|
||||
needbarrier = true;
|
||||
image->Layout = targetLayout;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public:
|
|||
class VkImageTransition
|
||||
{
|
||||
public:
|
||||
void addImage(VkTextureImage *image, VkImageLayout targetLayout, bool undefinedSrcLayout);
|
||||
void addImage(VkTextureImage *image, VkImageLayout targetLayout, bool undefinedSrcLayout, int baseMipLevel = 0, int levelCount = 1);
|
||||
void execute(VulkanCommandBuffer *cmdbuffer);
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue