Fix infinite GEVulkanTexture::waitImageView if createImageView failed
This commit is contained in:
parent
38b995bf61
commit
4ceec85edc
@ -444,7 +444,11 @@ bool GEVulkanTexture::createImageView(VkImageAspectFlags aspect_flags)
|
|||||||
m_ondemand_loading.store(false);
|
m_ondemand_loading.store(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
else
|
||||||
|
{
|
||||||
|
m_ondemand_loading.store(false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} // createImageView
|
} // createImageView
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -514,7 +518,10 @@ void GEVulkanTexture::reloadInternal()
|
|||||||
void GEVulkanTexture::upload(uint8_t* data, bool generate_hq_mipmap)
|
void GEVulkanTexture::upload(uint8_t* data, bool generate_hq_mipmap)
|
||||||
{
|
{
|
||||||
if (!createTextureImage(data, generate_hq_mipmap))
|
if (!createTextureImage(data, generate_hq_mipmap))
|
||||||
|
{
|
||||||
|
m_ondemand_loading.store(false);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (!createImageView(VK_IMAGE_ASPECT_COLOR_BIT))
|
if (!createImageView(VK_IMAGE_ASPECT_COLOR_BIT))
|
||||||
return;
|
return;
|
||||||
m_texture_size = m_size.Width * m_size.Height * (isSingleChannel() ? 1 : 4);
|
m_texture_size = m_size.Width * m_size.Height * (isSingleChannel() ? 1 : 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user