aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2015-03-10 19:33:30 +0100
committerEduardo Lima Mitev <[email protected]>2015-03-13 16:40:20 +0100
commitf6f7bfb5e1308593df9642aa8f46a17e8ce340a2 (patch)
tree9a140943b297a02851281e9ab65202ab098d1215
parent558dcd877095a27ce5de8198744f2f95ddf66b2a (diff)
meta: Remove error checks for texture <-> pixel-buffer transfers that don't belong in driver code
The implementation of texture <-> pixel-buffer transfers in drivers common layer includes certain error checks and argument validation that don't belong there, considering how the Mesa codebase is laid out. These are higher level validations that, if necessary, should be performed earlier (i.e, in GL API entry points). This patch simply removes these error checks from driver code. For more information, see discussion at http://lists.freedesktop.org/archives/mesa-dev/2015-February/077417.html. Reviewed-by: Laura Ekstrand <[email protected]>
-rw-r--r--src/mesa/drivers/common/meta_tex_subimage.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c
index e29addb734a..ad6e7873ecd 100644
--- a/src/mesa/drivers/common/meta_tex_subimage.c
+++ b/src/mesa/drivers/common/meta_tex_subimage.c
@@ -150,9 +150,6 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
bool success = false;
int z;
- /* XXX: This should probably be passed in from somewhere */
- const char *where = "_mesa_meta_pbo_TexSubImage";
-
if (!_mesa_is_bufferobj(packing->BufferObj) && !create_pbo)
return false;
@@ -165,19 +162,6 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
if (ctx->_ImageTransferState)
return false;
- if (!_mesa_validate_pbo_access(dims, packing, width, height, depth,
- format, type, INT_MAX, pixels)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(out of bounds PBO access)", where);
- return true;
- }
-
- if (_mesa_check_disallowed_mapping(packing->BufferObj)) {
- /* buffer is mapped - that's an error */
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
- return true;
- }
-
/* For arrays, use a tall (height * depth) 2D texture but taking into
* account the inter-image padding specified with the image height packing
* property.
@@ -277,9 +261,6 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
bool success = false;
int z;
- /* XXX: This should probably be passed in from somewhere */
- const char *where = "_mesa_meta_pbo_GetTexSubImage";
-
if (!_mesa_is_bufferobj(packing->BufferObj))
return false;
@@ -292,19 +273,6 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
if (ctx->_ImageTransferState)
return false;
- if (!_mesa_validate_pbo_access(dims, packing, width, height, depth,
- format, type, INT_MAX, pixels)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(out of bounds PBO access)", where);
- return true;
- }
-
- if (_mesa_check_disallowed_mapping(packing->BufferObj)) {
- /* buffer is mapped - that's an error */
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
- return true;
- }
-
/* For arrays, use a tall (height * depth) 2D texture but taking into
* account the inter-image padding specified with the image height packing
* property.