summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2011-08-21 21:36:40 +0800
committerChia-I Wu <olv@lunarg.com>2011-09-09 12:06:17 +0800
commit9fe197c62611815ebe74248033271ad9fd07ae06 (patch)
tree726d0a74027ffc673f3ae1b0dea2fa2cdb592fe6 /src/mesa/drivers/dri/i965/brw_wm_surface_state.c
parente3cf7b69f24c186310eb3be4c462cccea028e6f2 (diff)
downloadexternal_mesa3d-9fe197c62611815ebe74248033271ad9fd07ae06.zip
external_mesa3d-9fe197c62611815ebe74248033271ad9fd07ae06.tar.gz
external_mesa3d-9fe197c62611815ebe74248033271ad9fd07ae06.tar.bz2
intel: add support for __DRI_IMAGE_FORMAT_ABGR8888
It maps to MESA_FORMAT_RGBA8888_REV. Surfaces of the format can only be sampled from but not render to. Only i915 is tested. Reviewed-by: Eric Anholt <eric@anholt.net> [olv: add a check in intel_image_target_renderbuffer_storage]
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_surface_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index ad90978..7528952 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -190,6 +190,10 @@ translate_tex_format(gl_format mesa_format,
else if (srgb_decode == GL_SKIP_DECODE_EXT)
return brw_format_for_mesa_format(_mesa_get_srgb_format_linear(mesa_format));
+ case MESA_FORMAT_RGBA8888_REV:
+ /* This format is not renderable? */
+ return BRW_SURFACEFORMAT_R8G8B8A8_UNORM;
+
case MESA_FORMAT_RGBA_FLOAT32:
/* The value of this BRW_SURFACEFORMAT is 0, which tricks the
* assertion below.