From a19b19fb946aac6197c92f7a45c4121fc1b7c604 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 8 Mar 2014 18:19:21 -0700 Subject: [PATCH] mesa: rename MESA_FORMAT_X8Z24_UNORM -> MESA_FORMAT_X8_UINT_Z24_UNORM MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To follow the example of MESA_FORMAT_Z24_UNORM_X8_UINT. Reviewed-by: Michel Dänzer Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_surface_formats.c | 2 +- src/mesa/drivers/dri/nouveau/nouveau_util.h | 2 +- src/mesa/main/format_pack.c | 12 ++++++------ src/mesa/main/format_unpack.c | 6 +++--- src/mesa/main/formats.c | 8 ++++---- src/mesa/main/formats.h | 2 +- src/mesa/main/texstore.c | 4 ++-- src/mesa/state_tracker/st_format.c | 4 ++-- src/mesa/swrast/s_depth.c | 4 ++-- src/mesa/swrast/s_texfetch.c | 2 +- src/mesa/swrast/s_texfetch_tmp.h | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c index 0c95e865956..3f64881a176 100644 --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c @@ -361,7 +361,7 @@ brw_format_for_mesa_format(mesa_format mesa_format) [MESA_FORMAT_Z24_UNORM_S8_UINT] = 0, [MESA_FORMAT_Z_UNORM16] = 0, [MESA_FORMAT_Z24_UNORM_X8_UINT] = 0, - [MESA_FORMAT_X8Z24_UNORM] = 0, + [MESA_FORMAT_X8_UINT_Z24_UNORM] = 0, [MESA_FORMAT_Z_UNORM32] = 0, [MESA_FORMAT_S_UINT8] = BRW_SURFACEFORMAT_R8_UINT, diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h index 0efaafadd52..56b819bcff8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_util.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h @@ -59,7 +59,7 @@ pack_zs_i(mesa_format f, uint32_t z, uint8_t s) switch (f) { case MESA_FORMAT_S8_UINT_Z24_UNORM: return (z & 0xffffff00) | (s & 0xff); - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: return (z & 0xffffff00); case MESA_FORMAT_Z_UNORM16: return (z & 0xffff0000) >> 16; diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c index acab6cb8d00..9fbd41746ef 100644 --- a/src/mesa/main/format_pack.c +++ b/src/mesa/main/format_pack.c @@ -1978,7 +1978,7 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format) table[MESA_FORMAT_Z24_UNORM_S8_UINT] = NULL; table[MESA_FORMAT_Z_UNORM16] = NULL; table[MESA_FORMAT_Z24_UNORM_X8_UINT] = NULL; - table[MESA_FORMAT_X8Z24_UNORM] = NULL; + table[MESA_FORMAT_X8_UINT_Z24_UNORM] = NULL; table[MESA_FORMAT_Z_UNORM32] = NULL; table[MESA_FORMAT_S_UINT8] = NULL; @@ -2144,7 +2144,7 @@ _mesa_get_pack_float_rgba_function(mesa_format format) table[MESA_FORMAT_Z24_UNORM_S8_UINT] = NULL; table[MESA_FORMAT_Z_UNORM16] = NULL; table[MESA_FORMAT_Z24_UNORM_X8_UINT] = NULL; - table[MESA_FORMAT_X8Z24_UNORM] = NULL; + table[MESA_FORMAT_X8_UINT_Z24_UNORM] = NULL; table[MESA_FORMAT_Z_UNORM32] = NULL; table[MESA_FORMAT_S_UINT8] = NULL; @@ -2476,7 +2476,7 @@ _mesa_get_pack_float_z_func(mesa_format format) { switch (format) { case MESA_FORMAT_S8_UINT_Z24_UNORM: - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: return pack_float_z_Z24_S8; case MESA_FORMAT_Z24_UNORM_S8_UINT: case MESA_FORMAT_Z24_UNORM_X8_UINT: @@ -2561,7 +2561,7 @@ _mesa_get_pack_uint_z_func(mesa_format format) { switch (format) { case MESA_FORMAT_S8_UINT_Z24_UNORM: - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: return pack_uint_z_Z24_S8; case MESA_FORMAT_Z24_UNORM_S8_UINT: case MESA_FORMAT_Z24_UNORM_X8_UINT: @@ -2647,7 +2647,7 @@ _mesa_pack_float_z_row(mesa_format format, GLuint n, { switch (format) { case MESA_FORMAT_S8_UINT_Z24_UNORM: - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: { /* don't disturb the stencil values */ GLuint *d = ((GLuint *) dst); @@ -2723,7 +2723,7 @@ _mesa_pack_uint_z_row(mesa_format format, GLuint n, { switch (format) { case MESA_FORMAT_S8_UINT_Z24_UNORM: - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: { /* don't disturb the stencil values */ GLuint *d = ((GLuint *) dst); diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 2348ef60583..f85c875e4d7 100644 --- a/src/mesa/main/format_unpack.c +++ b/src/mesa/main/format_unpack.c @@ -2395,7 +2395,7 @@ get_unpack_rgba_function(mesa_format format) table[MESA_FORMAT_Z24_UNORM_S8_UINT] = unpack_S8_Z24; table[MESA_FORMAT_Z_UNORM16] = unpack_Z16; table[MESA_FORMAT_Z24_UNORM_X8_UINT] = unpack_X8_Z24; - table[MESA_FORMAT_X8Z24_UNORM] = unpack_Z24_X8; + table[MESA_FORMAT_X8_UINT_Z24_UNORM] = unpack_Z24_X8; table[MESA_FORMAT_Z_UNORM32] = unpack_Z32; table[MESA_FORMAT_S_UINT8] = unpack_S8; table[MESA_FORMAT_BGR_SRGB8] = unpack_SRGB8; @@ -4012,7 +4012,7 @@ _mesa_unpack_float_z_row(mesa_format format, GLuint n, switch (format) { case MESA_FORMAT_S8_UINT_Z24_UNORM: - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: unpack = unpack_float_z_Z24_X8; break; case MESA_FORMAT_Z24_UNORM_S8_UINT: @@ -4117,7 +4117,7 @@ _mesa_unpack_uint_z_row(mesa_format format, GLuint n, switch (format) { case MESA_FORMAT_S8_UINT_Z24_UNORM: - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: unpack = unpack_uint_z_Z24_X8; break; case MESA_FORMAT_Z24_UNORM_S8_UINT: diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index a61064b901f..c3e80491da7 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -368,8 +368,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 1, 1, 4 /* BlockWidth/Height,Bytes */ }, { - MESA_FORMAT_X8Z24_UNORM, /* Name */ - "MESA_FORMAT_X8Z24_UNORM", /* StrName */ + MESA_FORMAT_X8_UINT_Z24_UNORM, /* Name */ + "MESA_FORMAT_X8_UINT_Z24_UNORM", /* StrName */ GL_DEPTH_COMPONENT, /* BaseFormat */ GL_UNSIGNED_NORMALIZED, /* DataType */ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */ @@ -2518,7 +2518,7 @@ _mesa_format_to_type_and_comps(mesa_format format, *comps = 1; return; - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: *datatype = GL_UNSIGNED_INT; *comps = 1; return; @@ -3160,7 +3160,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format, case MESA_FORMAT_S8_UINT_Z24_UNORM: return format == GL_DEPTH_STENCIL && type == GL_UNSIGNED_INT_24_8 && !swapBytes; - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: case MESA_FORMAT_Z24_UNORM_S8_UINT: return GL_FALSE; diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h index 29609d1b04a..3079f0356cf 100644 --- a/src/mesa/main/formats.h +++ b/src/mesa/main/formats.h @@ -203,7 +203,7 @@ typedef enum MESA_FORMAT_R10G10B10A2_UNORM,/* AABB BBBB BBBB GGGG GGGG GGRR RRRR RRRR */ MESA_FORMAT_S8_UINT_Z24_UNORM,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */ - MESA_FORMAT_X8Z24_UNORM, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */ + MESA_FORMAT_X8_UINT_Z24_UNORM,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */ MESA_FORMAT_Z24_UNORM_S8_UINT,/* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */ MESA_FORMAT_Z24_UNORM_X8_UINT,/* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */ diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 557703d015d..b68ba603ec5 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -1079,7 +1079,7 @@ _mesa_texstore_z24_x8(TEXSTORE_PARAMS) const GLuint depthScale = 0xffffff; (void) dims; - ASSERT(dstFormat == MESA_FORMAT_X8Z24_UNORM); + ASSERT(dstFormat == MESA_FORMAT_X8_UINT_Z24_UNORM); { /* general path */ @@ -3712,7 +3712,7 @@ _mesa_get_texstore_func(mesa_format format) table[MESA_FORMAT_Z24_UNORM_S8_UINT] = _mesa_texstore_s8_z24; table[MESA_FORMAT_Z_UNORM16] = _mesa_texstore_z16; table[MESA_FORMAT_Z24_UNORM_X8_UINT] = _mesa_texstore_x8_z24; - table[MESA_FORMAT_X8Z24_UNORM] = _mesa_texstore_z24_x8; + table[MESA_FORMAT_X8_UINT_Z24_UNORM] = _mesa_texstore_z24_x8; table[MESA_FORMAT_Z_UNORM32] = _mesa_texstore_z32; table[MESA_FORMAT_S_UINT8] = _mesa_texstore_s8; table[MESA_FORMAT_BGR_SRGB8] = _mesa_texstore_srgb8; diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index a55ee307979..cd6b466815c 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -109,7 +109,7 @@ st_mesa_format_to_pipe_format(mesa_format mesaFormat) return PIPE_FORMAT_S8_UINT_Z24_UNORM; case MESA_FORMAT_Z24_UNORM_S8_UINT: return PIPE_FORMAT_Z24_UNORM_S8_UINT; - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: return PIPE_FORMAT_X8Z24_UNORM; case MESA_FORMAT_Z24_UNORM_X8_UINT: return PIPE_FORMAT_Z24X8_UNORM; @@ -470,7 +470,7 @@ st_pipe_format_to_mesa_format(enum pipe_format format) case PIPE_FORMAT_S8_UINT_Z24_UNORM: return MESA_FORMAT_S8_UINT_Z24_UNORM; case PIPE_FORMAT_X8Z24_UNORM: - return MESA_FORMAT_X8Z24_UNORM; + return MESA_FORMAT_X8_UINT_Z24_UNORM; case PIPE_FORMAT_Z24X8_UNORM: return MESA_FORMAT_Z24_UNORM_X8_UINT; case PIPE_FORMAT_Z24_UNORM_S8_UINT: diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index 8c225e11105..134f897c039 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -555,7 +555,7 @@ _swrast_clear_depth_buffer(struct gl_context *ctx) if (rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT || rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT || rb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM || - rb->Format == MESA_FORMAT_X8Z24_UNORM) { + rb->Format == MESA_FORMAT_X8_UINT_Z24_UNORM) { mapMode |= GL_MAP_READ_BIT; } @@ -605,7 +605,7 @@ _swrast_clear_depth_buffer(struct gl_context *ctx) case MESA_FORMAT_Z24_UNORM_S8_UINT: case MESA_FORMAT_Z24_UNORM_X8_UINT: case MESA_FORMAT_S8_UINT_Z24_UNORM: - case MESA_FORMAT_X8Z24_UNORM: + case MESA_FORMAT_X8_UINT_Z24_UNORM: { GLfloat clear = (GLfloat) ctx->Depth.Clear; GLuint clearVal = 0; diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c index dc22838cbd0..cd09827052a 100644 --- a/src/mesa/swrast/s_texfetch.c +++ b/src/mesa/swrast/s_texfetch.c @@ -336,7 +336,7 @@ texfetch_funcs[] = fetch_texel_3d_f_z24_s8 }, { - MESA_FORMAT_X8Z24_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 diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h index 6e3eeb7d9d1..f749b491fd4 100644 --- a/src/mesa/swrast/s_texfetch_tmp.h +++ b/src/mesa/swrast/s_texfetch_tmp.h @@ -1563,7 +1563,7 @@ static void FETCH(f_z24_s8)( const struct swrast_texture_image *texImage, const GLdouble scale = 1.0 / (GLdouble) 0xffffff; texel[0] = (GLfloat) (((*src) >> 8) * scale); ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_UINT_Z24_UNORM || - texImage->Base.TexFormat == MESA_FORMAT_X8Z24_UNORM); + texImage->Base.TexFormat == MESA_FORMAT_X8_UINT_Z24_UNORM); ASSERT(texel[0] >= 0.0F); ASSERT(texel[0] <= 1.0F); } -- 2.30.2