diff options
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r-- | src/mesa/main/texformat.c | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index ab31d3ebc1a..7137c5fc9c5 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -70,11 +70,11 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case 4: case GL_RGBA: if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV) { - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444); + RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM); } else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) { - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555); + RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM); } else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) { - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010); + RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM); } RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); @@ -85,19 +85,19 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; case GL_RGB5_A1: - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555); + RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM); break; case GL_RGBA2: - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_REV); /* just to test another format*/ - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444); + RETURN_IF_SUPPORTED(MESA_FORMAT_A4R4G4B4_UNORM); /* just to test another format*/ + RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM); break; case GL_RGBA4: - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444); + RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM); break; /* deep RGBA formats */ case GL_RGB10_A2: - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010); + RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; case GL_RGBA12: @@ -112,7 +112,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case 3: case GL_RGB: if (type == GL_UNSIGNED_INT_2_10_10_10_REV) { - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010); + RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM); } /* fallthrough */ case GL_RGB8: @@ -121,19 +121,19 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; case GL_R3_G3_B2: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565); - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); + RETURN_IF_SUPPORTED(MESA_FORMAT_B2G3R3_UNORM); + RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM); + RETURN_IF_SUPPORTED(MESA_FORMAT_R5G6B5_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM); RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM); break; case GL_RGB4: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); /* just to test another format */ - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565); + RETURN_IF_SUPPORTED(MESA_FORMAT_R5G6B5_UNORM); /* just to test another format */ + RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM); break; case GL_RGB5: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565); + RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM); break; /* deep RGB formats */ @@ -175,22 +175,22 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, /* Luminance/Alpha formats */ case GL_LUMINANCE4_ALPHA4: - RETURN_IF_SUPPORTED(MESA_FORMAT_AL44); - RETURN_IF_SUPPORTED(MESA_FORMAT_AL88); + RETURN_IF_SUPPORTED(MESA_FORMAT_L4A4_UNORM); + RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM); break; case 2: case GL_LUMINANCE_ALPHA: case GL_LUMINANCE6_ALPHA2: case GL_LUMINANCE8_ALPHA8: - RETURN_IF_SUPPORTED(MESA_FORMAT_AL88); + RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM); break; case GL_LUMINANCE12_ALPHA4: case GL_LUMINANCE12_ALPHA12: case GL_LUMINANCE16_ALPHA16: - RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616); - RETURN_IF_SUPPORTED(MESA_FORMAT_AL88); + RETURN_IF_SUPPORTED(MESA_FORMAT_L16A16_UNORM); + RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM); break; case GL_INTENSITY: @@ -209,13 +209,13 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_DEPTH_COMPONENT24: case GL_DEPTH_COMPONENT32: RETURN_IF_SUPPORTED(MESA_FORMAT_Z_UNORM32); - RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24); - RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24); + RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_UINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT); break; case GL_DEPTH_COMPONENT16: RETURN_IF_SUPPORTED(MESA_FORMAT_Z_UNORM16); - RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24); - RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24); + RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_UINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT); break; case GL_COMPRESSED_ALPHA_ARB: @@ -225,7 +225,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_L_UNORM8); break; case GL_COMPRESSED_LUMINANCE_ALPHA_ARB: - RETURN_IF_SUPPORTED(MESA_FORMAT_AL88); + RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM); break; case GL_COMPRESSED_INTENSITY_ARB: RETURN_IF_SUPPORTED(MESA_FORMAT_I_UNORM8); @@ -259,7 +259,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, break; case GL_RGB565: - RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565); + RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM); break; case GL_YCBCR_MESA: @@ -415,26 +415,26 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_RGB9_E5: /* GL_EXT_texture_shared_exponent -- just one format to support */ - ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_RGB9_E5_FLOAT]); - return MESA_FORMAT_RGB9_E5_FLOAT; + ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R9G9B9E5_FLOAT]); + return MESA_FORMAT_R9G9B9E5_FLOAT; case GL_R11F_G11F_B10F: /* GL_EXT_texture_packed_float -- just one format to support */ - ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R11_G11_B10_FLOAT]); - return MESA_FORMAT_R11_G11_B10_FLOAT; + ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R11G11B10_FLOAT]); + return MESA_FORMAT_R11G11B10_FLOAT; case GL_DEPTH_STENCIL_EXT: case GL_DEPTH24_STENCIL8_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_S8); - RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24); + RETURN_IF_SUPPORTED(MESA_FORMAT_S8_UINT_Z24_UNORM); + RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT); break; case GL_DEPTH_COMPONENT32F: 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; + ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_S8X24_UINT]); + return MESA_FORMAT_Z32_FLOAT_S8X24_UINT; case GL_DUDV_ATI: case GL_DU8DV8_ATI: @@ -523,42 +523,42 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_SRGB_EXT: case GL_SRGB8_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8); - RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB); break; case GL_SRGB_ALPHA_EXT: case GL_SRGB8_ALPHA8_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8); - RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB); + RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB); break; case GL_SLUMINANCE_EXT: case GL_SLUMINANCE8_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_L_SRGB8); - RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB); break; case GL_SLUMINANCE_ALPHA_EXT: case GL_SLUMINANCE8_ALPHA8_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8); - RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_SRGB); + RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB); break; case GL_COMPRESSED_SLUMINANCE_EXT: RETURN_IF_SUPPORTED(MESA_FORMAT_L_SRGB8); - RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB); break; case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT: - RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8); - RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_SRGB); + RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB); break; case GL_COMPRESSED_SRGB_EXT: if (ctx->Mesa_DXTn) RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1); RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8); - RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB); break; case GL_COMPRESSED_SRGB_ALPHA_EXT: if (ctx->Mesa_DXTn) RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */ - RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8); - RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8); + RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB); + RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB); break; case GL_ALPHA8UI_EXT: @@ -724,17 +724,17 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_RG: case GL_RG8: - RETURN_IF_SUPPORTED(MESA_FORMAT_GR88); + RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8_UNORM); break; case GL_COMPRESSED_RG: if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2); - RETURN_IF_SUPPORTED(MESA_FORMAT_GR88); + RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8_UNORM); break; case GL_RG16: - RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616); + RETURN_IF_SUPPORTED(MESA_FORMAT_R16G16_UNORM); break; case GL_R16F: @@ -804,8 +804,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, break; case GL_RGB10_A2UI: - RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010_UINT); - RETURN_IF_SUPPORTED(MESA_FORMAT_ABGR2101010_UINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UINT); + RETURN_IF_SUPPORTED(MESA_FORMAT_R10G10B10A2_UINT); break; case GL_BGRA: |