Commit c8a92b4e authored by Libretro-Admin's avatar Libretro-Admin
Browse files
parent 4c0fab98
......@@ -254,7 +254,13 @@ void Texture::SetImage(u32 srcSize, void *srcData, bool isNew, bool genMipmaps)
void* data;
if (needsStaging)
{
if (!stagingBufferData)
// This can happen if a texture is first created for RTT, then later updated
stagingBufferData = std::unique_ptr<BufferData>(new BufferData(srcSize, vk::BufferUsageFlagBits::eTransferSrc));
data = stagingBufferData->MapMemory();
}
else
data = allocation.MapMemory();
verify(data != nullptr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment