Mesa (master): mesa: make memcpy_texture() non-static
Brian Paul
brianp at kemper.freedesktop.org
Tue Oct 20 19:59:46 UTC 2015
Module: Mesa
Branch: master
Commit: cf405922eb2bd4d1dfae896caa9d58980875e7ec
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf405922eb2bd4d1dfae896caa9d58980875e7ec
Author: Brian Paul <brianp at vmware.com>
Date: Thu Oct 15 09:54:29 2015 -0600
mesa: make memcpy_texture() non-static
So that we can use it directly from the mesa/gallium state tracker.
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
Reviewed-by: Sinclair Yeh <syeh at vmware.com>
---
src/mesa/main/texstore.c | 40 ++++++++++++++++++++--------------------
src/mesa/main/texstore.h | 11 +++++++++++
2 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index e50964e..4b13c42 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -97,16 +97,16 @@ static const GLubyte map_1032[6] = { 1, 0, 3, 2, ZERO, ONE };
* No pixel transfer operations or special texel encodings allowed.
* 1D, 2D and 3D images supported.
*/
-static void
-memcpy_texture(struct gl_context *ctx,
- GLuint dimensions,
- mesa_format dstFormat,
- GLint dstRowStride,
- GLubyte **dstSlices,
- GLint srcWidth, GLint srcHeight, GLint srcDepth,
- GLenum srcFormat, GLenum srcType,
- const GLvoid *srcAddr,
- const struct gl_pixelstore_attrib *srcPacking)
+void
+_mesa_memcpy_texture(struct gl_context *ctx,
+ GLuint dimensions,
+ mesa_format dstFormat,
+ GLint dstRowStride,
+ GLubyte **dstSlices,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking)
{
const GLint srcRowStride = _mesa_image_row_stride(srcPacking, srcWidth,
srcFormat, srcType);
@@ -296,11 +296,11 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS)
assert(baseInternalFormat == GL_YCBCR_MESA);
/* always just memcpy since no pixel transfer ops apply */
- memcpy_texture(ctx, dims,
- dstFormat,
- dstRowStride, dstSlices,
- srcWidth, srcHeight, srcDepth, srcFormat, srcType,
- srcAddr, srcPacking);
+ _mesa_memcpy_texture(ctx, dims,
+ dstFormat,
+ dstRowStride, dstSlices,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
/* Check if we need byte swapping */
/* XXX the logic here _might_ be wrong */
@@ -899,11 +899,11 @@ _mesa_texstore_memcpy(TEXSTORE_PARAMS)
return GL_FALSE;
}
- memcpy_texture(ctx, dims,
- dstFormat,
- dstRowStride, dstSlices,
- srcWidth, srcHeight, srcDepth, srcFormat, srcType,
- srcAddr, srcPacking);
+ _mesa_memcpy_texture(ctx, dims,
+ dstFormat,
+ dstRowStride, dstSlices,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
return GL_TRUE;
}
/**
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index 2c974f7..f08dc08 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -74,6 +74,17 @@ _mesa_texstore_needs_transfer_ops(struct gl_context *ctx,
GLenum baseInternalFormat,
mesa_format dstFormat);
+extern void
+_mesa_memcpy_texture(struct gl_context *ctx,
+ GLuint dimensions,
+ mesa_format dstFormat,
+ GLint dstRowStride,
+ GLubyte **dstSlices,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking);
+
extern GLboolean
_mesa_texstore_can_use_memcpy(struct gl_context *ctx,
GLenum baseInternalFormat, mesa_format dstFormat,
More information about the mesa-commit
mailing list