aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuanhan Liu <[email protected]>2011-10-25 15:36:59 +0800
committerYuanhan Liu <[email protected]>2011-11-03 10:22:56 +0800
commit49f8447acc430944504c658c2d2b4a2ccb3af0bc (patch)
tree101760ed5097dd9d6ead5a4f5e3b301b6d325450 /src
parent1f5bd65efa228736d41956f9e76df350dfe2d5d2 (diff)
mesa: fix the low limit of width and height for glRenderbufferStorage
glRenderbufferStorage man page says: GL_INVALID_VALUE is generated if either of width or height is negative, or greater than the value of GL_MAX_RENDERBUFFER_SIZE. NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index c56062ac6a7..ff46570bf16 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1370,12 +1370,12 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
return;
}
- if (width < 1 || width > (GLsizei) ctx->Const.MaxRenderbufferSize) {
+ if (width < 0 || width > (GLsizei) ctx->Const.MaxRenderbufferSize) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(width)", func);
return;
}
- if (height < 1 || height > (GLsizei) ctx->Const.MaxRenderbufferSize) {
+ if (height < 0 || height > (GLsizei) ctx->Const.MaxRenderbufferSize) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(height)", func);
return;
}