/* out of memory or other unexpected error */
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage(map PBO failed)");
return;
-
}
/* <pixels> was an offset into the PBO.
* Now make it a real, client-side pointer inside the mapped region.
*/
pixels = ADD_POINTERS(buf, pixels);
}
- else if (!pixels) {
- /* not an error */
- return;
- }
{
const GLint width = texImage->Width;
}
img = ADD_POINTERS(buf, img);
}
- else if (!img) {
- /* not an error */
- return;
- }
/* just memcpy, no pixelstore or pixel transfer */
_mesa_memcpy(img, texImage->Data, size);
return;
}
+ if (_mesa_is_bufferobj(ctx->Pack.BufferObj) && !pixels) {
+ /* not an error, do nothing */
+ return;
+ }
+
texUnit = _mesa_get_current_tex_unit(ctx);
texObj = _mesa_select_tex_object(ctx, texUnit, target);
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
return;
}
+ if (_mesa_is_bufferobj(ctx->Pack.BufferObj) && !img) {
+ /* not an error, do nothing */
+ return;
+ }
+
texUnit = _mesa_get_current_tex_unit(ctx);
texObj = _mesa_select_tex_object(ctx, texUnit, target);