diff options
author | Ian Romanick <[email protected]> | 2012-07-26 18:46:23 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-23 10:15:31 -0700 |
commit | 0686ccac950bac1a650400b29c47ddaafea22fa9 (patch) | |
tree | 75d336f9aaafe9a0359ad61d8da5c725efc338ad /src/mesa/main/teximage.c | |
parent | 59d965333c05534475b60042571366656b97ab9d (diff) |
mesa/es: Validate glTexImage border in Mesa code rather than the ES wrapper
Also validate glCopyTexImage border. This fixes a bug in the APIspec.
Previously glTexImage3DOES could be passed a non-zero border without error.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 879a24e88aa..d9f0c7d84b5 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1605,7 +1605,8 @@ texture_error_check( struct gl_context *ctx, /* Check border */ if (border < 0 || border > 1 || - ((target == GL_TEXTURE_RECTANGLE_NV || + ((ctx->API != API_OPENGL || + target == GL_TEXTURE_RECTANGLE_NV || target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) { if (!isProxy) { _mesa_error(ctx, GL_INVALID_VALUE, @@ -2007,7 +2008,8 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, /* Check border */ if (border < 0 || border > 1 || - ((target == GL_TEXTURE_RECTANGLE_NV || + ((ctx->API != API_OPENGL || + 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); |