mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
cogl: Add private feature flags for 10 bpc and 16 bpc formats
10 bpc are enabled for OpenGL and GLES 2 with the right extension. 16 bpc (half float) are enabled for OpenGL 3 and higher, and GLES 2 with the right extension. https://gitlab.gnome.org/GNOME/mutter/merge_requests/804
This commit is contained in:
parent
598f536c51
commit
2fc8841416
@ -46,6 +46,8 @@ typedef enum
|
||||
COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL,
|
||||
COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_BGRA8888,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_RGBA1010102,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_HALF_FLOAT,
|
||||
COGL_PRIVATE_FEATURE_UNPACK_SUBIMAGE,
|
||||
COGL_PRIVATE_FEATURE_SAMPLER_OBJECTS,
|
||||
COGL_PRIVATE_FEATURE_READ_PIXELS_ANY_FORMAT,
|
||||
|
@ -506,6 +506,14 @@ _cogl_driver_update_features (CoglContext *ctx,
|
||||
COGL_FEATURE_ID_TEXTURE_RG,
|
||||
TRUE);
|
||||
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_RGBA1010102, TRUE);
|
||||
|
||||
if (COGL_CHECK_GL_VERSION (gl_major, gl_minor, 3, 0))
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_HALF_FLOAT,
|
||||
TRUE);
|
||||
|
||||
/* Cache features */
|
||||
for (i = 0; i < G_N_ELEMENTS (private_features); i++)
|
||||
ctx->private_features[i] |= private_features[i];
|
||||
|
@ -355,6 +355,14 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_BGRA8888, TRUE);
|
||||
|
||||
if (_cogl_check_extension ("GL_EXT_texture_type_2_10_10_10_REV", gl_extensions))
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_RGBA1010102, TRUE);
|
||||
|
||||
if (_cogl_check_extension ("GL_OES_texture_half_float", gl_extensions))
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_HALF_FLOAT, TRUE);
|
||||
|
||||
if (_cogl_check_extension ("GL_EXT_unpack_subimage", gl_extensions))
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_UNPACK_SUBIMAGE, TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user