diff options
author | Francisco Jerez <[email protected]> | 2013-11-22 19:49:29 -0800 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2014-01-15 16:42:07 +0100 |
commit | 87942749a327725014b0d160b3e48d6d83723ac2 (patch) | |
tree | b946728e01d45243a7f86fa1cd2e872d5d451675 /src/mesa/main/formats.c | |
parent | 16070716bca77da0d33ac2b5ae9f83c10993d912 (diff) |
mesa: Add MESA_FORMAT_ABGR2101010.
Including pack/unpack and texstore code. This texture format is a
requirement for ARB_shader_image_load_store.
Acked-by: Chris Forbes <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r-- | src/mesa/main/formats.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index 7e0ec23198c..0da0dfa8ce9 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -1763,6 +1763,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, 1, 1, 16 }, + { + MESA_FORMAT_ABGR2101010, + "MESA_FORMAT_ABGR2101010", + GL_RGBA, + GL_UNSIGNED_NORMALIZED, + 10, 10, 10, 2, + 0, 0, 0, 0, 0, + 1, 1, 4 + }, }; @@ -2841,6 +2850,11 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 4; return; + case MESA_FORMAT_ABGR2101010: + *datatype = GL_UNSIGNED_INT_2_10_10_10_REV; + *comps = 4; + return; + case MESA_FORMAT_COUNT: assert(0); return; @@ -3382,6 +3396,11 @@ _mesa_format_matches_format_and_type(gl_format gl_format, case MESA_FORMAT_XBGR32323232_UINT: case MESA_FORMAT_XBGR32323232_SINT: return GL_FALSE; + + case MESA_FORMAT_ABGR2101010: + return format == GL_RGBA && type == GL_UNSIGNED_INT_2_10_10_10_REV && + !swapBytes; + } return GL_FALSE; |