diff options
author | Brian Paul <[email protected]> | 2009-09-27 18:38:50 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-09-27 18:38:50 -0600 |
commit | f782f90c45fc9a483483ebd36c1971ecd0c7988d (patch) | |
tree | 0c60ae3de0da87810b413ae1d13ea5df8c5e9a0f /src/mesa/drivers/dri/intel/intel_tex_image.c | |
parent | d73cd703161dab3f2a6890bbe62d92fd548c1ed6 (diff) |
mesa: use _mesa_get_texstore_func()
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex_image.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 66201b1f465..aa363906892 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -8,6 +8,7 @@ #include "main/context.h" #include "main/texcompress.h" #include "main/texformat.h" +#include "main/texstore.h" #include "main/texgetimage.h" #include "main/texobj.h" #include "main/texstore.h" @@ -513,6 +514,9 @@ intelTexImage(GLcontext * ctx, * conversion and copy: */ if (pixels) { + StoreTexImageFunc storeImage = + _mesa_get_texstore_func(texImage->TexFormat->MesaFormat); + if (compressed) { if (intelImage->mt) { struct intel_region *dst = intelImage->mt->region; @@ -525,14 +529,14 @@ intelTexImage(GLcontext * ctx, 0, 0); } else memcpy(texImage->Data, pixels, imageSize); - } else if (!texImage->TexFormat->StoreImage(ctx, dims, - texImage->_BaseFormat, - texImage->TexFormat, - texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ - dstRowStride, - texImage->ImageOffsets, - width, height, depth, - format, type, pixels, unpack)) { + } else if (!storeImage(ctx, dims, + texImage->_BaseFormat, + texImage->TexFormat, + texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ + dstRowStride, + texImage->ImageOffsets, + width, height, depth, + format, type, pixels, unpack)) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); } } |