Mesa (master): st/mesa: remove st_CompressedTexSubImage1D/2D/3D()
Brian Paul
brianp at kemper.freedesktop.org
Wed Jan 4 20:37:27 UTC 2012
Module: Mesa
Branch: master
Commit: 2a0c515b8960a3227c3e64c84a3014823da276a3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a0c515b8960a3227c3e64c84a3014823da276a3
Author: Brian Paul <brianp at vmware.com>
Date: Wed Jan 4 13:30:35 2012 -0700
st/mesa: remove st_CompressedTexSubImage1D/2D/3D()
Just use the core Mesa functions instead.
Signed-off-by: Brian Paul <brianp at vmware.com>
---
src/mesa/state_tracker/st_cb_texture.c | 84 +------------------------------
1 files changed, 3 insertions(+), 81 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 436f71d..e3e5059 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -727,84 +727,6 @@ st_GetTexImage(struct gl_context * ctx,
}
-static void
-st_CompressedTexSubImage1D(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLsizei width,
- GLenum format,
- GLsizei imageSize, const GLvoid *data)
-{
- assert(0);
-}
-
-
-static void
-st_CompressedTexSubImage2D(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset,
- GLsizei width, GLint height,
- GLenum format,
- GLsizei imageSize, const GLvoid *data)
-{
- struct st_context *st = st_context(ctx);
- struct st_texture_image *stImage = st_texture_image(texImage);
- int srcBlockStride;
- int dstBlockStride;
- int y;
- enum pipe_format pformat;
- GLubyte *dstMap;
-
- if (stImage->pt) {
- pformat = stImage->pt->format;
-
- dstMap = st_texture_image_map(st, stImage, 0,
- PIPE_TRANSFER_WRITE,
- xoffset, yoffset,
- width, height);
-
- srcBlockStride = util_format_get_stride(pformat, width);
- dstBlockStride = stImage->transfer->stride;
- } else {
- assert(stImage->pt);
- /* TODO find good values for block and strides */
- /* TODO also adjust texImage->data for yoffset/xoffset */
- return;
- }
-
- if (!dstMap) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage");
- return;
- }
-
- assert(xoffset % util_format_get_blockwidth(pformat) == 0);
- assert(yoffset % util_format_get_blockheight(pformat) == 0);
-
- for (y = 0; y < height; y += util_format_get_blockheight(pformat)) {
- /* don't need to adjust for xoffset and yoffset as st_texture_image_map does that */
- const char *src = (const char*)data + srcBlockStride * util_format_get_nblocksy(pformat, y);
- char *dst = (char *) dstMap + dstBlockStride * util_format_get_nblocksy(pformat, y);
- memcpy(dst, src, util_format_get_stride(pformat, width));
- }
-
- if (stImage->pt && stImage->transfer) {
- st_texture_image_unmap(st, stImage);
- }
-}
-
-
-static void
-st_CompressedTexSubImage3D(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLint height, GLint depth,
- GLenum format,
- GLsizei imageSize, const GLvoid *data)
-{
- assert(0);
-}
-
-
-
/**
* Do a CopyTexSubImage operation using a read transfer from the source,
* a write transfer to the destination and get_tile()/put_tile() to access
@@ -1530,9 +1452,9 @@ st_init_texture_functions(struct dd_function_table *functions)
functions->TexSubImage1D = _mesa_store_texsubimage1d;
functions->TexSubImage2D = _mesa_store_texsubimage2d;
functions->TexSubImage3D = _mesa_store_texsubimage3d;
- functions->CompressedTexSubImage1D = st_CompressedTexSubImage1D;
- functions->CompressedTexSubImage2D = st_CompressedTexSubImage2D;
- functions->CompressedTexSubImage3D = st_CompressedTexSubImage3D;
+ functions->CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d;
+ functions->CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d;
+ functions->CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d;
functions->CopyTexSubImage1D = st_CopyTexSubImage1D;
functions->CopyTexSubImage2D = st_CopyTexSubImage2D;
functions->CopyTexSubImage3D = st_CopyTexSubImage3D;
More information about the mesa-commit
mailing list