Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Createimage failed on android using Vulkan #1041

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kannan-xiao4
Copy link
Contributor

Fix #1035

When using Android's Vulkan, an error occurred in the vkBindImageMemory method.
This was caused by a mismatch between the created VkImage and the allocated memory.
It seems that necessary information was missing when allocating, so it was added.

reference: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindBufferMemory.html#VUID-vkBindBufferMemory-memory-01508

@karasusan
Copy link
Collaborator

Compiling native code for Linux is failed.

/home/bokken/build/output/Unity-Technologies/com.unity.webrtc/Plugin~/WebRTCPlugin/GraphicsDevice/Vulkan/VulkanUtility.cpp:103:39: error: unused variable 'dedicatedAllocateInfo' [-Werror,-Wunused-variable]
        VkMemoryDedicatedAllocateInfo dedicatedAllocateInfo = {};
                                      ^
1 error generated.

@@ -99,17 +99,27 @@ namespace webrtc
instance.physicalDevice, memRequirements.memoryTypeBits, properties, &allocInfo.memoryTypeIndex);
RTC_CHECK(success);

VkExportMemoryAllocateInfoKHR exportInfo = {};
VkExportMemoryAllocateInfo exportInfo = {};
VkMemoryDedicatedAllocateInfo dedicatedAllocateInfo = {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux build is failed.

/home/bokken/build/output/Unity-Technologies/com.unity.webrtc/Plugin~/WebRTCPlugin/GraphicsDevice/Vulkan/VulkanUtility.cpp:103:39: error: unused variable 'dedicatedAllocateInfo' [-Werror,-Wunused-variable]
        VkMemoryDedicatedAllocateInfo dedicatedAllocateInfo = {};
                                      ^
1 error generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: android build with auto graphics api
2 participants