summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-09-27 18:38:50 -0600
committerBrian Paul <[email protected]>2009-09-27 18:38:50 -0600
commitf782f90c45fc9a483483ebd36c1971ecd0c7988d (patch)
tree0c60ae3de0da87810b413ae1d13ea5df8c5e9a0f /src/mesa/drivers/dri/unichrome
parentd73cd703161dab3f2a6890bbe62d92fd548c1ed6 (diff)
mesa: use _mesa_get_texstore_func()
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index 54073e76918..388fd9392cf 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -797,22 +797,25 @@ static void viaTexImage(GLcontext *ctx,
else {
GLint dstRowStride;
GLboolean success;
+ StoreTexImageFunc storeImage =
+ _mesa_get_texstore_func(texImage->TexFormat->MesaFormat);
+
if (texImage->IsCompressed) {
dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat, width);
}
else {
dstRowStride = postConvWidth * texImage->TexFormat->TexelBytes;
}
- ASSERT(texImage->TexFormat->StoreImage);
- success = texImage->TexFormat->StoreImage(ctx, dims,
- texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data,
- 0, 0, 0, /* dstX/Y/Zoffset */
- dstRowStride,
- texImage->ImageOffsets,
- width, height, 1,
- format, type, pixels, packing);
+ ASSERT(storeImage);
+ success = storeImage(ctx, dims,
+ texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, 1,
+ format, type, pixels, packing);
if (!success) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage");
}