mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
mesa: don't call ctx->Driver.ReadPixels() if width or height is zero
This commit is contained in:
parent
f6a3f1f52a
commit
7b9bf39543
1 changed files with 3 additions and 0 deletions
|
|
@ -170,6 +170,9 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
|
|||
return;
|
||||
}
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return; /* nothing to do */
|
||||
|
||||
if (ctx->Pack.BufferObj->Name) {
|
||||
if (!_mesa_validate_pbo_access(2, &ctx->Pack, width, height, 1,
|
||||
format, type, pixels)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue