texImage->TexFormat = intelChooseTextureFormat(ctx, internalFormat,
format, type);
- assert(texImage->TexFormat);
-
- switch (dims) {
- case 1:
- texImage->FetchTexelc = texImage->TexFormat->FetchTexel1D;
- texImage->FetchTexelf = texImage->TexFormat->FetchTexel1Df;
- break;
- case 2:
- texImage->FetchTexelc = texImage->TexFormat->FetchTexel2D;
- texImage->FetchTexelf = texImage->TexFormat->FetchTexel2Df;
- break;
- case 3:
- texImage->FetchTexelc = texImage->TexFormat->FetchTexel3D;
- texImage->FetchTexelf = texImage->TexFormat->FetchTexel3Df;
- break;
- default:
- assert(0);
- break;
- }
+ _mesa_set_fetch_functions(texImage, dims);
if (texImage->TexFormat->TexelBytes == 0) {
/* must be a compressed format */
/**
* Initialize the texture image's FetchTexelc and FetchTexelf methods.
*/
-static void
-set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
+void
+_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
{
ASSERT(dims == 1 || dims == 2 || dims == 3);
ASSERT(texImage->TexFormat);
ASSERT(texImage->TexFormat);
- set_fetch_functions(texImage, dims);
+ _mesa_set_fetch_functions(texImage, dims);
if (texImage->TexFormat->TexelBytes == 0) {
/* must be a compressed format */
const struct gl_pixelstore_attrib *srcPacking);
+extern void
+_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims);
+
+
extern void
_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
GLint internalFormat,