meta: Make sure texImage->TexFormat is valid for CopyTex(Sub)Image.
This commit is contained in:
parent
26df8af4fe
commit
4a6759b778
|
@ -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 */
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue