Skip to content

how to disable VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT in gfxstream? #106

@Kkaiwz

Description

@Kkaiwz

I try to use virtio-gpu rutabaga with Mali-G310 and meet the unsupported issue: G310 only support VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT for vkbuffer, vkImage doesn't support this bit. So i cannot run virtio-gpu rutabaga successfully.
So i want to know if this external memory bit is necessary? If there any way to disable it?

/*code1: these code result in info->supported be set to false due to extInfo->pNext == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT */
VkResult res = sVkEmulation->getImageFormatProperties2Func(physdev, &formatInfo2, &outProps2);

if (res != VK_SUCCESS) {
    if (res == VK_ERROR_FORMAT_NOT_SUPPORTED) {
        if (isTargetFormat) {printf("Ryan: info->supported = false | 3\n");}
        info->supported = false;

/code2: these code result in setupVkColorBufferLocked failed/
static bool isFormatVulkanCompatible(GLenum internalFormat) {
VkFormat vkFormat = glFormat2VkFormat(internalFormat);

for (const auto& supportInfo : sVkEmulation->imageSupportInfo) {
    if (supportInfo.format == vkFormat && supportInfo.supported) {
        return true;
    }
}

return false;

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions