dstDepth, border, srcImage->InternalFormat,
srcImage->TexFormat);
dstImage->DriverData = NULL;
- dstImage->FetchTexelc = srcImage->FetchTexelc;
- dstImage->FetchTexelf = srcImage->FetchTexelf;
/* Alloc new teximage data buffer */
{
}
ASSERT(dstImage->TexFormat);
- ASSERT(dstImage->FetchTexelc);
- ASSERT(dstImage->FetchTexelf);
_mesa_generate_mipmap_level(target, datatype, comps, border,
srcWidth, srcHeight, srcDepth,
#include "mfeatures.h"
#include "state.h"
#include "texcompress.h"
-#include "texfetch.h"
#include "teximage.h"
#include "texstate.h"
#include "texpal.h"
GLint border, GLenum internalFormat,
gl_format format)
{
- GLint i, dims;
+ GLint i;
ASSERT(img);
ASSERT(width >= 0);
}
img->TexFormat = format;
-
- dims = _mesa_get_texture_dimensions(target);
-
- _mesa_set_fetch_functions(img, dims);
}
if (texObj->Sampler.sRGBDecode != decode) {
flush(ctx);
texObj->Sampler.sRGBDecode = decode;
- _mesa_update_fetch_functions(texObj);
}
return GL_TRUE;
}
#include "main/pbo.h"
#include "main/pixeltransfer.h"
#include "main/texcompress.h"
-#include "main/texfetch.h"
#include "main/texgetimage.h"
#include "main/teximage.h"
#include "main/texobj.h"
stImage->base.Face = _mesa_tex_target_to_face(target);
stImage->base.Level = level;
- _mesa_set_fetch_functions(texImage, dims);
-
/* Release the reference to a potentially orphaned buffer.
* Release any old malloced memory.
*/
dest = (GLubyte *) pixels;
- _mesa_set_fetch_functions(texImage, get_texture_dims(target));
-
for (i = 0; i < depth; i++) {
if (compressed_dst) {
_mesa_get_compressed_teximage(ctx, target, level, dest,
#include "main/colormac.h"
#include "main/mtypes.h"
#include "main/teximage.h"
+#include "main/texfetch.h"
#include "program/prog_parameter.h"
#include "program/prog_statevars.h"
#include "swrast.h"
return; /* pipe hack */
for (u = 0; u < ctx->Const.MaxTextureImageUnits; u++) {
- const struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current;
+ struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current;
/* Note: If tObj is NULL, the sample function will be a simple
* function that just returns opaque black (0,0,0,1).
*/
- swrast->TextureSample[u] = _swrast_choose_texture_sample_func(ctx, tObj);
+ if (tObj) {
+ _mesa_update_fetch_functions(tObj);
+ swrast->TextureSample[u] = _swrast_choose_texture_sample_func(ctx, tObj);
+ }
}
}