remove implicit conversion to pointer to fix 32-bit compile (#1488)

* remove implicit conversion to pointer to fix 32-bit compile

* fix formatting
This commit is contained in:
Ben Ashbaugh
2022-10-04 09:02:25 -07:00
committed by GitHub
parent dbd33bc9cf
commit 6659a1b6b8
3 changed files with 10 additions and 9 deletions

View File

@@ -37,7 +37,7 @@ public:
virtual size_t size() const;
virtual const VulkanWrapper &operator[](size_t idx) const;
virtual VulkanWrapper &operator[](size_t idx);
virtual operator const VulkanNative *() const;
virtual const VulkanNative *operator()() const;
};
template <class VulkanKey, class VulkanValue> class VulkanMap {
@@ -340,7 +340,7 @@ VulkanWrapper &VulkanList<VulkanWrapper, VulkanNative>::operator[](size_t idx)
}
template <class VulkanWrapper, class VulkanNative>
VulkanList<VulkanWrapper, VulkanNative>::operator const VulkanNative *() const
const VulkanNative *VulkanList<VulkanWrapper, VulkanNative>::operator()() const
{
return m_nativeList.data();
}

View File

@@ -183,7 +183,7 @@ bool checkVkSupport()
const VulkanInstance &instance = getVulkanInstance();
const VulkanPhysicalDeviceList &physicalDeviceList =
instance.getPhysicalDeviceList();
if (physicalDeviceList == NULL)
if (physicalDeviceList() == NULL)
{
std::cout << "physicalDeviceList is null, No GPUs found with "
"Vulkan support !!!\n";

View File

@@ -626,12 +626,12 @@ void VulkanQueue::submit(const VulkanSemaphoreList &waitSemaphoreList,
vkSubmitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
vkSubmitInfo.pNext = NULL;
vkSubmitInfo.waitSemaphoreCount = (uint32_t)waitSemaphoreList.size();
vkSubmitInfo.pWaitSemaphores = waitSemaphoreList;
vkSubmitInfo.pWaitSemaphores = waitSemaphoreList();
vkSubmitInfo.pWaitDstStageMask = vkPipelineStageFlagsList.data();
vkSubmitInfo.commandBufferCount = (uint32_t)commandBufferList.size();
vkSubmitInfo.pCommandBuffers = commandBufferList;
vkSubmitInfo.pCommandBuffers = commandBufferList();
vkSubmitInfo.signalSemaphoreCount = (uint32_t)signalSemaphoreList.size();
vkSubmitInfo.pSignalSemaphores = signalSemaphoreList;
vkSubmitInfo.pSignalSemaphores = signalSemaphoreList();
vkQueueSubmit(m_vkQueue, 1, &vkSubmitInfo, NULL);
}
@@ -729,7 +729,8 @@ void VulkanDescriptorSetLayout::VulkanDescriptorSetLayoutCommon(
vkDescriptorSetLayoutCreateInfo.flags = 0;
vkDescriptorSetLayoutCreateInfo.bindingCount =
(uint32_t)descriptorSetLayoutBindingList.size();
vkDescriptorSetLayoutCreateInfo.pBindings = descriptorSetLayoutBindingList;
vkDescriptorSetLayoutCreateInfo.pBindings =
descriptorSetLayoutBindingList();
vkCreateDescriptorSetLayout(m_device, &vkDescriptorSetLayoutCreateInfo,
NULL, &m_vkDescriptorSetLayout);
@@ -800,7 +801,7 @@ void VulkanPipelineLayout::VulkanPipelineLayoutCommon(
vkPipelineLayoutCreateInfo.flags = 0;
vkPipelineLayoutCreateInfo.setLayoutCount =
(uint32_t)descriptorSetLayoutList.size();
vkPipelineLayoutCreateInfo.pSetLayouts = descriptorSetLayoutList;
vkPipelineLayoutCreateInfo.pSetLayouts = descriptorSetLayoutList();
vkPipelineLayoutCreateInfo.pushConstantRangeCount = 0;
vkPipelineLayoutCreateInfo.pPushConstantRanges = NULL;
@@ -1573,7 +1574,7 @@ VulkanImage::VulkanImage(
vkImageCreateInfo.queueFamilyIndexCount =
(uint32_t)m_device.getPhysicalDevice().getQueueFamilyList().size();
vkImageCreateInfo.pQueueFamilyIndices =
m_device.getPhysicalDevice().getQueueFamilyList();
m_device.getPhysicalDevice().getQueueFamilyList()();
vkImageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
VkExternalMemoryImageCreateInfo vkExternalMemoryImageCreateInfo = {};