PIPE_TRANSFER_READ,
srcX, srcY,
width, height, &src_trans);
+ if (!map) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage()");
+ return;
+ }
if ((baseFormat == GL_DEPTH_COMPONENT ||
baseFormat == GL_DEPTH_STENCIL) &&
destX, destY, slice,
dst_width, dst_height, dst_depth,
&transfer);
+ if (!texDest) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage()");
+ goto err;
+ }
if (baseFormat == GL_DEPTH_COMPONENT ||
baseFormat == GL_DEPTH_STENCIL) {
GLfloat *tempSrc =
malloc(width * height * 4 * sizeof(GLfloat));
- if (tempSrc && texDest) {
+ if (tempSrc) {
const GLint dims = 2;
GLint dstRowStride;
struct gl_texture_image *texImage = &stImage->base;
}
st_texture_image_unmap(st, stImage, slice);
+err:
pipe->transfer_unmap(pipe, src_trans);
}