projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6a3f1f
)
mesa: don't call ctx->Driver.ReadPixels() if width or height is zero
author
Brian Paul
<brianp@vmware.com>
Thu, 2 Apr 2009 19:05:55 +0000
(13:05 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 2 Apr 2009 19:05:55 +0000
(13:05 -0600)
src/mesa/main/readpix.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/readpix.c
b/src/mesa/main/readpix.c
index dfdd297b6e715ed7561b339b89e0a41193dfb7f7..2326776ecbfb4efbf1ce149649aeed4246e3f7bf 100644
(file)
--- a/
src/mesa/main/readpix.c
+++ b/
src/mesa/main/readpix.c
@@
-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)) {