From 71372d36e1a3f0230b88808f70d35446fda12260 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 15 Apr 2011 14:48:46 +0000 Subject: xserver xkeyboard-config libX11 mesa git update 15 April 2011 --- mesalib/src/mesa/state_tracker/st_cb_texture.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mesalib/src/mesa/state_tracker/st_cb_texture.c') diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index 914c06b70..43c24ae95 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -600,7 +600,12 @@ st_TexImage(struct gl_context * ctx, * memory or malloc space for it. */ if (stImage->pt) { - /* Store the image in the gallium texture memory buffer */ + if (!pixels) { + /* We've allocated texture resource, but have no pixel data - all done. */ + goto done; + } + + /* Store the image in the gallium transfer object */ if (format == GL_DEPTH_COMPONENT && util_format_is_depth_and_stencil(stImage->pt->format)) transfer_usage = PIPE_TRANSFER_READ_WRITE; -- cgit v1.2.3