mirror of https://github.com/PCSX2/pcsx2.git
GS/OGL: Fix possible crash downloading odd texture sizes
This commit is contained in:
parent
cbf91a8d19
commit
9c720efe46
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue