[Mesa-dev] [PATCH 12/18] mesa: Generate an error when glCopyTexImage border is invalid

Ian Romanick idr at freedesktop.org
Mon Aug 20 17:06:38 PDT 2012


From: Ian Romanick <ian.d.romanick at intel.com>

NOTE: This is a candidate for stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/teximage.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 8e66e90..ee19288 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2036,6 +2036,8 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
    if (border < 0 || border > 1 ||
        ((target == GL_TEXTURE_RECTANGLE_NV ||
          target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) {
+      _mesa_error(ctx, GL_INVALID_VALUE,
+                  "glCopyTexImage%dD(border=%d)", dimensions, border);
       return GL_TRUE;
    }
 
-- 
1.7.6.5



More information about the mesa-dev mailing list