GS/OGL: Fix possible crash downloading odd texture sizes

This commit is contained in:
Stenzek 2023-02-11 14:49:34 +10:00 committed by refractionpcsx2
parent cbf91a8d19
commit 9c720efe46
1 changed files with 1 additions and 1 deletions

View File

@ -453,7 +453,7 @@ GSDownloadTextureOGL::~GSDownloadTextureOGL()
std::unique_ptr<GSDownloadTextureOGL> GSDownloadTextureOGL::Create(u32 width, u32 height, GSTexture::Format format) std::unique_ptr<GSDownloadTextureOGL> GSDownloadTextureOGL::Create(u32 width, u32 height, GSTexture::Format format)
{ {
const u32 buffer_size = GetBufferSize(width, height, format, GSTexture::GetCompressedBytesPerBlock(format)); const u32 buffer_size = GetBufferSize(width, height, format, TEXTURE_UPLOAD_PITCH_ALIGNMENT);
const bool use_buffer_storage = (GLAD_GL_VERSION_4_4 || GLAD_GL_ARB_buffer_storage || GLAD_GL_EXT_buffer_storage) && const bool use_buffer_storage = (GLAD_GL_VERSION_4_4 || GLAD_GL_ARB_buffer_storage || GLAD_GL_EXT_buffer_storage) &&
!GLLoader::disable_download_pbo; !GLLoader::disable_download_pbo;