- Change VKHardwareTexture::CreateTexture to allow a null buffer to be passed. This is used by the software renderer to create an arbitrary texture for screen rendering.

This commit is contained in:
Rachael Alexanderson 2021-04-25 02:06:40 -04:00
parent bfb83abbc2
commit a2d3dbf74e

View file

@ -270,6 +270,8 @@ uint8_t *VkHardwareTexture::MapBuffer()
unsigned int VkHardwareTexture::CreateTexture(unsigned char * buffer, int w, int h, int texunit, bool mipmap, const char *name)
{
// CreateTexture is used by the software renderer to create a screen output but without any screen data.
if (buffer)
CreateTexture(w, h, mTexelsize, mTexelsize == 4 ? VK_FORMAT_B8G8R8A8_UNORM : VK_FORMAT_R8_UNORM, buffer, mipmap);
return 0;
}