mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
cogl: Add XRGB_FP_16161616 and XBGR_FP_16161616 formats
These match their alpha counterparts, apart from not setting the alpha bit. This allows our internal mashinery to more easily distinguish whether we need a slow alpha-pass during rendering or not. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1810>
This commit is contained in:
parent
dc442e7a75
commit
daace1aac5
@ -355,7 +355,9 @@ _cogl_bitmap_needs_short_temp_buffer (CoglPixelFormat format)
|
|||||||
case COGL_PIXEL_FORMAT_ABGR_2101010_PRE:
|
case COGL_PIXEL_FORMAT_ABGR_2101010_PRE:
|
||||||
case COGL_PIXEL_FORMAT_RGBA_FP_16161616:
|
case COGL_PIXEL_FORMAT_RGBA_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
||||||
|
@ -408,7 +408,9 @@ G_PASTE (_cogl_unpack_, component_size) (CoglPixelFormat format,
|
|||||||
break;
|
break;
|
||||||
case COGL_PIXEL_FORMAT_RGBA_FP_16161616:
|
case COGL_PIXEL_FORMAT_RGBA_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
||||||
@ -789,7 +791,9 @@ G_PASTE (_cogl_pack_, component_size) (CoglPixelFormat format,
|
|||||||
break;
|
break;
|
||||||
case COGL_PIXEL_FORMAT_RGBA_FP_16161616:
|
case COGL_PIXEL_FORMAT_RGBA_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
||||||
|
@ -273,6 +273,13 @@ static const CoglPixelFormatInfo format_info_table[] = {
|
|||||||
.bpp = { 8 },
|
.bpp = { 8 },
|
||||||
.aligned = 1
|
.aligned = 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.cogl_format = COGL_PIXEL_FORMAT_XRGB_FP_16161616,
|
||||||
|
.format_str = "ARGB_FP_16161616",
|
||||||
|
.n_planes = 1,
|
||||||
|
.bpp = { 8 },
|
||||||
|
.aligned = 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.cogl_format = COGL_PIXEL_FORMAT_ARGB_FP_16161616,
|
.cogl_format = COGL_PIXEL_FORMAT_ARGB_FP_16161616,
|
||||||
.format_str = "ARGB_FP_16161616",
|
.format_str = "ARGB_FP_16161616",
|
||||||
@ -280,6 +287,13 @@ static const CoglPixelFormatInfo format_info_table[] = {
|
|||||||
.bpp = { 8 },
|
.bpp = { 8 },
|
||||||
.aligned = 1
|
.aligned = 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.cogl_format = COGL_PIXEL_FORMAT_XBGR_FP_16161616,
|
||||||
|
.format_str = "ABGR_FP_16161616",
|
||||||
|
.n_planes = 1,
|
||||||
|
.bpp = { 8 },
|
||||||
|
.aligned = 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.cogl_format = COGL_PIXEL_FORMAT_ABGR_FP_16161616,
|
.cogl_format = COGL_PIXEL_FORMAT_ABGR_FP_16161616,
|
||||||
.format_str = "ABGR_FP_16161616",
|
.format_str = "ABGR_FP_16161616",
|
||||||
|
@ -228,7 +228,9 @@ typedef enum /*< prefix=COGL_PIXEL_FORMAT >*/
|
|||||||
|
|
||||||
COGL_PIXEL_FORMAT_RGBA_FP_16161616 = (11 | COGL_A_BIT),
|
COGL_PIXEL_FORMAT_RGBA_FP_16161616 = (11 | COGL_A_BIT),
|
||||||
COGL_PIXEL_FORMAT_BGRA_FP_16161616 = (11 | COGL_A_BIT | COGL_BGR_BIT),
|
COGL_PIXEL_FORMAT_BGRA_FP_16161616 = (11 | COGL_A_BIT | COGL_BGR_BIT),
|
||||||
|
COGL_PIXEL_FORMAT_XRGB_FP_16161616 = (11 | COGL_AFIRST_BIT),
|
||||||
COGL_PIXEL_FORMAT_ARGB_FP_16161616 = (11 | COGL_A_BIT | COGL_AFIRST_BIT),
|
COGL_PIXEL_FORMAT_ARGB_FP_16161616 = (11 | COGL_A_BIT | COGL_AFIRST_BIT),
|
||||||
|
COGL_PIXEL_FORMAT_XBGR_FP_16161616 = (11 | COGL_BGR_BIT | COGL_AFIRST_BIT),
|
||||||
COGL_PIXEL_FORMAT_ABGR_FP_16161616 = (11 | COGL_A_BIT | COGL_BGR_BIT | COGL_AFIRST_BIT),
|
COGL_PIXEL_FORMAT_ABGR_FP_16161616 = (11 | COGL_A_BIT | COGL_BGR_BIT | COGL_AFIRST_BIT),
|
||||||
|
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE = (3 | COGL_A_BIT | COGL_PREMULT_BIT),
|
COGL_PIXEL_FORMAT_RGBA_8888_PRE = (3 | COGL_A_BIT | COGL_PREMULT_BIT),
|
||||||
|
@ -302,12 +302,14 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
|
|||||||
glformat = GL_BGRA;
|
glformat = GL_BGRA;
|
||||||
gltype = GL_HALF_FLOAT;
|
gltype = GL_HALF_FLOAT;
|
||||||
break;
|
break;
|
||||||
|
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
||||||
glintformat = GL_RGBA;
|
glintformat = GL_RGBA;
|
||||||
glformat = GL_BGRA;
|
glformat = GL_BGRA;
|
||||||
gltype = GL_HALF_FLOAT;
|
gltype = GL_HALF_FLOAT;
|
||||||
break;
|
break;
|
||||||
|
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE:
|
||||||
glintformat = GL_RGBA;
|
glintformat = GL_RGBA;
|
||||||
|
@ -432,7 +432,9 @@ _cogl_texture_driver_upload_supported (CoglContext *ctx,
|
|||||||
case COGL_PIXEL_FORMAT_RGBA_5551_PRE:
|
case COGL_PIXEL_FORMAT_RGBA_5551_PRE:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
||||||
|
@ -213,7 +213,9 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
||||||
|
@ -485,7 +485,9 @@ _cogl_texture_driver_upload_supported (CoglContext *ctx,
|
|||||||
case COGL_PIXEL_FORMAT_RGBA_5551_PRE:
|
case COGL_PIXEL_FORMAT_RGBA_5551_PRE:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
||||||
|
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
||||||
|
Loading…
Reference in New Issue
Block a user