Skip to content

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.

@karasusan
Copy link
Collaborator

I'm going to take over this issue.

@karasusan
Copy link
Collaborator

I checked the issue and fixed it in #1092

@karasusan
Copy link
Collaborator

The PR #1092 for this issue has been merged.
Closed.

@karasusan karasusan closed this Aug 19, 2025
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