- Backend update from GZDoom - mainly for GLES2 support.

This commit is contained in:
Christoph Oelckers 2021-09-18 12:20:28 +02:00
parent 11aea1c5d4
commit a3d9cd9a68
66 changed files with 9558 additions and 126 deletions

View file

@ -203,9 +203,14 @@ void VkHardwareTexture::CreateTexture(int w, int h, int pixelsize, VkFormat form
region.imageExtent.height = h;
cmdbuffer->copyBufferToImage(stagingBuffer->buffer, mImage.Image->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &region);
fb->FrameDeleteList.Buffers.push_back(std::move(stagingBuffer));
fb->FrameTextureUpload.Buffers.push_back(std::move(stagingBuffer));
if (mipmap) mImage.GenerateMipmaps(cmdbuffer);
// If we queued more than 64 MB of data already: wait until the uploads finish before continuing
fb->FrameTextureUpload.TotalSize += totalSize;
if (fb->FrameTextureUpload.TotalSize > 64 * 1024 * 1024)
fb->WaitForCommands(false, true);
}
int VkHardwareTexture::GetMipLevels(int w, int h)