meta: Make sure texImage->TexFormat is valid for CopyTex(Sub)Image.

This commit is contained in:
Michel Dänzer 2009-10-03 18:01:57 +02:00
parent 26df8af4fe
commit 4a6759b778
1 changed files with 7 additions and 0 deletions

View File

@ -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 */
/*