[Mesa-dev] [PATCH 19/23] i965 teximage: don't call _mesa_store_teximage if format/type==GL_NONE
Jordan Justen
jordan.l.justen at intel.com
Fri Jan 4 18:41:42 PST 2013
Mesa core's copyteximage calls the driver with format/type==GL_NONE
to "Allocate texture memory". In this case, we shouldn't call
_mesa_store_teximage.
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/drivers/dri/intel/intel_tex_image.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 7361e6a..9676623 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -239,8 +239,10 @@ intelTexImage(struct gl_context * ctx,
__FUNCTION__, texImage->Width, texImage->Height, texImage->Depth,
pixels);
- _mesa_store_teximage(ctx, dims, texImage,
- format, type, pixels, unpack);
+ if (format != GL_NONE && type != GL_NONE) {
+ _mesa_store_teximage(ctx, dims, texImage,
+ format, type, pixels, unpack);
+ }
}
--
1.7.10.4
More information about the mesa-dev
mailing list