diff options
author | Mark Mueller <[email protected]> | 2014-01-20 19:08:54 -0800 |
---|---|---|
committer | Mark Mueller <[email protected]> | 2014-01-27 14:30:50 -0800 |
commit | 50a01d2acafb2a937e62b24258e2e777c0cd1489 (patch) | |
tree | d1dfcc6ca5a577dac6a9ab7d2235434ecdb7d3ce /src/mesa/main/texformat.c | |
parent | ef145ba4ded6aafb28e3bda02fb348e6b8bff12a (diff) |
mesa: Change many Type A MESA_FORMATs to meet naming standard
Update comments. Conversion of the following Type A formats:
s/MESA_FORMAT_RGB888\b/MESA_FORMAT_BGR_UNORM8/g
s/MESA_FORMAT_BGR888\b/MESA_FORMAT_RGB_UNORM8/g
s/MESA_FORMAT_A8\b/MESA_FORMAT_A_UNORM8/g
s/MESA_FORMAT_A16\b/MESA_FORMAT_A_UNORM16/g
s/MESA_FORMAT_L8\b/MESA_FORMAT_L_UNORM8/g
s/MESA_FORMAT_L16\b/MESA_FORMAT_L_UNORM16/g
s/MESA_FORMAT_I8\b/MESA_FORMAT_I_UNORM8/g
s/MESA_FORMAT_I16\b/MESA_FORMAT_I_UNORM16/g
s/MESA_FORMAT_R8\b/MESA_FORMAT_R_UNORM8/g
s/MESA_FORMAT_R16\b/MESA_FORMAT_R_UNORM16/g
s/MESA_FORMAT_Z16\b/MESA_FORMAT_Z_UNORM16/g
s/MESA_FORMAT_Z32\b/MESA_FORMAT_Z_UNORM32/g
s/MESA_FORMAT_S8\b/MESA_FORMAT_S_UINT8/g
s/MESA_FORMAT_SRGB8\b/MESA_FORMAT_BGR_SRGB8/g
s/MESA_FORMAT_RGBA_16\b/MESA_FORMAT_RGBA_UNORM16/g
s/MESA_FORMAT_SL8\b/MESA_FORMAT_L_SRGB8/g
s/MESA_FORMAT_Z32_FLOAT\b/MESA_FORMAT_Z_FLOAT32/g
s/MESA_FORMAT_XBGR16161616_UNORM\b/MESA_FORMAT_RGBX_UNORM16/g
s/MESA_FORMAT_XBGR16161616_SNORM\b/MESA_FORMAT_RGBX_SNORM16/g
s/MESA_FORMAT_XBGR16161616_FLOAT\b/MESA_FORMAT_RGBX_FLOAT16/g
s/MESA_FORMAT_XBGR16161616_UINT\b/MESA_FORMAT_RGBX_UINT16/g
s/MESA_FORMAT_XBGR16161616_SINT\b/MESA_FORMAT_RGBX_SINT16/g
s/MESA_FORMAT_XBGR32323232_FLOAT\b/MESA_FORMAT_RGBX_FLOAT32/g
s/MESA_FORMAT_XBGR32323232_UINT\b/MESA_FORMAT_RGBX_UINT32/g
s/MESA_FORMAT_XBGR32323232_SINT\b/MESA_FORMAT_RGBX_SINT32/g
s/MESA_FORMAT_XBGR8888_UINT\b/MESA_FORMAT_RGBX_UINT8/g
s/MESA_FORMAT_XBGR8888_SINT\b/MESA_FORMAT_RGBX_SINT8/g
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r-- | src/mesa/main/texformat.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 93a6b6d742a..ab31d3ebc1a 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -102,8 +102,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, break; case GL_RGBA12: case GL_RGBA16: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UNORM16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UNORM16); RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; @@ -116,7 +116,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, } /* fallthrough */ case GL_RGB8: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888); + RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; @@ -124,7 +124,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332); RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565); RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888); + RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; @@ -140,8 +140,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_RGB10: case GL_RGB12: case GL_RGB16: - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_UNORM); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_UNORM16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UNORM16); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; @@ -150,13 +150,13 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_ALPHA: case GL_ALPHA4: case GL_ALPHA8: - RETURN_IF_SUPPORTED(MESA_FORMAT_A8); + RETURN_IF_SUPPORTED(MESA_FORMAT_A_UNORM8); break; case GL_ALPHA12: case GL_ALPHA16: - RETURN_IF_SUPPORTED(MESA_FORMAT_A16); - RETURN_IF_SUPPORTED(MESA_FORMAT_A8); + RETURN_IF_SUPPORTED(MESA_FORMAT_A_UNORM16); + RETURN_IF_SUPPORTED(MESA_FORMAT_A_UNORM8); break; /* Luminance formats */ @@ -164,13 +164,13 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_LUMINANCE: case GL_LUMINANCE4: case GL_LUMINANCE8: - RETURN_IF_SUPPORTED(MESA_FORMAT_L8); + RETURN_IF_SUPPORTED(MESA_FORMAT_L_UNORM8); break; case GL_LUMINANCE12: case GL_LUMINANCE16: - RETURN_IF_SUPPORTED(MESA_FORMAT_L16); - RETURN_IF_SUPPORTED(MESA_FORMAT_L8); + RETURN_IF_SUPPORTED(MESA_FORMAT_L_UNORM16); + RETURN_IF_SUPPORTED(MESA_FORMAT_L_UNORM8); break; /* Luminance/Alpha formats */ @@ -196,39 +196,39 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_INTENSITY: case GL_INTENSITY4: case GL_INTENSITY8: - RETURN_IF_SUPPORTED(MESA_FORMAT_I8); + RETURN_IF_SUPPORTED(MESA_FORMAT_I_UNORM8); break; case GL_INTENSITY12: case GL_INTENSITY16: - RETURN_IF_SUPPORTED(MESA_FORMAT_I16); - RETURN_IF_SUPPORTED(MESA_FORMAT_I8); + RETURN_IF_SUPPORTED(MESA_FORMAT_I_UNORM16); + RETURN_IF_SUPPORTED(MESA_FORMAT_I_UNORM8); break; case GL_DEPTH_COMPONENT: case GL_DEPTH_COMPONENT24: case GL_DEPTH_COMPONENT32: - RETURN_IF_SUPPORTED(MESA_FORMAT_Z32); + RETURN_IF_SUPPORTED(MESA_FORMAT_Z_UNORM32); RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24); RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24); break; case GL_DEPTH_COMPONENT16: - RETURN_IF_SUPPORTED(MESA_FORMAT_Z16); + RETURN_IF_SUPPORTED(MESA_FORMAT_Z_UNORM16); RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24); RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24); break; case GL_COMPRESSED_ALPHA_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_A8); + RETURN_IF_SUPPORTED(MESA_FORMAT_A_UNORM8); break; case GL_COMPRESSED_LUMINANCE_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_L8); + RETURN_IF_SUPPORTED(MESA_FORMAT_L_UNORM8); break; case GL_COMPRESSED_LUMINANCE_ALPHA_ARB: RETURN_IF_SUPPORTED(MESA_FORMAT_AL88); break; case GL_COMPRESSED_INTENSITY_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_I8); + RETURN_IF_SUPPORTED(MESA_FORMAT_I_UNORM8); break; case GL_COMPRESSED_RGB_ARB: /* We don't use texture compression for 1D and 1D array textures. @@ -243,7 +243,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1); RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1); } - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888); + RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; @@ -392,14 +392,14 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, break; case GL_RGB16F_ARB: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_FLOAT); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_FLOAT16); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); break; case GL_RGB32F_ARB: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_FLOAT); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_FLOAT32); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); @@ -430,8 +430,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, break; case GL_DEPTH_COMPONENT32F: - ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT]); - return MESA_FORMAT_Z32_FLOAT; + ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z_FLOAT32]); + return MESA_FORMAT_Z_FLOAT32; case GL_DEPTH32F_STENCIL8: ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8]); return MESA_FORMAT_Z32_FLOAT_X24S8; @@ -491,7 +491,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, break; case GL_RGB16_SNORM: RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGB_16); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_SNORM); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_SNORM16); /* FALLTHROUGH */ case GL_RGBA16_SNORM: RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16); @@ -522,7 +522,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_SRGB_EXT: case GL_SRGB8_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8); RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; case GL_SRGB_ALPHA_EXT: @@ -532,7 +532,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, break; case GL_SLUMINANCE_EXT: case GL_SLUMINANCE8_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_SL8); + RETURN_IF_SUPPORTED(MESA_FORMAT_L_SRGB8); RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; case GL_SLUMINANCE_ALPHA_EXT: @@ -541,7 +541,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; case GL_COMPRESSED_SLUMINANCE_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_SL8); + RETURN_IF_SUPPORTED(MESA_FORMAT_L_SRGB8); RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT: @@ -551,7 +551,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_COMPRESSED_SRGB_EXT: if (ctx->Mesa_DXTn) RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1); - RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8); RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); break; case GL_COMPRESSED_SRGB_ALPHA_EXT: @@ -660,32 +660,32 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_RGB8UI_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT8); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR8888_UINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_UINT8); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); break; case GL_RGB16UI_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_UINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_UINT16); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16); break; case GL_RGB32UI_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_UINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_UINT32); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32); break; case GL_RGB8I_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT8); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR8888_SINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_SINT8); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); break; case GL_RGB16I_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT16); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_SINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_SINT16); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); break; case GL_RGB32I_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT32); - RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_SINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX_SINT32); RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); break; case GL_RGBA8UI_EXT: @@ -709,17 +709,17 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_R8: case GL_RED: - RETURN_IF_SUPPORTED(MESA_FORMAT_R8); + RETURN_IF_SUPPORTED(MESA_FORMAT_R_UNORM8); break; case GL_COMPRESSED_RED: if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) RETURN_IF_SUPPORTED(MESA_FORMAT_RED_RGTC1); - RETURN_IF_SUPPORTED(MESA_FORMAT_R8); + RETURN_IF_SUPPORTED(MESA_FORMAT_R_UNORM8); break; case GL_R16: - RETURN_IF_SUPPORTED(MESA_FORMAT_R16); + RETURN_IF_SUPPORTED(MESA_FORMAT_R_UNORM16); break; case GL_RG: |