Resolve VkDeviceMemory/nullptr type mismatch to fix build on FreeBSD i386

This commit is contained in:
Ganael Laplanche 2020-10-07 21:25:29 +02:00
parent 0029ca84b0
commit d456e2e391
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ std::unique_ptr<VKTexture> VKTexture::CreateAdopted(const TextureConfig& tex_con
VkImageViewType view_type, VkImageLayout layout) VkImageViewType view_type, VkImageLayout layout)
{ {
std::unique_ptr<VKTexture> texture = std::make_unique<VKTexture>( std::unique_ptr<VKTexture> texture = std::make_unique<VKTexture>(
tex_config, nullptr, image, layout, ComputeImageLayout::Undefined); tex_config, VkDeviceMemory(VK_NULL_HANDLE), image, layout, ComputeImageLayout::Undefined);
if (!texture->CreateView(view_type)) if (!texture->CreateView(view_type))
return nullptr; return nullptr;

View File

@ -54,7 +54,7 @@ public:
VkImageView GetView() const { return m_view; } VkImageView GetView() const { return m_view; }
VkImageLayout GetLayout() const { return m_layout; } VkImageLayout GetLayout() const { return m_layout; }
VkFormat GetVkFormat() const { return GetVkFormatForHostTextureFormat(m_config.format); } VkFormat GetVkFormat() const { return GetVkFormatForHostTextureFormat(m_config.format); }
bool IsAdopted() const { return m_device_memory != nullptr; } bool IsAdopted() const { return m_device_memory != VkDeviceMemory(VK_NULL_HANDLE); }
static std::unique_ptr<VKTexture> Create(const TextureConfig& tex_config); static std::unique_ptr<VKTexture> Create(const TextureConfig& tex_config);
static std::unique_ptr<VKTexture> static std::unique_ptr<VKTexture>