Merge pull request #9138 from martymac/VK_NULL_HANDLE-fix

Fix build on FreeBSD i386 - nullptr vs VK_NULL_HANDLE
This commit is contained in:
Jordan Woyak 2020-11-03 08:28:11 -06:00 committed by GitHub
commit d2f80a4595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
{
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))
return nullptr;

View File

@ -54,7 +54,7 @@ public:
VkImageView GetView() const { return m_view; }
VkImageLayout GetLayout() const { return m_layout; }
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>