From 10cf7a5113446c85dd39bbb12544dd4ac30a0200 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 29 Jan 2020 16:09:24 -0500 Subject: [PATCH] vbo: create the immediate mode buffer only in vbo_exec_vtx_map MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Mathias Fröhlich Part-of: --- src/mesa/vbo/vbo_exec_api.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 231fd7545ef..37ce92d6041 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -973,9 +973,6 @@ vbo_use_buffer_objects(struct gl_context *ctx) * go into the bufferobj hashtable. */ GLuint bufName = IMM_BUFFER_NAME; - GLenum target = GL_ARRAY_BUFFER_ARB; - GLenum usage = GL_STREAM_DRAW_ARB; - GLsizei size = VBO_VERT_BUFFER_SIZE; /* Make sure this func is only used once */ assert(exec->vtx.bufferobj == ctx->Shared->NullBufferObj); @@ -987,13 +984,6 @@ vbo_use_buffer_objects(struct gl_context *ctx) /* Allocate a real buffer object now */ _mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL); exec->vtx.bufferobj = ctx->Driver.NewBufferObject(ctx, bufName); - if (!ctx->Driver.BufferData(ctx, target, size, NULL, usage, - GL_MAP_WRITE_BIT | - GL_DYNAMIC_STORAGE_BIT | - GL_CLIENT_STORAGE_BIT, - exec->vtx.bufferobj)) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "VBO allocation"); - } } -- 2.30.2