mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 23:46:33 -05:00
cogl: VBOs are always available
ARB_vertex_buffer_object was promoted to core in GL 1.5 (and thus GLES 2.0). https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
This commit is contained in:
parent
ba9fb16048
commit
de362537c6
@ -137,12 +137,6 @@ _cogl_buffer_initialize (CoglBuffer *buffer,
|
||||
if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_PBOS))
|
||||
use_malloc = TRUE;
|
||||
}
|
||||
else if (default_target == COGL_BUFFER_BIND_TARGET_ATTRIBUTE_BUFFER ||
|
||||
default_target == COGL_BUFFER_BIND_TARGET_INDEX_BUFFER)
|
||||
{
|
||||
if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_VBOS))
|
||||
use_malloc = TRUE;
|
||||
}
|
||||
|
||||
if (use_malloc)
|
||||
{
|
||||
|
@ -98,9 +98,6 @@ static CoglContext *_cogl_context = NULL;
|
||||
static void
|
||||
_cogl_init_feature_overrides (CoglContext *ctx)
|
||||
{
|
||||
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_VBOS)))
|
||||
COGL_FLAGS_SET (ctx->private_features, COGL_PRIVATE_FEATURE_VBOS, FALSE);
|
||||
|
||||
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_PBOS)))
|
||||
COGL_FLAGS_SET (ctx->private_features, COGL_PRIVATE_FEATURE_PBOS, FALSE);
|
||||
}
|
||||
|
@ -94,11 +94,6 @@ OPT (DISABLE_BATCHING,
|
||||
"disable-batching",
|
||||
N_("Disable Journal batching"),
|
||||
N_("Disable batching of geometry in the Cogl Journal."))
|
||||
OPT (DISABLE_VBOS,
|
||||
N_("Root Cause"),
|
||||
"disable-vbos",
|
||||
N_("Disable GL Vertex Buffers"),
|
||||
N_("Disable use of OpenGL vertex buffer objects"))
|
||||
OPT (DISABLE_PBOS,
|
||||
N_("Root Cause"),
|
||||
"disable-pbos",
|
||||
|
@ -70,7 +70,6 @@ static const int n_cogl_log_debug_keys =
|
||||
static const GDebugKey cogl_behavioural_debug_keys[] = {
|
||||
{ "rectangles", COGL_DEBUG_RECTANGLES },
|
||||
{ "disable-batching", COGL_DEBUG_DISABLE_BATCHING },
|
||||
{ "disable-vbos", COGL_DEBUG_DISABLE_VBOS },
|
||||
{ "disable-pbos", COGL_DEBUG_DISABLE_PBOS },
|
||||
{ "disable-software-transform", COGL_DEBUG_DISABLE_SOFTWARE_TRANSFORM },
|
||||
{ "dump-atlas-image", COGL_DEBUG_DUMP_ATLAS_IMAGE },
|
||||
|
@ -49,7 +49,6 @@ typedef enum
|
||||
COGL_DEBUG_OBJECT,
|
||||
COGL_DEBUG_BLEND_STRINGS,
|
||||
COGL_DEBUG_DISABLE_BATCHING,
|
||||
COGL_DEBUG_DISABLE_VBOS,
|
||||
COGL_DEBUG_DISABLE_PBOS,
|
||||
COGL_DEBUG_JOURNAL,
|
||||
COGL_DEBUG_BATCHING,
|
||||
|
@ -1127,12 +1127,6 @@ create_attribute_buffer (CoglJournal *journal,
|
||||
CoglAttributeBuffer *vbo;
|
||||
CoglContext *ctx = journal->framebuffer->context;
|
||||
|
||||
/* If CoglBuffers are being emulated with malloc then there's not
|
||||
really any point in using the pool so we'll just allocate the
|
||||
buffer directly */
|
||||
if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_VBOS))
|
||||
return cogl_attribute_buffer_new_with_size (ctx, n_bytes);
|
||||
|
||||
vbo = journal->vbo_pool[journal->next_vbo_in_pool];
|
||||
|
||||
if (vbo == NULL)
|
||||
|
@ -44,7 +44,6 @@ typedef enum
|
||||
COGL_PRIVATE_FEATURE_MESA_PACK_INVERT,
|
||||
COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER,
|
||||
COGL_PRIVATE_FEATURE_PBOS,
|
||||
COGL_PRIVATE_FEATURE_VBOS,
|
||||
COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL,
|
||||
COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL,
|
||||
COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_BGRA8888,
|
||||
|
@ -118,7 +118,6 @@ typedef struct _CoglTextureVertex CoglTextureVertex;
|
||||
* @COGL_FEATURE_OFFSCREEN_MULTISAMPLE: Multisample support on FBOs
|
||||
* @COGL_FEATURE_FOUR_CLIP_PLANES: At least 4 clip planes available
|
||||
* @COGL_FEATURE_STENCIL_BUFFER: Stencil buffer support
|
||||
* @COGL_FEATURE_VBOS: VBO support
|
||||
* @COGL_FEATURE_PBOS: PBO support
|
||||
* @COGL_FEATURE_UNSIGNED_INT_INDICES: Set if
|
||||
* %COGL_INDICES_TYPE_UNSIGNED_INT is supported in
|
||||
@ -145,7 +144,6 @@ typedef enum
|
||||
COGL_FEATURE_OFFSCREEN_MULTISAMPLE = (1 << 7),
|
||||
COGL_FEATURE_FOUR_CLIP_PLANES = (1 << 9),
|
||||
COGL_FEATURE_STENCIL_BUFFER = (1 << 10),
|
||||
COGL_FEATURE_VBOS = (1 << 11),
|
||||
COGL_FEATURE_PBOS = (1 << 12),
|
||||
COGL_FEATURE_UNSIGNED_INT_INDICES = (1 << 13),
|
||||
COGL_FEATURE_DEPTH_RANGE = (1 << 14),
|
||||
|
@ -446,7 +446,6 @@ _cogl_driver_update_features (CoglContext *ctx,
|
||||
|
||||
if (ctx->glGenBuffers)
|
||||
{
|
||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_VBOS, TRUE);
|
||||
flags |= (COGL_FEATURE_MAP_BUFFER_FOR_READ |
|
||||
COGL_FEATURE_MAP_BUFFER_FOR_WRITE);
|
||||
COGL_FLAGS_SET (ctx->features,
|
||||
|
@ -315,7 +315,6 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
COGL_FLAGS_SET (private_features,
|
||||
COGL_PRIVATE_FEATURE_BLEND_CONSTANT, TRUE);
|
||||
|
||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_VBOS, TRUE);
|
||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ANY_GL, TRUE);
|
||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ALPHA_TEXTURES, TRUE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user