Skip to content

Commit

Permalink
[Vk] fixed build for AndroidSwappy
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenegff committed Dec 6, 2024
1 parent b8798b8 commit 1dc278a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions RenderSystems/Vulkan/src/OgreVulkanDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,10 @@ namespace Ogre
#ifdef OGRE_VULKAN_USE_SWAPPY
// Add any extensions that SwappyVk requires:
uint32_t numSwappyRequiredExtensions = 0u;
SwappyVk_determineDeviceExtensions( mPhysicalDevice, numExtensions, availableExtensions.begin(),
&numSwappyRequiredExtensions, 0 );
SwappyVk_determineDeviceExtensions(
mPhysicalDevice, static_cast<uint32_t>( availableExtensions.size() ),
const_cast<VkExtensionProperties *>( availableExtensions.begin() ), // swappy API flaw
&numSwappyRequiredExtensions, 0 );

struct ExtName
{
Expand All @@ -912,9 +914,10 @@ namespace Ogre
for( ExtName &extName : swappyRequiredExtensionNames )
swappyRequiredExtensionNamesTmp.push_back( extName.name );

SwappyVk_determineDeviceExtensions( mPhysicalDevice, numExtensions, availableExtensions.begin(),
&numSwappyRequiredExtensions,
swappyRequiredExtensionNamesTmp.begin() );
SwappyVk_determineDeviceExtensions(
mPhysicalDevice, static_cast<uint32_t>( availableExtensions.size() ),
const_cast<VkExtensionProperties *>( availableExtensions.begin() ), // swappy API flaw
&numSwappyRequiredExtensions, swappyRequiredExtensionNamesTmp.begin() );

for( const char *swappyReqExtension : swappyRequiredExtensionNamesTmp )
{
Expand Down

0 comments on commit 1dc278a

Please sign in to comment.