- fix vulkan crash when changing resolution when using the software renderer

This commit is contained in:
Magnus Norddahl 2019-05-02 00:30:54 +02:00
parent 32aa69f4d8
commit ea9be6c225

View file

@ -323,6 +323,11 @@ int VkHardwareTexture::GetMipLevels(int w, int h)
void VkHardwareTexture::AllocateBuffer(int w, int h, int texelsize)
{
if (mImage && (mImage->width != w || mImage->height != h || mTexelsize != texelsize))
{
Reset();
}
if (!mImage)
{
auto fb = GetVulkanFrameBuffer();