diff options
author | Chia-I Wu <[email protected]> | 2011-11-22 15:05:25 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2011-11-27 12:43:24 +0800 |
commit | d4fcf67a3ac78c29448000486dadc2b4b1b2a56d (patch) | |
tree | de68969c78428e72aef94a30adcd94c389bc56c4 /src/mesa/state_tracker | |
parent | 6baa5f10c04641960e0bedce664d0a5cf39e8954 (diff) |
mesa: add MESA_FORMAT_RGBX8888 and MESA_FORMAT_RGBX8888_REV
MESA_FORMAT_RGBX8888_REV is one of the opaque pixel formats used on Android.
Thanks to texture-from-pixmap, drivers may actually see texture images with
this format on Android.
MESA_FORMAT_RGBX8888 is added only for completeness.
Reviewed-by: Brian Paul <[email protected]>
[olv: Move the new formats after MESA_FORMAT_ARGB8888_REV in gl_format. I
accidentally moved them to the wrong place when preparing the patch.]
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 196433d5e23..b11245bebea 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -162,6 +162,10 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat) return PIPE_FORMAT_B8G8R8A8_UNORM; case MESA_FORMAT_ARGB8888_REV: return PIPE_FORMAT_A8R8G8B8_UNORM; + case MESA_FORMAT_RGBX8888: + return PIPE_FORMAT_X8B8G8R8_UNORM; + case MESA_FORMAT_RGBX8888_REV: + return PIPE_FORMAT_R8G8B8X8_UNORM; case MESA_FORMAT_XRGB8888: return PIPE_FORMAT_B8G8R8X8_UNORM; case MESA_FORMAT_XRGB8888_REV: @@ -476,6 +480,10 @@ st_pipe_format_to_mesa_format(enum pipe_format format) return MESA_FORMAT_ARGB8888; case PIPE_FORMAT_A8R8G8B8_UNORM: return MESA_FORMAT_ARGB8888_REV; + case PIPE_FORMAT_X8B8G8R8_UNORM: + return MESA_FORMAT_RGBX8888; + case PIPE_FORMAT_R8G8B8X8_UNORM: + return MESA_FORMAT_RGBX8888_REV; case PIPE_FORMAT_B8G8R8X8_UNORM: return MESA_FORMAT_XRGB8888; case PIPE_FORMAT_X8R8G8B8_UNORM: |