Skip to content

Commit

Permalink
rendervulkan: Don't import as implicit sync ever
Browse files Browse the repository at this point in the history
We always poll on the CPU side, we never need to wait on the GPU for images to be ready.
  • Loading branch information
misyltoad committed May 21, 2024
1 parent b3c3ac7 commit 932a7bb
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/rendervulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ Target *pNextFind(const Base *base, VkStructureType sType)
}

#define VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA (VkStructureType)1000001002
#define VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA (VkStructureType)1000001003

struct wsi_image_create_info {
VkStructureType sType;
Expand All @@ -177,11 +176,6 @@ struct wsi_image_create_info {
const uint64_t *modifiers;
};

struct wsi_memory_allocate_info {
VkStructureType sType;
const void *pNext;
bool implicit_sync;
};

// DRM doesn't have 32bit floating point formats, so add our own
#define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F')
Expand Down Expand Up @@ -2064,7 +2058,6 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin
if ( pExistingImageToReuseMemory == nullptr )
{
// Possible pNexts
wsi_memory_allocate_info wsiAllocInfo = {};
VkImportMemoryFdInfoKHR importMemoryInfo = {};
VkExportMemoryAllocateInfo memory_export_info = {};
VkMemoryDedicatedAllocateInfo memory_dedicated_info = {};
Expand Down Expand Up @@ -2102,13 +2095,6 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin
return false;
}

// We're importing WSI buffers from GL or Vulkan, set implicit_sync
wsiAllocInfo = {
.sType = VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA,
.pNext = std::exchange(allocInfo.pNext, &wsiAllocInfo),
.implicit_sync = true,
};

// Memory already provided by pDMA
importMemoryInfo = {
.sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR,
Expand Down

0 comments on commit 932a7bb

Please sign in to comment.