Mesa (master): mesa: Remove prototypes and mark S3TC functions static

Matt Turner mattst88 at kemper.freedesktop.org
Tue Oct 3 02:44:21 UTC 2017


Module: Mesa
Branch: master
Commit: 82c54c4fdc8495d7522c782141c080314459690a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=82c54c4fdc8495d7522c782141c080314459690a

Author: Matt Turner <mattst88 at gmail.com>
Date:   Thu Sep 28 11:44:10 2017 -0700

mesa: Remove prototypes and mark S3TC functions static

This file will be #included, so the functions should be static.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/mesa/main/texcompress_s3tc_tmp.h | 23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)

diff --git a/src/mesa/main/texcompress_s3tc_tmp.h b/src/mesa/main/texcompress_s3tc_tmp.h
index 57bbf7e0ae..3abce6e904 100644
--- a/src/mesa/main/texcompress_s3tc_tmp.h
+++ b/src/mesa/main/texcompress_s3tc_tmp.h
@@ -36,19 +36,6 @@ typedef GLubyte GLchan;
 #define BCOMP 2
 #define ACOMP 3
 
-void fetch_2d_texel_rgb_dxt1(GLint srcRowStride, const GLubyte *pixdata,
-			     GLint i, GLint j, GLvoid *texel);
-void fetch_2d_texel_rgba_dxt1(GLint srcRowStride, const GLubyte *pixdata,
-			     GLint i, GLint j, GLvoid *texel);
-void fetch_2d_texel_rgba_dxt3(GLint srcRowStride, const GLubyte *pixdata,
-			     GLint i, GLint j, GLvoid *texel);
-void fetch_2d_texel_rgba_dxt5(GLint srcRowStride, const GLubyte *pixdata,
-			     GLint i, GLint j, GLvoid *texel);
-
-void tx_compress_dxtn(GLint srccomps, GLint width, GLint height,
-		      const GLubyte *srcPixData, GLenum destformat,
-		      GLubyte *dest, GLint dstRowStride);
-
 #define EXP5TO8R(packedcol)					\
    ((((packedcol) >> 8) & 0xf8) | (((packedcol) >> 13) & 0x7))
 
@@ -118,7 +105,7 @@ static void dxt135_decode_imageblock ( const GLubyte *img_block_src,
 }
 
 
-void fetch_2d_texel_rgb_dxt1(GLint srcRowStride, const GLubyte *pixdata,
+static void fetch_2d_texel_rgb_dxt1(GLint srcRowStride, const GLubyte *pixdata,
                          GLint i, GLint j, GLvoid *texel)
 {
    /* Extract the (i,j) pixel from pixdata and return it
@@ -130,7 +117,7 @@ void fetch_2d_texel_rgb_dxt1(GLint srcRowStride, const GLubyte *pixdata,
 }
 
 
-void fetch_2d_texel_rgba_dxt1(GLint srcRowStride, const GLubyte *pixdata,
+static void fetch_2d_texel_rgba_dxt1(GLint srcRowStride, const GLubyte *pixdata,
                          GLint i, GLint j, GLvoid *texel)
 {
    /* Extract the (i,j) pixel from pixdata and return it
@@ -141,7 +128,7 @@ void fetch_2d_texel_rgba_dxt1(GLint srcRowStride, const GLubyte *pixdata,
    dxt135_decode_imageblock(blksrc, (i&3), (j&3), 1, texel);
 }
 
-void fetch_2d_texel_rgba_dxt3(GLint srcRowStride, const GLubyte *pixdata,
+static void fetch_2d_texel_rgba_dxt3(GLint srcRowStride, const GLubyte *pixdata,
                          GLint i, GLint j, GLvoid *texel) {
 
    /* Extract the (i,j) pixel from pixdata and return it
@@ -155,7 +142,7 @@ void fetch_2d_texel_rgba_dxt3(GLint srcRowStride, const GLubyte *pixdata,
    rgba[ACOMP] = UBYTE_TO_CHAN( (GLubyte)(EXP4TO8(anibble)) );
 }
 
-void fetch_2d_texel_rgba_dxt5(GLint srcRowStride, const GLubyte *pixdata,
+static void fetch_2d_texel_rgba_dxt5(GLint srcRowStride, const GLubyte *pixdata,
                          GLint i, GLint j, GLvoid *texel) {
 
    /* Extract the (i,j) pixel from pixdata and return it
@@ -916,7 +903,7 @@ static void extractsrccolors( GLubyte srcpixels[4][4][4], const GLchan *srcaddr,
 }
 
 
-void tx_compress_dxtn(GLint srccomps, GLint width, GLint height, const GLubyte *srcPixData,
+static void tx_compress_dxtn(GLint srccomps, GLint width, GLint height, const GLubyte *srcPixData,
                      GLenum destFormat, GLubyte *dest, GLint dstRowStride)
 {
       GLubyte *blkaddr = dest;




More information about the mesa-commit mailing list