Skip to content

Commit

Permalink
Merge pull request #2703 from Lucchetto/vk-image-segv-fix
Browse files Browse the repository at this point in the history
VulkanImage: fix VkImageSubresourceRange initialization
  • Loading branch information
jxt1234 committed Feb 20, 2024
2 parents 784017d + 4858513 commit 0c6073d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/backend/vulkan/component/VulkanImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ VulkanImage::~VulkanImage() {
}
void VulkanImage::barrierWrite(VkCommandBuffer buffer) const {
VkImageSubresourceRange subrange;
::memset(&subrange, 0, sizeof(VkImageSubresourceRange));
subrange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
subrange.layerCount = 1;
subrange.levelCount = 1;
Expand All @@ -82,6 +83,7 @@ void VulkanImage::barrierRead(VkCommandBuffer buffer) const {
return;
}
VkImageSubresourceRange subrange;
::memset(&subrange, 0, sizeof(VkImageSubresourceRange));
subrange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
subrange.layerCount = 1;
subrange.levelCount = 1;
Expand Down

0 comments on commit 0c6073d

Please sign in to comment.