summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-10-03 18:01:57 +0200
committerMichel Dänzer <[email protected]>2009-10-03 18:01:57 +0200
commit4a6759b7789dc703a8ee9f1cf08af22c6e8101fb (patch)
treefd2fceddc6ef886fa6f3cc6d8cc2a6be91c2a3d6 /src/mesa
parent26df8af4fe4173eb52132dc63ee789b80a7a4db2 (diff)
meta: Make sure texImage->TexFormat is valid for CopyTex(Sub)Image.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/common/meta.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 12e0bdde883..e1732241b3a 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -55,6 +55,7 @@
#include "main/stencil.h"
#include "main/texobj.h"
#include "main/texenv.h"
+#include "main/texformat.h"
#include "main/teximage.h"
#include "main/texparam.h"
#include "main/texstate.h"
@@ -2471,6 +2472,12 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
return;
}
+ if (texImage->TexFormat == &_mesa_null_texformat)
+ texImage->TexFormat = ctx->Driver.ChooseTextureFormat(ctx,
+ internalFormat,
+ format,
+ type);
+
_mesa_unlock_texture(ctx, texObj); /* need to unlock first */
/*