Skip to content

Commit

Permalink
rendervulkan: Add VkExternalMemoryImageCreateInfo for any flippable s…
Browse files Browse the repository at this point in the history
…urface

Fixes some corruption on NVIDIA
  • Loading branch information
misyltoad committed Jan 20, 2024
1 parent 308a063 commit 868206c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rendervulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1965,6 +1965,12 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin
.pDrmFormatModifiers = modifiers.data(),
};

externalImageCreateInfo = {
.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
.pNext = std::exchange(imageInfo.pNext, &externalImageCreateInfo),
.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT,
};

imageInfo.tiling = tiling = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT;
}

Expand Down

0 comments on commit 868206c

Please sign in to comment.