Call it from in the main Mesa glTexImage functions.
#include "main/convolve.h"
#include "main/context.h"
#include "main/texcompress.h"
-#include "main/texfetch.h"
#include "main/texformat.h"
#include "main/texstore.h"
#include "main/texgetimage.h"
texImage->TexFormat = intelChooseTextureFormat(ctx, internalFormat,
format, type);
- _mesa_set_fetch_functions(texImage, dims);
-
if (_mesa_is_format_compressed(texImage->TexFormat)) {
texelBytes = 0;
}
intelImage->level = level;
texImage->TexFormat = intelChooseTextureFormat(&intel->ctx, internalFormat,
type, format);
- _mesa_set_fetch_functions(texImage, 2);
texImage->RowStride = rb->region->pitch;
intel_miptree_reference(&intelImage->mt, intelObj->mt);
#include "main/convolve.h"
#include "main/mipmap.h"
#include "main/texcompress.h"
-#include "main/texfetch.h"
#include "main/texformat.h"
#include "main/texstore.h"
#include "main/teximage.h"
radeon_bo_map(t->bo, GL_FALSE);
img->base.Data = t->bo->ptr;
- _mesa_set_fetch_functions(&img->base, 2);
}
static void unmap_override(GLcontext *ctx, radeonTexObj *t)
/* Choose and fill in the texture format for this image */
texImage->TexFormat = radeonChooseTextureFormat(ctx, internalFormat, format, type, 0);
- _mesa_set_fetch_functions(texImage, dims);
if (_mesa_is_format_compressed(texImage->TexFormat)) {
texelBytes = 0;
#include "main/mipmap.h"
#include "main/simple_list.h"
#include "main/texcompress.h"
-#include "main/texfetch.h"
#include "main/texformat.h"
#include "main/texobj.h"
#include "main/texstore.h"
assert(texImage->TexFormat);
- _mesa_set_fetch_functions(texImage, dims);
-
texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
if (texelBytes == 0) {
}
+#if 0
/**
* Adaptor for fetching a float texel from a GLchan-valued texture.
*/
texelOut[3] = CHAN_TO_FLOAT(temp[3]);
}
}
+#endif
/**
ASSERT(dims == 1 || dims == 2 || dims == 3);
ASSERT(texImage->TexFormat);
- texImage->FetchTexelf =
- _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
+ if (!texImage->FetchTexelf) {
+ texImage->FetchTexelf =
+ _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
+ }
/* now check if we need to use a float/chan adaptor */
if (!texImage->FetchTexelc) {
texImage->FetchTexelc = fetch_texel_float_to_chan;
}
- else if (!texImage->FetchTexelf) {
- texImage->FetchTexelf = fetch_texel_chan_to_float;
- }
-
ASSERT(texImage->FetchTexelc);
ASSERT(texImage->FetchTexelf);
#include "macros.h"
#include "state.h"
#include "texcompress.h"
+#include "texfetch.h"
#include "texformat.h"
#include "teximage.h"
#include "texstate.h"
img->HeightScale = (GLfloat) img->Height;
img->DepthScale = (GLfloat) img->Depth;
}
+
+ img->FetchTexelc = NULL;
+ img->FetchTexelf = NULL;
}
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 3);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
border, imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
border, imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 3);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
#include "texcompress.h"
#include "texcompress_fxt1.h"
#include "texcompress_s3tc.h"
-#include "texfetch.h"
#include "texformat.h"
#include "teximage.h"
#include "texstore.h"
= ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
ASSERT(texImage->TexFormat);
- _mesa_set_fetch_functions(texImage, 1);
-
/* allocate memory */
sizeInBytes = texture_size(texImage);
texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
= ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
ASSERT(texImage->TexFormat);
- _mesa_set_fetch_functions(texImage, 2);
-
/* allocate memory */
sizeInBytes = texture_size(texImage);
texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
= ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
ASSERT(texImage->TexFormat);
- _mesa_set_fetch_functions(texImage, 3);
-
/* allocate memory */
sizeInBytes = texture_size(texImage);
texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
= ctx->Driver.ChooseTextureFormat(ctx, internalFormat, 0, 0);
ASSERT(texImage->TexFormat);
- _mesa_set_fetch_functions(texImage, 2);
-
/* allocate storage */
texImage->Data = _mesa_alloc_texmemory(imageSize);
if (!texImage->Data) {