[Mesa-dev] [PATCH 08/10] swrast: rename texture fetch functions (pt. 7)

Brian Paul brianp at vmware.com
Sat Apr 5 15:50:59 PDT 2014


sed commands:
s/f_z24_s8/S8_UINT_Z24_UNORM/g
s/f_s8_z24/Z24_UNORM_S8_UINT/g
s/f_z16/Z_UNORM16/g
s/f_z32/Z_UNORM32/g
s/z32f_x24s8/Z32_FLOAT_S8X24_UINT/g
s/f_ycbcr_rev/YCBCR_REV/g
s/f_ycbcr/YCBCR/g
s/dudv8/DUDV8/g
---
 src/mesa/swrast/s_texfetch.c     |   60 +++++++++++++++++++-------------------
 src/mesa/swrast/s_texfetch_tmp.h |   16 +++++-----
 2 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index dec75a1..3ad4a5b 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -331,45 +331,45 @@ texfetch_funcs[] =
    },
    {
       MESA_FORMAT_S8_UINT_Z24_UNORM,
-      fetch_texel_1d_f_z24_s8,
-      fetch_texel_2d_f_z24_s8,
-      fetch_texel_3d_f_z24_s8
+      fetch_texel_1d_S8_UINT_Z24_UNORM,
+      fetch_texel_2d_S8_UINT_Z24_UNORM,
+      fetch_texel_3d_S8_UINT_Z24_UNORM
    },
    {
       MESA_FORMAT_X8_UINT_Z24_UNORM,
-      fetch_texel_1d_f_z24_s8,
-      fetch_texel_2d_f_z24_s8,
-      fetch_texel_3d_f_z24_s8
+      fetch_texel_1d_S8_UINT_Z24_UNORM,
+      fetch_texel_2d_S8_UINT_Z24_UNORM,
+      fetch_texel_3d_S8_UINT_Z24_UNORM
    },
    {
       MESA_FORMAT_Z24_UNORM_S8_UINT,
-      fetch_texel_1d_f_s8_z24,
-      fetch_texel_2d_f_s8_z24,
-      fetch_texel_3d_f_s8_z24
+      fetch_texel_1d_Z24_UNORM_S8_UINT,
+      fetch_texel_2d_Z24_UNORM_S8_UINT,
+      fetch_texel_3d_Z24_UNORM_S8_UINT
    },
    {
       MESA_FORMAT_Z24_UNORM_X8_UINT,
-      fetch_texel_1d_f_s8_z24,
-      fetch_texel_2d_f_s8_z24,
-      fetch_texel_3d_f_s8_z24
+      fetch_texel_1d_Z24_UNORM_S8_UINT,
+      fetch_texel_2d_Z24_UNORM_S8_UINT,
+      fetch_texel_3d_Z24_UNORM_S8_UINT
    },
    {
       MESA_FORMAT_YCBCR,
-      fetch_texel_1d_f_ycbcr,
-      fetch_texel_2d_f_ycbcr,
-      fetch_texel_3d_f_ycbcr
+      fetch_texel_1d_YCBCR,
+      fetch_texel_2d_YCBCR,
+      fetch_texel_3d_YCBCR
    },
    {
       MESA_FORMAT_YCBCR_REV,
-      fetch_texel_1d_f_ycbcr_rev,
-      fetch_texel_2d_f_ycbcr_rev,
-      fetch_texel_3d_f_ycbcr_rev
+      fetch_texel_1d_YCBCR_REV,
+      fetch_texel_2d_YCBCR_REV,
+      fetch_texel_3d_YCBCR_REV
    },
    {
       MESA_FORMAT_DUDV8,
-      fetch_texel_1d_dudv8,
-      fetch_texel_2d_dudv8,
-      fetch_texel_3d_dudv8
+      fetch_texel_1d_DUDV8,
+      fetch_texel_2d_DUDV8,
+      fetch_texel_3d_DUDV8
    },
 
    /* Array unorm formats */
@@ -447,15 +447,15 @@ texfetch_funcs[] =
    },
    {
       MESA_FORMAT_Z_UNORM16,
-      fetch_texel_1d_f_z16,
-      fetch_texel_2d_f_z16,
-      fetch_texel_3d_f_z16
+      fetch_texel_1d_Z_UNORM16,
+      fetch_texel_2d_Z_UNORM16,
+      fetch_texel_3d_Z_UNORM16
    },
    {
       MESA_FORMAT_Z_UNORM32,
-      fetch_texel_1d_f_z32,
-      fetch_texel_2d_f_z32,
-      fetch_texel_3d_f_z32
+      fetch_texel_1d_Z_UNORM32,
+      fetch_texel_2d_Z_UNORM32,
+      fetch_texel_3d_Z_UNORM32
    },
    {
       MESA_FORMAT_S_UINT8,
@@ -661,9 +661,9 @@ texfetch_funcs[] =
    },
    {
       MESA_FORMAT_Z32_FLOAT_S8X24_UINT,
-      fetch_texel_1d_z32f_x24s8,
-      fetch_texel_2d_z32f_x24s8,
-      fetch_texel_3d_z32f_x24s8
+      fetch_texel_1d_Z32_FLOAT_S8X24_UINT,
+      fetch_texel_2d_Z32_FLOAT_S8X24_UINT,
+      fetch_texel_3d_Z32_FLOAT_S8X24_UINT
    },
 
    /* Array float formats */
diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h
index af2815e..849f061 100644
--- a/src/mesa/swrast/s_texfetch_tmp.h
+++ b/src/mesa/swrast/s_texfetch_tmp.h
@@ -75,7 +75,7 @@
  * returning 1 GLfloat.
  * Note: no GLchan version of this function.
  */
-static void FETCH(f_z32)( const struct swrast_texture_image *texImage,
+static void FETCH(Z_UNORM32)( const struct swrast_texture_image *texImage,
                           GLint i, GLint j, GLint k, GLfloat *texel )
 {
    const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
@@ -89,7 +89,7 @@ static void FETCH(f_z32)( const struct swrast_texture_image *texImage,
  * returning 1 GLfloat.
  * Note: no GLchan version of this function.
  */
-static void FETCH(f_z16)(const struct swrast_texture_image *texImage,
+static void FETCH(Z_UNORM16)(const struct swrast_texture_image *texImage,
                          GLint i, GLint j, GLint k, GLfloat *texel )
 {
    const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
@@ -1166,7 +1166,7 @@ FETCH(rgba_uint32)(const struct swrast_texture_image *texImage,
 
 /* this format by definition produces 0,0,0,1 as rgba values,
    however we'll return the dudv values as rg and fix up elsewhere */
-static void FETCH(dudv8)(const struct swrast_texture_image *texImage,
+static void FETCH(DUDV8)(const struct swrast_texture_image *texImage,
                          GLint i, GLint j, GLint k, GLfloat *texel )
 {
    const GLbyte *src = TEXEL_ADDR(GLbyte, texImage, i, j, k, 2);
@@ -1498,7 +1498,7 @@ FETCH(RGBX_FLOAT32)(const struct swrast_texture_image *texImage,
 /* Fetch texel from 1D, 2D or 3D ycbcr texture, return 4 GLfloats.
  * We convert YCbCr to RGB here.
  */
-static void FETCH(f_ycbcr)( const struct swrast_texture_image *texImage,
+static void FETCH(YCBCR)( const struct swrast_texture_image *texImage,
                             GLint i, GLint j, GLint k, GLfloat *texel )
 {
    const GLushort *src0 = TEXEL_ADDR(GLushort, texImage, (i & ~1), j, k, 1); /* even */
@@ -1528,7 +1528,7 @@ static void FETCH(f_ycbcr)( const struct swrast_texture_image *texImage,
 /* Fetch texel from 1D, 2D or 3D ycbcr_rev texture, return 4 GLfloats.
  * We convert YCbCr to RGB here.
  */
-static void FETCH(f_ycbcr_rev)( const struct swrast_texture_image *texImage,
+static void FETCH(YCBCR_REV)( const struct swrast_texture_image *texImage,
                                 GLint i, GLint j, GLint k, GLfloat *texel )
 {
    const GLushort *src0 = TEXEL_ADDR(GLushort, texImage, (i & ~1), j, k, 1); /* even */
@@ -1555,7 +1555,7 @@ static void FETCH(f_ycbcr_rev)( const struct swrast_texture_image *texImage,
 
 /* MESA_TEXFORMAT_Z24_S8 ***************************************************/
 
-static void FETCH(f_z24_s8)( const struct swrast_texture_image *texImage,
+static void FETCH(S8_UINT_Z24_UNORM)( const struct swrast_texture_image *texImage,
                              GLint i, GLint j, GLint k, GLfloat *texel )
 {
    /* only return Z, not stencil data */
@@ -1573,7 +1573,7 @@ static void FETCH(f_z24_s8)( const struct swrast_texture_image *texImage,
 
 /* MESA_TEXFORMAT_S8_Z24 ***************************************************/
 
-static void FETCH(f_s8_z24)( const struct swrast_texture_image *texImage,
+static void FETCH(Z24_UNORM_S8_UINT)( const struct swrast_texture_image *texImage,
                              GLint i, GLint j, GLint k, GLfloat *texel )
 {
    /* only return Z, not stencil data */
@@ -1617,7 +1617,7 @@ static void FETCH(R11G11B10_FLOAT)( const struct swrast_texture_image *texImage,
 
 /* MESA_FORMAT_Z32_FLOAT_S8X24_UINT ***********************************************/
 
-static void FETCH(z32f_x24s8)(const struct swrast_texture_image *texImage,
+static void FETCH(Z32_FLOAT_S8X24_UINT)(const struct swrast_texture_image *texImage,
 			      GLint i, GLint j, GLint k, GLfloat *texel)
 {
    const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 2);
-- 
1.7.10.4



More information about the mesa-dev mailing list