"glNamedBufferPageCommitmentEXT"))
return;
} else {
- bufferObj = ctx->Shared->NullBufferObj;
+ /* GL_EXT_direct_state_access says about NamedBuffer* functions:
+ *
+ * There is no buffer corresponding to the name zero, these commands
+ * generate the INVALID_OPERATION error if the buffer parameter is
+ * zero.
+ */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glNamedBufferPageCommitmentEXT(buffer = 0)");
+ return;
}
buffer_page_commitment(ctx, bufferObj, offset, size, commit,
"glNamedBufferPageCommitmentEXT");
GLuint TextureStateStamp; /**< state notification for shared tex */
/*@}*/
- /** Default buffer object for vertex arrays that aren't in VBOs */
- struct gl_buffer_object *NullBufferObj;
-
/**
* \name Vertex/geometry/fragment programs
*/
_mesa_init_shader_includes(shared);
mtx_init(&shared->ShaderIncludeMutex, mtx_plain);
- /* Allocate the default buffer object */
- shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0);
- if (!shared->NullBufferObj)
- goto fail;
-
/* Create default texture objects */
for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {
/* NOTE: the order of these enums matches the TEXTURE_x_INDEX values */
shared->SemaphoreObjects = _mesa_NewHashTable();
return shared;
-
-fail:
- free_shared_state(ctx, shared);
- return NULL;
}
_mesa_DeleteHashTable(shared->RenderBuffers);
}
- if (shared->NullBufferObj)
- _mesa_reference_buffer_object(ctx, &shared->NullBufferObj, NULL);
-
if (shared->SyncObjects) {
set_foreach(shared->SyncObjects, entry) {
_mesa_unref_sync_object(ctx, (struct gl_sync_object *) entry->key, 1);
assert(!vao->SharedAndImmutable);
struct gl_vertex_buffer_binding *binding = &vao->BufferBinding[index];
- assert(vbo != ctx->Shared->NullBufferObj);
-
if (ctx->Const.VertexBufferOffsetIsInt32 && (int)offset < 0 &&
_mesa_is_bufferobj(vbo)) {
/* The offset will be interpreted as a signed int, so make sure