diff options
Diffstat (limited to 'src/mesa/drivers')
51 files changed, 215 insertions, 215 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index e8c0d91e264..5320ec06d1e 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -811,17 +811,17 @@ driGLFormatToImageFormat(mesa_format format) switch (format) { case MESA_FORMAT_RGB565: return __DRI_IMAGE_FORMAT_RGB565; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return __DRI_IMAGE_FORMAT_XRGB8888; case MESA_FORMAT_ARGB2101010: return __DRI_IMAGE_FORMAT_ARGB2101010; case MESA_FORMAT_XRGB2101010_UNORM: return __DRI_IMAGE_FORMAT_XRGB2101010; - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return __DRI_IMAGE_FORMAT_ARGB8888; - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: return __DRI_IMAGE_FORMAT_ABGR8888; - case MESA_FORMAT_RGBX8888_REV: + case MESA_FORMAT_R8G8B8X8_UNORM: return __DRI_IMAGE_FORMAT_XBGR8888; case MESA_FORMAT_R8: return __DRI_IMAGE_FORMAT_R8; @@ -843,17 +843,17 @@ driImageFormatToGLFormat(uint32_t image_format) case __DRI_IMAGE_FORMAT_RGB565: return MESA_FORMAT_RGB565; case __DRI_IMAGE_FORMAT_XRGB8888: - return MESA_FORMAT_XRGB8888; + return MESA_FORMAT_B8G8R8X8_UNORM; case __DRI_IMAGE_FORMAT_ARGB2101010: return MESA_FORMAT_ARGB2101010; case __DRI_IMAGE_FORMAT_XRGB2101010: return MESA_FORMAT_XRGB2101010_UNORM; case __DRI_IMAGE_FORMAT_ARGB8888: - return MESA_FORMAT_ARGB8888; + return MESA_FORMAT_B8G8R8A8_UNORM; case __DRI_IMAGE_FORMAT_ABGR8888: - return MESA_FORMAT_RGBA8888_REV; + return MESA_FORMAT_R8G8B8A8_UNORM; case __DRI_IMAGE_FORMAT_XBGR8888: - return MESA_FORMAT_RGBX8888_REV; + return MESA_FORMAT_R8G8B8X8_UNORM; case __DRI_IMAGE_FORMAT_R8: return MESA_FORMAT_R8; case __DRI_IMAGE_FORMAT_GR88: diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 06981c20bc8..b18256e355d 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -186,9 +186,9 @@ driCreateConfigs(mesa_format format, static const uint32_t masks_table[][4] = { /* MESA_FORMAT_RGB565 */ { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, - /* MESA_FORMAT_XRGB8888 */ + /* MESA_FORMAT_B8G8R8X8_UNORM */ { 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 }, - /* MESA_FORMAT_ARGB8888 */ + /* MESA_FORMAT_B8G8R8A8_UNORM */ { 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 }, /* MESA_FORMAT_XRGB2101010_UNORM */ { 0x3FF00000, 0x000FFC00, 0x000003FF, 0x00000000 }, @@ -212,10 +212,10 @@ driCreateConfigs(mesa_format format, case MESA_FORMAT_RGB565: masks = masks_table[0]; break; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: masks = masks_table[1]; break; - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: case MESA_FORMAT_SARGB8: masks = masks_table[2]; break; diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c index 8bad12676ea..d6aaf453327 100644 --- a/src/mesa/drivers/dri/i915/i830_texstate.c +++ b/src/mesa/drivers/dri/i915/i830_texstate.c @@ -57,9 +57,9 @@ translate_texture_format(GLuint mesa_format) return MAPSURF_16BIT | MT_16BIT_ARGB1555; case MESA_FORMAT_ARGB4444: return MAPSURF_16BIT | MT_16BIT_ARGB4444; - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return MAPSURF_32BIT | MT_32BIT_ARGB8888; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return MAPSURF_32BIT | MT_32BIT_XRGB8888; case MESA_FORMAT_YCBCR_REV: return (MAPSURF_422 | MT_422_YCRCB_NORMAL); diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c index c9effad6812..3da4dbe8de2 100644 --- a/src/mesa/drivers/dri/i915/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c @@ -582,8 +582,8 @@ i830_destroy_context(struct intel_context *intel) static uint32_t i830_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] = { - [MESA_FORMAT_ARGB8888] = DV_PF_8888, - [MESA_FORMAT_XRGB8888] = DV_PF_8888, + [MESA_FORMAT_B8G8R8A8_UNORM] = DV_PF_8888, + [MESA_FORMAT_B8G8R8X8_UNORM] = DV_PF_8888, [MESA_FORMAT_RGB565] = DV_PF_565, [MESA_FORMAT_ARGB1555] = DV_PF_1555, [MESA_FORMAT_ARGB4444] = DV_PF_4444, diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 035a8f811d9..a11a01002f7 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -99,10 +99,10 @@ intel_init_texture_formats(struct gl_context *ctx) struct intel_context *intel = intel_context(ctx); struct intel_screen *intel_screen = intel->intelScreen; - ctx->TextureFormatSupported[MESA_FORMAT_ARGB8888] = true; + ctx->TextureFormatSupported[MESA_FORMAT_B8G8R8A8_UNORM] = true; if (intel_screen->deviceID != PCI_CHIP_I830_M && intel_screen->deviceID != PCI_CHIP_845_G) - ctx->TextureFormatSupported[MESA_FORMAT_XRGB8888] = true; + ctx->TextureFormatSupported[MESA_FORMAT_B8G8R8X8_UNORM] = true; if (intel->gen == 3) ctx->TextureFormatSupported[MESA_FORMAT_SARGB8] = true; ctx->TextureFormatSupported[MESA_FORMAT_ARGB4444] = true; diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index 40bd48a2401..3e10de36cbd 100644 --- a/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/src/mesa/drivers/dri/i915/i915_texstate.c @@ -57,11 +57,11 @@ translate_texture_format(mesa_format mesa_format, GLenum DepthMode) case MESA_FORMAT_ARGB4444: return MAPSURF_16BIT | MT_16BIT_ARGB4444; case MESA_FORMAT_SARGB8: - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return MAPSURF_32BIT | MT_32BIT_ARGB8888; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return MAPSURF_32BIT | MT_32BIT_XRGB8888; - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: return MAPSURF_32BIT | MT_32BIT_ABGR8888; case MESA_FORMAT_YCBCR_REV: return (MAPSURF_422 | MT_422_YCRCB_NORMAL); diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 137ca76a347..bc1ee55b895 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -549,8 +549,8 @@ i915_set_buf_info_for_region(uint32_t *state, struct intel_region *region, static uint32_t i915_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] = { - [MESA_FORMAT_ARGB8888] = DV_PF_8888, - [MESA_FORMAT_XRGB8888] = DV_PF_8888, + [MESA_FORMAT_B8G8R8A8_UNORM] = DV_PF_8888, + [MESA_FORMAT_B8G8R8X8_UNORM] = DV_PF_8888, [MESA_FORMAT_RGB565] = DV_PF_565 | DITHER_FULL_ALWAYS, [MESA_FORMAT_ARGB1555] = DV_PF_1555 | DITHER_FULL_ALWAYS, [MESA_FORMAT_ARGB4444] = DV_PF_4444 | DITHER_FULL_ALWAYS, diff --git a/src/mesa/drivers/dri/i915/intel_blit.c b/src/mesa/drivers/dri/i915/intel_blit.c index 267b096aeff..d4d6b430fbe 100644 --- a/src/mesa/drivers/dri/i915/intel_blit.c +++ b/src/mesa/drivers/dri/i915/intel_blit.c @@ -129,10 +129,10 @@ intel_miptree_blit(struct intel_context *intel, * channel to 1.0 at the end. */ if (src_format != dst_format && - ((src_format != MESA_FORMAT_ARGB8888 && - src_format != MESA_FORMAT_XRGB8888) || - (dst_format != MESA_FORMAT_ARGB8888 && - dst_format != MESA_FORMAT_XRGB8888))) { + ((src_format != MESA_FORMAT_B8G8R8A8_UNORM && + src_format != MESA_FORMAT_B8G8R8X8_UNORM) || + (dst_format != MESA_FORMAT_B8G8R8A8_UNORM && + dst_format != MESA_FORMAT_B8G8R8X8_UNORM))) { perf_debug("%s: Can't use hardware blitter from %s to %s, " "falling back.\n", __FUNCTION__, _mesa_get_format_name(src_format), @@ -201,8 +201,8 @@ intel_miptree_blit(struct intel_context *intel, return false; } - if (src_mt->format == MESA_FORMAT_XRGB8888 && - dst_mt->format == MESA_FORMAT_ARGB8888) { + if (src_mt->format == MESA_FORMAT_B8G8R8X8_UNORM && + dst_mt->format == MESA_FORMAT_B8G8R8A8_UNORM) { intel_miptree_set_alpha_to_one(intel, dst_mt, dst_x, dst_y, width, height); @@ -450,8 +450,8 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask) _mesa_unclamped_float_rgba_to_ubyte(clear, color); switch (intel_rb_format(irb)) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: clear_val = PACK_COLOR_8888(clear[3], clear[0], clear[1], clear[2]); break; diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c index 2b82bb151a0..735f3460f6a 100644 --- a/src/mesa/drivers/dri/i915/intel_fbo.c +++ b/src/mesa/drivers/dri/i915/intel_fbo.c @@ -238,7 +238,7 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx, /* __DRIimage is opaque to the core so it has to be checked here */ switch (image->format) { - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: _mesa_error(&intel->ctx, GL_INVALID_OPERATION, "glEGLImageTargetRenderbufferStorage(unsupported image format"); return; diff --git a/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c index 775d6d28026..09ced23a8b3 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c +++ b/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c @@ -228,8 +228,8 @@ do_blit_bitmap( struct gl_context *ctx, UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[3], tmpColor[3]); switch (irb->mt->format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]); break; case MESA_FORMAT_RGB565: diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index f921d29935b..053e73a5e95 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -124,8 +124,8 @@ aub_dump_bmp(struct gl_context *ctx) enum aub_dump_bmp_format format; switch (irb->Base.Base.Format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: format = AUB_DUMP_BMP_FORMAT_ARGB_8888; break; default: @@ -861,9 +861,9 @@ intelCreateBuffer(__DRIscreen * driScrnPriv, else if (mesaVis->sRGBCapable) rgbFormat = MESA_FORMAT_SARGB8; else if (mesaVis->alphaBits == 0) - rgbFormat = MESA_FORMAT_XRGB8888; + rgbFormat = MESA_FORMAT_B8G8R8X8_UNORM; else - rgbFormat = MESA_FORMAT_ARGB8888; + rgbFormat = MESA_FORMAT_B8G8R8A8_UNORM; /* setup the hardware-based renderbuffers */ rb = intel_create_renderbuffer(rgbFormat); @@ -1044,7 +1044,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen) { static const mesa_format formats[] = { MESA_FORMAT_RGB565, - MESA_FORMAT_ARGB8888 + MESA_FORMAT_B8G8R8A8_UNORM }; /* GLX_SWAP_COPY_OML is not supported due to page flipping. */ diff --git a/src/mesa/drivers/dri/i915/intel_tex_image.c b/src/mesa/drivers/dri/i915/intel_tex_image.c index fc23a5ee02c..6aa11411439 100644 --- a/src/mesa/drivers/dri/i915/intel_tex_image.c +++ b/src/mesa/drivers/dri/i915/intel_tex_image.c @@ -309,11 +309,11 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, if (rb->mt->cpp == 4) { if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { internalFormat = GL_RGB; - texFormat = MESA_FORMAT_XRGB8888; + texFormat = MESA_FORMAT_B8G8R8X8_UNORM; } else { internalFormat = GL_RGBA; - texFormat = MESA_FORMAT_ARGB8888; + texFormat = MESA_FORMAT_B8G8R8A8_UNORM; } } else if (rb->mt->cpp == 2) { internalFormat = GL_RGB; diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index 00f37b37469..d8df4afd08f 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -207,10 +207,10 @@ color_formats_match(mesa_format src_format, mesa_format dst_format) * (overriding alpha to 1.0 via blending). */ return linear_src_format == linear_dst_format || - (linear_src_format == MESA_FORMAT_XRGB8888 && - linear_dst_format == MESA_FORMAT_ARGB8888) || - (linear_src_format == MESA_FORMAT_ARGB8888 && - linear_dst_format == MESA_FORMAT_XRGB8888); + (linear_src_format == MESA_FORMAT_B8G8R8X8_UNORM && + linear_dst_format == MESA_FORMAT_B8G8R8A8_UNORM) || + (linear_src_format == MESA_FORMAT_B8G8R8A8_UNORM && + linear_dst_format == MESA_FORMAT_B8G8R8X8_UNORM); } static bool diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 00105216e92..b82f76f72cc 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -892,7 +892,7 @@ intel_gles3_srgb_workaround(struct brw_context *brw, for (int i = 0; i < BUFFER_COUNT; i++) { if (fb->Attachment[i].Renderbuffer && fb->Attachment[i].Renderbuffer->Format == MESA_FORMAT_SARGB8) { - fb->Attachment[i].Renderbuffer->Format = MESA_FORMAT_ARGB8888; + fb->Attachment[i].Renderbuffer->Format = MESA_FORMAT_B8G8R8A8_UNORM; } } } diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c index ebbd335c536..566d68834f7 100644 --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c @@ -319,14 +319,14 @@ brw_format_for_mesa_format(mesa_format mesa_format) */ static const uint32_t table[MESA_FORMAT_COUNT] = { - [MESA_FORMAT_RGBA8888] = 0, - [MESA_FORMAT_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM, - [MESA_FORMAT_ARGB8888] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM, - [MESA_FORMAT_ARGB8888_REV] = 0, - [MESA_FORMAT_RGBX8888] = 0, - [MESA_FORMAT_RGBX8888_REV] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM, - [MESA_FORMAT_XRGB8888] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM, - [MESA_FORMAT_XRGB8888_REV] = 0, + [MESA_FORMAT_A8B8G8R8_UNORM] = 0, + [MESA_FORMAT_R8G8B8A8_UNORM] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM, + [MESA_FORMAT_B8G8R8A8_UNORM] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM, + [MESA_FORMAT_A8R8G8B8_UNORM] = 0, + [MESA_FORMAT_X8B8G8R8_UNORM] = 0, + [MESA_FORMAT_R8G8B8X8_UNORM] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM, + [MESA_FORMAT_B8G8R8X8_UNORM] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM, + [MESA_FORMAT_X8R8G8B8_UNORM] = 0, [MESA_FORMAT_RGB888] = 0, [MESA_FORMAT_BGR888] = BRW_SURFACEFORMAT_R8G8B8_UNORM, [MESA_FORMAT_RGB565] = BRW_SURFACEFORMAT_B5G6R5_UNORM, diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c index 82720d174dd..b12ecca366d 100644 --- a/src/mesa/drivers/dri/i965/intel_blit.c +++ b/src/mesa/drivers/dri/i965/intel_blit.c @@ -171,10 +171,10 @@ intel_miptree_blit(struct brw_context *brw, * channel to 1.0 at the end. */ if (src_format != dst_format && - ((src_format != MESA_FORMAT_ARGB8888 && - src_format != MESA_FORMAT_XRGB8888) || - (dst_format != MESA_FORMAT_ARGB8888 && - dst_format != MESA_FORMAT_XRGB8888))) { + ((src_format != MESA_FORMAT_B8G8R8A8_UNORM && + src_format != MESA_FORMAT_B8G8R8X8_UNORM) || + (dst_format != MESA_FORMAT_B8G8R8A8_UNORM && + dst_format != MESA_FORMAT_B8G8R8X8_UNORM))) { perf_debug("%s: Can't use hardware blitter from %s to %s, " "falling back.\n", __FUNCTION__, _mesa_get_format_name(src_format), @@ -271,8 +271,8 @@ intel_miptree_blit(struct brw_context *brw, return false; } - if (src_mt->format == MESA_FORMAT_XRGB8888 && - dst_mt->format == MESA_FORMAT_ARGB8888) { + if (src_mt->format == MESA_FORMAT_B8G8R8X8_UNORM && + dst_mt->format == MESA_FORMAT_B8G8R8A8_UNORM) { intel_miptree_set_alpha_to_one(brw, dst_mt, dst_x, dst_y, width, height); diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 7f6db9ddc65..961bbc28386 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -269,7 +269,7 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx, /* __DRIimage is opaque to the core so it has to be checked here */ switch (image->format) { - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: _mesa_error(ctx, GL_INVALID_OPERATION, "glEGLImageTargetRenderbufferStorage(unsupported image format"); return; diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index cadf622e587..9f3c9a76f07 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -504,10 +504,10 @@ intel_miptree_create(struct brw_context *brw, if (brw->gen < 8 && !brw->is_baytrail) { switch (format) { case MESA_FORMAT_ETC1_RGB8: - format = MESA_FORMAT_RGBX8888_REV; + format = MESA_FORMAT_R8G8B8X8_UNORM; break; case MESA_FORMAT_ETC2_RGB8: - format = MESA_FORMAT_RGBX8888_REV; + format = MESA_FORMAT_R8G8B8X8_UNORM; break; case MESA_FORMAT_ETC2_SRGB8: case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC: @@ -516,7 +516,7 @@ intel_miptree_create(struct brw_context *brw, break; case MESA_FORMAT_ETC2_RGBA8_EAC: case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1: - format = MESA_FORMAT_RGBA8888_REV; + format = MESA_FORMAT_R8G8B8A8_UNORM; break; case MESA_FORMAT_ETC2_R11_EAC: format = MESA_FORMAT_R16; @@ -2004,7 +2004,7 @@ intel_miptree_map_etc(struct brw_context *brw, { assert(mt->etc_format != MESA_FORMAT_NONE); if (mt->etc_format == MESA_FORMAT_ETC1_RGB8) { - assert(mt->format == MESA_FORMAT_RGBX8888_REV); + assert(mt->format == MESA_FORMAT_R8G8B8X8_UNORM); } assert(map->mode & GL_MAP_WRITE_BIT); diff --git a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c index e8977c4cc54..34edc246cc3 100644 --- a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c +++ b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c @@ -229,8 +229,8 @@ do_blit_bitmap( struct gl_context *ctx, UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[3], tmpColor[3]); switch (_mesa_get_render_format(ctx, intel_rb_format(irb))) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]); break; case MESA_FORMAT_RGB565: diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index f5b8aa57b0a..2f2d478d156 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -135,8 +135,8 @@ aub_dump_bmp(struct gl_context *ctx) enum aub_dump_bmp_format format; switch (irb->Base.Base.Format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: format = AUB_DUMP_BMP_FORMAT_ARGB_8888; break; default: @@ -980,7 +980,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv, else if (mesaVis->sRGBCapable) rgbFormat = MESA_FORMAT_SARGB8; else if (mesaVis->alphaBits == 0) - rgbFormat = MESA_FORMAT_XRGB8888; + rgbFormat = MESA_FORMAT_B8G8R8X8_UNORM; else { rgbFormat = MESA_FORMAT_SARGB8; fb->Visual.sRGBCapable = true; @@ -1126,7 +1126,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen) { static const mesa_format formats[] = { MESA_FORMAT_RGB565, - MESA_FORMAT_ARGB8888 + MESA_FORMAT_B8G8R8A8_UNORM }; /* GLX_SWAP_COPY_OML is not supported due to page flipping. */ diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index b774efe820e..40095312f3f 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -300,11 +300,11 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, if (rb->mt->cpp == 4) { if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { internalFormat = GL_RGB; - texFormat = MESA_FORMAT_XRGB8888; + texFormat = MESA_FORMAT_B8G8R8X8_UNORM; } else { internalFormat = GL_RGBA; - texFormat = MESA_FORMAT_ARGB8888; + texFormat = MESA_FORMAT_B8G8R8A8_UNORM; } } else if (rb->mt->cpp == 2) { internalFormat = GL_RGB; diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c index f1de6c96bfd..1def8ca9f58 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c @@ -576,8 +576,8 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx, (texImage->TexFormat == MESA_FORMAT_A8 && format == GL_ALPHA)) { cpp = 1; mem_copy = memcpy; - } else if ((texImage->TexFormat == MESA_FORMAT_ARGB8888) || - (texImage->TexFormat == MESA_FORMAT_XRGB8888)) { + } else if ((texImage->TexFormat == MESA_FORMAT_B8G8R8A8_UNORM) || + (texImage->TexFormat == MESA_FORMAT_B8G8R8X8_UNORM)) { cpp = 4; if (format == GL_BGRA) { mem_copy = memcpy; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c index 43651bf4950..72af5365c86 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c @@ -44,13 +44,13 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat) case GL_RGB: case GL_RGB8: rb->_BaseFormat = GL_RGB; - rb->Format = MESA_FORMAT_XRGB8888; + rb->Format = MESA_FORMAT_B8G8R8X8_UNORM; s->cpp = 4; break; case GL_RGBA: case GL_RGBA8: rb->_BaseFormat = GL_RGBA; - rb->Format = MESA_FORMAT_ARGB8888; + rb->Format = MESA_FORMAT_B8G8R8A8_UNORM; s->cpp = 4; break; case GL_RGB5: @@ -272,8 +272,8 @@ static int validate_format_bpp(mesa_format format) { switch (format) { - case MESA_FORMAT_XRGB8888: - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: + case MESA_FORMAT_B8G8R8A8_UNORM: case MESA_FORMAT_Z24_S8: return 32; case MESA_FORMAT_RGB565: diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 7117f51fc0e..4ec4b675b31 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -54,8 +54,8 @@ nouveau_get_configs(void) static const mesa_format formats[3] = { MESA_FORMAT_RGB565, - MESA_FORMAT_ARGB8888, - MESA_FORMAT_XRGB8888, + MESA_FORMAT_B8G8R8A8_UNORM, + MESA_FORMAT_B8G8R8X8_UNORM, }; const GLenum back_buffer_modes[] = { diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index dfa6d12907a..1a637cc0495 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c @@ -175,7 +175,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_RGBA16: case GL_RGB10_A2: case GL_COMPRESSED_RGBA: - return MESA_FORMAT_ARGB8888; + return MESA_FORMAT_B8G8R8A8_UNORM; case GL_RGB5_A1: return MESA_FORMAT_ARGB1555; @@ -185,7 +185,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_RGB12: case GL_RGB16: case GL_COMPRESSED_RGB: - return MESA_FORMAT_XRGB8888; + return MESA_FORMAT_B8G8R8X8_UNORM; case 3: case GL_R3_G3_B2: case GL_RGB4: @@ -201,7 +201,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target, case GL_LUMINANCE16_ALPHA16: case GL_LUMINANCE8_ALPHA8: case GL_COMPRESSED_LUMINANCE_ALPHA: - return MESA_FORMAT_ARGB8888; + return MESA_FORMAT_B8G8R8A8_UNORM; case 1: case GL_LUMINANCE: @@ -589,9 +589,9 @@ get_texbuffer_format(struct gl_renderbuffer *rb, GLint format) if (s->cpp < 4) return s->format; else if (format == __DRI_TEXTURE_FORMAT_RGBA) - return MESA_FORMAT_ARGB8888; + return MESA_FORMAT_B8G8R8A8_UNORM; else - return MESA_FORMAT_XRGB8888; + return MESA_FORMAT_B8G8R8X8_UNORM; } void diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h index 6905c42c627..13dc0f936fb 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_util.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h @@ -34,17 +34,17 @@ static inline unsigned pack_rgba_i(mesa_format f, uint8_t c[]) { switch (f) { - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return PACK_COLOR_8888(c[ACOMP], c[RCOMP], c[GCOMP], c[BCOMP]); - case MESA_FORMAT_ARGB8888_REV: + case MESA_FORMAT_A8R8G8B8_UNORM: return PACK_COLOR_8888(c[BCOMP], c[GCOMP], c[RCOMP], c[ACOMP]); - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return PACK_COLOR_8888(0, c[RCOMP], c[GCOMP], c[BCOMP]); - case MESA_FORMAT_XRGB8888_REV: + case MESA_FORMAT_X8R8G8B8_UNORM: return PACK_COLOR_8888(c[BCOMP], c[GCOMP], c[RCOMP], 0); - case MESA_FORMAT_RGBA8888: + case MESA_FORMAT_A8B8G8R8_UNORM: return PACK_COLOR_8888(c[RCOMP], c[GCOMP], c[BCOMP], c[ACOMP]); - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: return PACK_COLOR_8888(c[ACOMP], c[BCOMP], c[GCOMP], c[RCOMP]); case MESA_FORMAT_RGB565: return PACK_COLOR_565(c[RCOMP], c[GCOMP], c[BCOMP]); diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c index 6cd191e7a78..21399532232 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_context.c +++ b/src/mesa/drivers/dri/nouveau/nv04_context.c @@ -114,7 +114,7 @@ init_dummy_texture(struct gl_context *ctx) nouveau_surface_alloc(ctx, s, SWIZZLED, NOUVEAU_BO_MAP | NOUVEAU_BO_VRAM, - MESA_FORMAT_ARGB8888, 1, 1); + MESA_FORMAT_B8G8R8A8_UNORM, 1, 1); nouveau_bo_map(s->bo, NOUVEAU_BO_WR, context_client(ctx)); *(uint32_t *)s->bo->map = 0xffffffff; diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c index fcf9fdf59c6..d3253bae88e 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c @@ -35,9 +35,9 @@ static inline unsigned get_rt_format(mesa_format format) { switch (format) { - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8; - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8; case MESA_FORMAT_RGB565: return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5; diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c index d0245da8ab9..61e259f388a 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c @@ -294,6 +294,6 @@ nv04_emit_tex_env(struct gl_context *ctx, int emit) /* update calculated multitex state */ nv04->alpha[i] = rc_a.hw; nv04->color[i] = rc_c.hw; - nv04->factor = pack_rgba_f(MESA_FORMAT_ARGB8888, + nv04->factor = pack_rgba_f(MESA_FORMAT_B8G8R8A8_UNORM, ctx->Texture.Unit[0].EnvColor); } diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c index ed21e540501..41261195d81 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c @@ -222,6 +222,6 @@ nv04_emit_blend(struct gl_context *ctx, int emit) /* Fog. */ if (ctx->Fog.Enabled) { nv04->blend |= NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE; - nv04->fog = pack_rgba_f(MESA_FORMAT_ARGB8888, ctx->Fog.Color); + nv04->fog = pack_rgba_f(MESA_FORMAT_B8G8R8A8_UNORM, ctx->Fog.Color); } } diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c index e4d695a34be..ae9548969fb 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c @@ -48,9 +48,9 @@ get_tex_format(struct gl_texture_image *ti) return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4; case MESA_FORMAT_RGB565: return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5; - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X8R8G8B8; default: assert(0); diff --git a/src/mesa/drivers/dri/nouveau/nv04_surface.c b/src/mesa/drivers/dri/nouveau/nv04_surface.c index 153cc9b32d8..c8390717051 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_surface.c +++ b/src/mesa/drivers/dri/nouveau/nv04_surface.c @@ -57,11 +57,11 @@ swzsurf_format(mesa_format format) case MESA_FORMAT_Z16: return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_R5G6B5; - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_RGBA8888_REV: - case MESA_FORMAT_XRGB8888: - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_ARGB8888_REV: + case MESA_FORMAT_A8B8G8R8_UNORM: + case MESA_FORMAT_R8G8B8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_A8R8G8B8_UNORM: case MESA_FORMAT_S8_Z24: case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z32: @@ -96,11 +96,11 @@ surf2d_format(mesa_format format) case MESA_FORMAT_Z16: return NV04_CONTEXT_SURFACES_2D_FORMAT_R5G6B5; - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_RGBA8888_REV: - case MESA_FORMAT_XRGB8888: - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_ARGB8888_REV: + case MESA_FORMAT_A8B8G8R8_UNORM: + case MESA_FORMAT_R8G8B8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_A8R8G8B8_UNORM: case MESA_FORMAT_S8_Z24: case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z32: @@ -135,11 +135,11 @@ rect_format(mesa_format format) case MESA_FORMAT_Z16: return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A16R5G6B5; - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_RGBA8888_REV: - case MESA_FORMAT_XRGB8888: - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_ARGB8888_REV: + case MESA_FORMAT_A8B8G8R8_UNORM: + case MESA_FORMAT_R8G8B8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_A8R8G8B8_UNORM: case MESA_FORMAT_S8_Z24: case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z32: @@ -174,11 +174,11 @@ sifm_format(mesa_format format) case MESA_FORMAT_Z16: return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_R5G6B5; - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_RGBA8888_REV: - case MESA_FORMAT_XRGB8888: - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_ARGB8888_REV: + case MESA_FORMAT_A8B8G8R8_UNORM: + case MESA_FORMAT_R8G8B8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_A8R8G8B8_UNORM: case MESA_FORMAT_S8_Z24: case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z32: diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c index 3fce2e33743..9badefa3db6 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c @@ -36,9 +36,9 @@ static inline unsigned get_rt_format(mesa_format format) { switch (format) { - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return NV10_3D_RT_FORMAT_COLOR_X8R8G8B8; - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8; case MESA_FORMAT_RGB565: return NV10_3D_RT_FORMAT_COLOR_R5G6B5; diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c index b6ccf45242e..f71cb0d28a4 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c @@ -185,7 +185,7 @@ get_input_arg(struct combiner_state *rc, int arg, int flags) get_input_mapping(rc, operand, flags ^ INVERT); - } else if (format == MESA_FORMAT_XRGB8888) { + } else if (format == MESA_FORMAT_B8G8R8X8_UNORM) { /* Sometimes emulated using ARGB8888. */ if (!is_color_operand(operand)) return RC_IN_SOURCE(ZERO) | @@ -319,7 +319,7 @@ nv10_get_general_combiner(struct gl_context *ctx, int i, rc_a.in = rc_a.out = rc_c.in = rc_c.out = 0; } - *k = pack_rgba_f(MESA_FORMAT_ARGB8888, + *k = pack_rgba_f(MESA_FORMAT_B8G8R8A8_UNORM, ctx->Texture.Unit[i].EnvColor); *a_in = rc_a.in; *a_out = rc_a.out; diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c index 3b76d66100d..49e908f949a 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c @@ -90,10 +90,10 @@ static uint32_t get_tex_format_pot(struct gl_texture_image *ti) { switch (ti->TexFormat) { - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8; case MESA_FORMAT_ARGB1555: @@ -137,8 +137,8 @@ get_tex_format_rect(struct gl_texture_image *ti) case MESA_FORMAT_RGB565: return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT; - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT; case MESA_FORMAT_A8: diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c index 06155fe011c..c0c7b26bbf7 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c @@ -144,7 +144,7 @@ nv10_emit_fog(struct gl_context *ctx, int emit) PUSH_DATA (push, get_fog_mode(f->Mode)); PUSH_DATA (push, get_fog_source(source, f->FogDistanceMode)); PUSH_DATAb(push, f->Enabled); - PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color)); + PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_R8G8B8A8_UNORM, f->Color)); BEGIN_NV04(push, NV10_3D(FOG_COEFF(0)), 3); PUSH_DATAp(push, k, 3); diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c index 1c1f86297fe..cf216a69950 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c @@ -36,9 +36,9 @@ static inline unsigned get_rt_format(mesa_format format) { switch (format) { - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return NV20_3D_RT_FORMAT_COLOR_X8R8G8B8; - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8; case MESA_FORMAT_RGB565: return NV20_3D_RT_FORMAT_COLOR_R5G6B5; diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c index ffbc2dfe09c..7af721850e2 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c @@ -87,7 +87,7 @@ static uint32_t get_tex_format_pot(struct gl_texture_image *ti) { switch (ti->TexFormat) { - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8; case MESA_FORMAT_ARGB1555: @@ -96,7 +96,7 @@ get_tex_format_pot(struct gl_texture_image *ti) case MESA_FORMAT_ARGB4444: return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return NV20_3D_TEX_FORMAT_FORMAT_X8R8G8B8; case MESA_FORMAT_RGB565: @@ -128,7 +128,7 @@ static uint32_t get_tex_format_rect(struct gl_texture_image *ti) { switch (ti->TexFormat) { - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT; case MESA_FORMAT_ARGB1555: @@ -137,7 +137,7 @@ get_tex_format_rect(struct gl_texture_image *ti) case MESA_FORMAT_ARGB4444: return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: return NV20_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT; case MESA_FORMAT_RGB565: diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c index 1d3d83d47fc..f0acbed8560 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c @@ -166,7 +166,7 @@ nv20_emit_fog(struct gl_context *ctx, int emit) get_fog_mode_signed(f->Mode))); PUSH_DATA (push, get_fog_source(source, f->FogDistanceMode)); PUSH_DATAb(push, f->Enabled); - PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color)); + PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_R8G8B8A8_UNORM, f->Color)); BEGIN_NV04(push, NV20_3D(FOG_COEFF(0)), 3); PUSH_DATAp(push, k, 3); diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c index 825358a4fbe..142a5175bfd 100644 --- a/src/mesa/drivers/dri/r200/r200_blit.c +++ b/src/mesa/drivers/dri/r200/r200_blit.c @@ -42,8 +42,8 @@ unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch) { /* XXX others? BE/LE? */ switch (mesa_format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: case MESA_FORMAT_RGB565: case MESA_FORMAT_ARGB4444: case MESA_FORMAT_ARGB1555: @@ -51,8 +51,8 @@ unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch) case MESA_FORMAT_L8: case MESA_FORMAT_I8: /* swizzled */ - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_A8B8G8R8_UNORM: + case MESA_FORMAT_R8G8B8A8_UNORM: break; default: return 0; @@ -114,16 +114,16 @@ static void inline emit_tx_setup(struct r200_context *r200, /* XXX others? BE/LE? */ switch (src_mesa_format) { - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: txformat |= R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP; break; - case MESA_FORMAT_RGBA8888: + case MESA_FORMAT_A8B8G8R8_UNORM: txformat |= R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP; break; - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: txformat |= R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP; break; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: txformat |= R200_TXFORMAT_ARGB8888; break; case MESA_FORMAT_RGB565: @@ -155,8 +155,8 @@ static void inline emit_tx_setup(struct r200_context *r200, offset |= R200_TXO_MICRO_TILE; switch (dst_mesa_format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: case MESA_FORMAT_RGB565: case MESA_FORMAT_ARGB4444: case MESA_FORMAT_ARGB1555: @@ -182,7 +182,7 @@ static void inline emit_tx_setup(struct r200_context *r200, R200_TXA_OUTPUT_REG_R0)); END_BATCH(); break; - case MESA_FORMAT_RGBA8888: + case MESA_FORMAT_A8B8G8R8_UNORM: BEGIN_BATCH(10); OUT_BATCH_REGVAL(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE)); @@ -202,7 +202,7 @@ static void inline emit_tx_setup(struct r200_context *r200, R200_TXA_OUTPUT_REG_R0)); END_BATCH(); break; - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_R8G8B8A8_UNORM: BEGIN_BATCH(34); OUT_BATCH_REGVAL(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE | @@ -308,10 +308,10 @@ static inline void emit_cb_setup(struct r200_context *r200, /* XXX others? BE/LE? */ switch (mesa_format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: + case MESA_FORMAT_A8B8G8R8_UNORM: + case MESA_FORMAT_R8G8B8A8_UNORM: dst_format = RADEON_COLOR_FORMAT_ARGB8888; break; case MESA_FORMAT_RGB565: diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c index 12afb767bda..80dea79d23f 100644 --- a/src/mesa/drivers/dri/r200/r200_texstate.c +++ b/src/mesa/drivers/dri/r200/r200_texstate.c @@ -69,10 +69,10 @@ struct tx_table { static const struct tx_table tx_table_be[] = { - [ MESA_FORMAT_RGBA8888 ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_RGBA8888_REV ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888_REV ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8B8G8R8_UNORM ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_R8G8B8A8_UNORM ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_B8G8R8A8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8R8G8B8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, [ MESA_FORMAT_RGB888 ] = { 0xffffffff, 0 }, [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 }, [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 }, @@ -97,10 +97,10 @@ static const struct tx_table tx_table_be[] = static const struct tx_table tx_table_le[] = { - [ MESA_FORMAT_RGBA8888 ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_RGBA8888_REV ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888_REV ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8B8G8R8_UNORM ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_R8G8B8A8_UNORM ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_B8G8R8A8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8R8G8B8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 }, [ MESA_FORMAT_RGB888 ] = { R200_TXFORMAT_ARGB8888, 0 }, [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 }, [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 }, @@ -772,10 +772,10 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format; } else { - texFormat = MESA_FORMAT_ARGB8888; - t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888].format; + texFormat = MESA_FORMAT_B8G8R8A8_UNORM; + t->pp_txformat = tx_table_le[MESA_FORMAT_B8G8R8A8_UNORM].format; } - t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888].filter; + t->pp_txfilter |= tx_table_le[MESA_FORMAT_B8G8R8A8_UNORM].filter; break; case 3: default: diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c index e5d49ee6b00..5e291672f68 100644 --- a/src/mesa/drivers/dri/radeon/radeon_blit.c +++ b/src/mesa/drivers/dri/radeon/radeon_blit.c @@ -42,8 +42,8 @@ unsigned r100_check_blit(mesa_format mesa_format, uint32_t dst_pitch) { /* XXX others? BE/LE? */ switch (mesa_format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: case MESA_FORMAT_RGB565: case MESA_FORMAT_ARGB4444: case MESA_FORMAT_ARGB1555: @@ -108,13 +108,13 @@ static void inline emit_tx_setup(struct r100_context *r100, /* XXX others? BE/LE? */ switch (mesa_format) { - case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: txformat |= RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP; break; - case MESA_FORMAT_RGBA8888: + case MESA_FORMAT_A8B8G8R8_UNORM: txformat |= RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP; break; - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8X8_UNORM: txformat |= RADEON_TXFORMAT_ARGB8888; break; case MESA_FORMAT_RGB565: @@ -186,8 +186,8 @@ static inline void emit_cb_setup(struct r100_context *r100, /* XXX others? BE/LE? */ switch (mesa_format) { - case MESA_FORMAT_ARGB8888: - case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_B8G8R8A8_UNORM: + case MESA_FORMAT_B8G8R8X8_UNORM: dst_format = RADEON_COLOR_FORMAT_ARGB8888; break; case MESA_FORMAT_RGB565: diff --git a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c index e9bfc0df265..ee0f7782793 100644 --- a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c +++ b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c @@ -57,10 +57,10 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type) case GL_UNSIGNED_SHORT_5_5_5_1: return MESA_FORMAT_RGBA5551; case GL_UNSIGNED_INT_8_8_8_8: - return MESA_FORMAT_RGBA8888; + return MESA_FORMAT_A8B8G8R8_UNORM; case GL_UNSIGNED_BYTE: case GL_UNSIGNED_INT_8_8_8_8_REV: - return MESA_FORMAT_RGBA8888_REV; + return MESA_FORMAT_R8G8B8A8_UNORM; } break; case GL_BGRA: @@ -74,10 +74,10 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type) case GL_UNSIGNED_SHORT_1_5_5_5_REV: return MESA_FORMAT_ARGB1555; case GL_UNSIGNED_INT_8_8_8_8: - return MESA_FORMAT_ARGB8888_REV; + return MESA_FORMAT_A8R8G8B8_UNORM; case GL_UNSIGNED_BYTE: case GL_UNSIGNED_INT_8_8_8_8_REV: - return MESA_FORMAT_ARGB8888; + return MESA_FORMAT_B8G8R8A8_UNORM; } break; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index d90bafa9818..3dcdcba00d3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -219,12 +219,12 @@ radeon_create_image_from_name(__DRIscreen *screen, image->data_type = GL_UNSIGNED_BYTE; break; case __DRI_IMAGE_FORMAT_XRGB8888: - image->format = MESA_FORMAT_XRGB8888; + image->format = MESA_FORMAT_B8G8R8X8_UNORM; image->internal_format = GL_RGB; image->data_type = GL_UNSIGNED_BYTE; break; case __DRI_IMAGE_FORMAT_ARGB8888: - image->format = MESA_FORMAT_ARGB8888; + image->format = MESA_FORMAT_B8G8R8A8_UNORM; image->internal_format = GL_RGBA; image->data_type = GL_UNSIGNED_BYTE; break; @@ -319,12 +319,12 @@ radeon_create_image(__DRIscreen *screen, image->data_type = GL_UNSIGNED_BYTE; break; case __DRI_IMAGE_FORMAT_XRGB8888: - image->format = MESA_FORMAT_XRGB8888; + image->format = MESA_FORMAT_B8G8R8X8_UNORM; image->internal_format = GL_RGB; image->data_type = GL_UNSIGNED_BYTE; break; case __DRI_IMAGE_FORMAT_ARGB8888: - image->format = MESA_FORMAT_ARGB8888; + image->format = MESA_FORMAT_B8G8R8A8_UNORM; image->internal_format = GL_RGBA; image->data_type = GL_UNSIGNED_BYTE; break; @@ -613,9 +613,9 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv, if (mesaVis->redBits == 5) rgbFormat = _mesa_little_endian() ? MESA_FORMAT_RGB565 : MESA_FORMAT_RGB565_REV; else if (mesaVis->alphaBits == 0) - rgbFormat = _mesa_little_endian() ? MESA_FORMAT_XRGB8888 : MESA_FORMAT_XRGB8888_REV; + rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8X8_UNORM : MESA_FORMAT_X8R8G8B8_UNORM; else - rgbFormat = _mesa_little_endian() ? MESA_FORMAT_ARGB8888 : MESA_FORMAT_ARGB8888_REV; + rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8A8_UNORM : MESA_FORMAT_A8R8G8B8_UNORM; /* front color renderbuffer */ rfb->color_rb[0] = radeon_create_renderbuffer(rgbFormat, driDrawPriv); @@ -710,8 +710,8 @@ __DRIconfig **radeonInitScreen2(__DRIscreen *psp) { static const mesa_format formats[3] = { MESA_FORMAT_RGB565, - MESA_FORMAT_XRGB8888, - MESA_FORMAT_ARGB8888 + MESA_FORMAT_B8G8R8X8_UNORM, + MESA_FORMAT_B8G8R8A8_UNORM }; /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't * support pageflipping at all. diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c index fc723842c11..9e7ecca0f68 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c +++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c @@ -112,8 +112,8 @@ do_copy_texsubimage(struct gl_context *ctx, dst_mesaformat = MESA_FORMAT_RGB565; break; case 4: - src_mesaformat = MESA_FORMAT_ARGB8888; - dst_mesaformat = MESA_FORMAT_ARGB8888; + src_mesaformat = MESA_FORMAT_B8G8R8A8_UNORM; + dst_mesaformat = MESA_FORMAT_B8G8R8A8_UNORM; break; case 1: src_mesaformat = MESA_FORMAT_A8; diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c index 5550a5aa1ec..51c36e9ee84 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texstate.c +++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c @@ -74,10 +74,10 @@ struct tx_table { static const struct tx_table tx_table[] = { [ MESA_FORMAT_NONE ] = { 0xffffffff, 0 }, - [ MESA_FORMAT_RGBA8888 ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_RGBA8888_REV ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888 ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 }, - [ MESA_FORMAT_ARGB8888_REV ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8B8G8R8_UNORM ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_R8G8B8A8_UNORM ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_B8G8R8A8_UNORM ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 }, + [ MESA_FORMAT_A8R8G8B8_UNORM ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 }, [ MESA_FORMAT_RGB888 ] = { RADEON_TXFORMAT_ARGB8888, 0 }, [ MESA_FORMAT_RGB565 ] = { RADEON_TXFORMAT_RGB565, 0 }, [ MESA_FORMAT_RGB565_REV ] = { RADEON_TXFORMAT_RGB565, 0 }, @@ -647,10 +647,10 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form texFormat = MESA_FORMAT_RGB888; } else { - t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888].format; - texFormat = MESA_FORMAT_ARGB8888; + t->pp_txformat = tx_table[MESA_FORMAT_B8G8R8A8_UNORM].format; + texFormat = MESA_FORMAT_B8G8R8A8_UNORM; } - t->pp_txfilter |= tx_table[MESA_FORMAT_ARGB8888].filter; + t->pp_txfilter |= tx_table[MESA_FORMAT_B8G8R8A8_UNORM].filter; break; case 3: default: diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 8455b826270..15ab677ce39 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -231,12 +231,12 @@ static mesa_format radeonChoose8888TexFormat(radeonContextPtr rmesa, (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) || (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) || (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && littleEndian)) { - return MESA_FORMAT_RGBA8888; + return MESA_FORMAT_A8B8G8R8_UNORM; } else if ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) || (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && littleEndian) || (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8) || (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian)) { - return MESA_FORMAT_RGBA8888_REV; + return MESA_FORMAT_R8G8B8A8_UNORM; } else return _radeon_texformat_argb8888; #endif @@ -592,16 +592,16 @@ static void radeonInitTextureFormats(void) { if (_mesa_little_endian()) { - _radeon_texformat_rgba8888 = MESA_FORMAT_RGBA8888; - _radeon_texformat_argb8888 = MESA_FORMAT_ARGB8888; + _radeon_texformat_rgba8888 = MESA_FORMAT_A8B8G8R8_UNORM; + _radeon_texformat_argb8888 = MESA_FORMAT_B8G8R8A8_UNORM; _radeon_texformat_rgb565 = MESA_FORMAT_RGB565; _radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444; _radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555; _radeon_texformat_al88 = MESA_FORMAT_AL88; } else { - _radeon_texformat_rgba8888 = MESA_FORMAT_RGBA8888_REV; - _radeon_texformat_argb8888 = MESA_FORMAT_ARGB8888_REV; + _radeon_texformat_rgba8888 = MESA_FORMAT_R8G8B8A8_UNORM; + _radeon_texformat_argb8888 = MESA_FORMAT_A8R8G8B8_UNORM; _radeon_texformat_rgb565 = MESA_FORMAT_RGB565_REV; _radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444_REV; _radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555_REV; diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index ddb810f7032..47f07ae9fe7 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -92,9 +92,9 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, sPriv->swrast_loader->getDrawableInfo(dPriv, &x, &y, &w, &h, dPriv->loaderPrivate); if (texture_format == __DRI_TEXTURE_FORMAT_RGB) - texFormat = MESA_FORMAT_XRGB8888; + texFormat = MESA_FORMAT_B8G8R8X8_UNORM; else - texFormat = MESA_FORMAT_ARGB8888; + texFormat = MESA_FORMAT_B8G8R8A8_UNORM; _mesa_init_teximage_fields(&dri_ctx->Base, texImage, w, h, 1, 0, internalFormat, texFormat); @@ -169,10 +169,10 @@ swrastFillInModes(__DRIscreen *psp, format = MESA_FORMAT_RGB565; break; case 24: - format = MESA_FORMAT_XRGB8888; + format = MESA_FORMAT_B8G8R8X8_UNORM; break; case 32: - format = MESA_FORMAT_ARGB8888; + format = MESA_FORMAT_B8G8R8A8_UNORM; break; default: fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__, @@ -345,13 +345,13 @@ swrast_new_renderbuffer(const struct gl_config *visual, __DRIdrawable *dPriv, switch (pixel_format) { case PF_A8R8G8B8: - rb->Format = MESA_FORMAT_ARGB8888; + rb->Format = MESA_FORMAT_B8G8R8A8_UNORM; rb->InternalFormat = GL_RGBA; rb->_BaseFormat = GL_RGBA; xrb->bpp = 32; break; case PF_X8R8G8B8: - rb->Format = MESA_FORMAT_ARGB8888; /* XXX */ + rb->Format = MESA_FORMAT_B8G8R8A8_UNORM; /* XXX */ rb->InternalFormat = GL_RGB; rb->_BaseFormat = GL_RGB; xrb->bpp = 32; @@ -634,7 +634,7 @@ static mesa_format swrastChooseTextureFormat(struct gl_context * ctx, GLenum type) { if (internalFormat == GL_RGB) - return MESA_FORMAT_XRGB8888; + return MESA_FORMAT_B8G8R8X8_UNORM; return _mesa_choose_tex_format(ctx, target, internalFormat, format, type); } diff --git a/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp b/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp index df697e4a384..095ca1f9d46 100644 --- a/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp +++ b/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp @@ -593,11 +593,11 @@ MesaSoftwareRast::_SetupRenderBuffer(struct gl_renderbuffer* rb, switch (colorSpace) { case B_RGBA32: rb->_BaseFormat = GL_RGBA; - rb->Format = MESA_FORMAT_ARGB8888; + rb->Format = MESA_FORMAT_B8G8R8A8_UNORM; break; case B_RGB32: rb->_BaseFormat = GL_RGB; - rb->Format = MESA_FORMAT_XRGB8888; + rb->Format = MESA_FORMAT_B8G8R8X8_UNORM; break; case B_RGB24: rb->_BaseFormat = GL_RGB; diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index e168fec9ad0..9b1e96cfc32 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -449,9 +449,9 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, if (osmesa->format == OSMESA_RGBA) { if (osmesa->DataType == GL_UNSIGNED_BYTE) { if (_mesa_little_endian()) - rb->Format = MESA_FORMAT_RGBA8888_REV; + rb->Format = MESA_FORMAT_R8G8B8A8_UNORM; else - rb->Format = MESA_FORMAT_RGBA8888; + rb->Format = MESA_FORMAT_A8B8G8R8_UNORM; } else if (osmesa->DataType == GL_UNSIGNED_SHORT) { rb->Format = MESA_FORMAT_RGBA_16; @@ -463,9 +463,9 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, else if (osmesa->format == OSMESA_BGRA) { if (osmesa->DataType == GL_UNSIGNED_BYTE) { if (_mesa_little_endian()) - rb->Format = MESA_FORMAT_ARGB8888; + rb->Format = MESA_FORMAT_B8G8R8A8_UNORM; else - rb->Format = MESA_FORMAT_ARGB8888_REV; + rb->Format = MESA_FORMAT_A8R8G8B8_UNORM; } else if (osmesa->DataType == GL_UNSIGNED_SHORT) { _mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLushort"); @@ -479,9 +479,9 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, else if (osmesa->format == OSMESA_ARGB) { if (osmesa->DataType == GL_UNSIGNED_BYTE) { if (_mesa_little_endian()) - rb->Format = MESA_FORMAT_ARGB8888_REV; + rb->Format = MESA_FORMAT_A8R8G8B8_UNORM; else - rb->Format = MESA_FORMAT_ARGB8888; + rb->Format = MESA_FORMAT_B8G8R8A8_UNORM; } else if (osmesa->DataType == GL_UNSIGNED_SHORT) { _mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLushort"); diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index 3af5be49e00..b9beb48526d 100644 --- a/src/mesa/drivers/x11/xm_buffer.c +++ b/src/mesa/drivers/x11/xm_buffer.c @@ -343,20 +343,20 @@ xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name, /* This will really only happen for pixmaps. We'll access the * pixmap via a temporary XImage which will be 32bpp. */ - xrb->Base.Base.Format = MESA_FORMAT_XRGB8888; + xrb->Base.Base.Format = MESA_FORMAT_B8G8R8X8_UNORM; break; case PF_8A8R8G8B: - xrb->Base.Base.Format = MESA_FORMAT_ARGB8888; + xrb->Base.Base.Format = MESA_FORMAT_B8G8R8A8_UNORM; break; case PF_8A8B8G8R: - xrb->Base.Base.Format = MESA_FORMAT_RGBA8888_REV; + xrb->Base.Base.Format = MESA_FORMAT_R8G8B8A8_UNORM; break; case PF_5R6G5B: xrb->Base.Base.Format = MESA_FORMAT_RGB565; break; default: _mesa_warning(ctx, "Bad pixel format in xmesa_new_renderbuffer"); - xrb->Base.Base.Format = MESA_FORMAT_ARGB8888; + xrb->Base.Base.Format = MESA_FORMAT_B8G8R8A8_UNORM; break; } |