summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-27 18:38:50 -0600
committerBrian Paul <brianp@vmware.com>2009-09-27 18:38:50 -0600
commitf782f90c45fc9a483483ebd36c1971ecd0c7988d (patch)
tree0c60ae3de0da87810b413ae1d13ea5df8c5e9a0f /src/mesa/drivers/dri/intel
parentd73cd703161dab3f2a6890bbe62d92fd548c1ed6 (diff)
mesa: use _mesa_get_texstore_func()
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c20
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c19
2 files changed, 23 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 66201b1f46..aa36390689 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");
}
}
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index 751ec2c98c..f75d2ae004 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -109,14 +109,17 @@ intelTexSubimage(GLcontext * ctx,
memcpy(texImage->Data, pixels, imageSize);
}
else {
- if (!texImage->TexFormat->StoreImage(ctx, dims, texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data,
- xoffset, yoffset, zoffset,
- dstRowStride,
- texImage->ImageOffsets,
- width, height, depth,
- format, type, pixels, packing)) {
+ StoreTexImageFunc storeImage =
+ _mesa_get_texstore_func(texImage->TexFormat->MesaFormat);
+
+ if (!storeImage(ctx, dims, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ xoffset, yoffset, zoffset,
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, depth,
+ format, type, pixels, packing)) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "intelTexSubImage");
}
}