mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
cogl: COGL_FEATURE_TEXTURE_NPOT_REPEAT is always available
https://gitlab.gnome.org/GNOME/mutter/merge_requests/546
This commit is contained in:
parent
893e894fff
commit
302a171c08
@ -182,9 +182,6 @@ cogl_is_context (void *object);
|
||||
* %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE respectively.
|
||||
* @COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP: Mipmapping is supported in
|
||||
* conjuntion with non power of two textures.
|
||||
* @COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT: Repeat modes other than
|
||||
* %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE are supported by the
|
||||
* hardware.
|
||||
* @COGL_FEATURE_ID_TEXTURE_NPOT: Non power of two textures are supported
|
||||
* by the hardware. This is a equivalent to the
|
||||
* %COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, %COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP
|
||||
@ -236,7 +233,6 @@ typedef enum _CoglFeatureID
|
||||
{
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_BASIC = 1,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT,
|
||||
COGL_FEATURE_ID_TEXTURE_RECTANGLE,
|
||||
COGL_FEATURE_ID_OFFSCREEN,
|
||||
|
@ -505,14 +505,7 @@ _cogl_texture_2d_is_sliced (CoglTexture *tex)
|
||||
static gboolean
|
||||
_cogl_texture_2d_can_hardware_repeat (CoglTexture *tex)
|
||||
{
|
||||
CoglContext *ctx = tex->context;
|
||||
|
||||
if (cogl_has_feature (ctx, COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT) ||
|
||||
(_cogl_util_is_pot (tex->width) &&
|
||||
_cogl_util_is_pot (tex->height)))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -341,9 +341,6 @@ typedef enum /*< prefix=COGL_PIXEL_FORMAT >*/
|
||||
* %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE respectively.
|
||||
* @COGL_FEATURE_TEXTURE_NPOT_MIPMAP: Mipmapping is supported in
|
||||
* conjuntion with non power of two textures.
|
||||
* @COGL_FEATURE_TEXTURE_NPOT_REPEAT: Repeat modes other than
|
||||
* %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE are supported by the
|
||||
* hardware.
|
||||
* @COGL_FEATURE_POINT_SPRITE: Whether
|
||||
* cogl_material_set_layer_point_sprite_coords_enabled() is supported.
|
||||
* @COGL_FEATURE_MAP_BUFFER_FOR_READ: Whether cogl_buffer_map() is
|
||||
@ -374,7 +371,6 @@ typedef enum
|
||||
COGL_FEATURE_DEPTH_RANGE = (1 << 14),
|
||||
COGL_FEATURE_TEXTURE_NPOT_BASIC = (1 << 15),
|
||||
COGL_FEATURE_TEXTURE_NPOT_MIPMAP = (1 << 16),
|
||||
COGL_FEATURE_TEXTURE_NPOT_REPEAT = (1 << 17),
|
||||
COGL_FEATURE_POINT_SPRITE = (1 << 18),
|
||||
COGL_FEATURE_MAP_BUFFER_FOR_READ = (1 << 21),
|
||||
COGL_FEATURE_MAP_BUFFER_FOR_WRITE = (1 << 22),
|
||||
|
@ -409,12 +409,10 @@ _cogl_driver_update_features (CoglContext *ctx,
|
||||
|
||||
flags |= COGL_FEATURE_TEXTURE_NPOT
|
||||
| COGL_FEATURE_TEXTURE_NPOT_BASIC
|
||||
| COGL_FEATURE_TEXTURE_NPOT_MIPMAP
|
||||
| COGL_FEATURE_TEXTURE_NPOT_REPEAT;
|
||||
| COGL_FEATURE_TEXTURE_NPOT_MIPMAP;
|
||||
COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_TEXTURE_NPOT, TRUE);
|
||||
COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
|
||||
COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP, TRUE);
|
||||
COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT, TRUE);
|
||||
|
||||
if (_cogl_check_extension ("GL_MESA_pack_invert", gl_extensions))
|
||||
COGL_FLAGS_SET (private_features,
|
||||
|
@ -351,15 +351,12 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
|
||||
flags |= (COGL_FEATURE_TEXTURE_NPOT |
|
||||
COGL_FEATURE_TEXTURE_NPOT_BASIC |
|
||||
COGL_FEATURE_TEXTURE_NPOT_MIPMAP |
|
||||
COGL_FEATURE_TEXTURE_NPOT_REPEAT);
|
||||
COGL_FEATURE_TEXTURE_NPOT_MIPMAP);
|
||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_TEXTURE_NPOT, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP, TRUE);
|
||||
COGL_FLAGS_SET (context->features,
|
||||
COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT, TRUE);
|
||||
|
||||
if (context->glMapBuffer)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user