From: Ian Romanick <ian.d.roman...@intel.com> Clean up a few stray calls to _mesa_BindVertexArray and _mesa_BindBuffer that are no longer necessary after the previous refactor.
Note: This should get squashed in with the previous commit when the series is pushed. --- src/mesa/drivers/common/meta.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 3661173..e03267e 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -1727,9 +1727,6 @@ blitframebuffer_texture(struct gl_context *ctx, setup_ff_blit_framebuffer(&ctx->Meta->Blit); } - _mesa_BindVertexArray(blit->ArrayObj); - _mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, blit->VBO); - _mesa_GenSamplers(1, &sampler); _mesa_BindSampler(ctx->Texture.CurrentUnit, sampler); @@ -1909,9 +1906,6 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx, setup_ff_blit_framebuffer(blit); } - _mesa_BindVertexArray(blit->ArrayObj); - _mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, blit->VBO); - /* Silence valgrind warnings about reading uninitialized stack. */ memset(verts, 0, sizeof(verts)); @@ -2199,12 +2193,11 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear) GLuint vs, gs = 0, fs; bool has_integer_textures; - if (clear->ArrayObj != 0) - return; - - /* create vertex array object */ setup_vertex_objects(&clear->ArrayObj, &clear->VBO, true, 3, 0, 0); + if (clear->ShaderProg != 0) + return; + vs = _mesa_CreateShaderObjectARB(GL_VERTEX_SHADER); _mesa_ShaderSource(vs, 1, &vs_source, NULL); _mesa_CompileShader(vs); @@ -2365,9 +2358,6 @@ _mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers) ctx->Color.ClearColor.f); } - _mesa_BindVertexArray(clear->ArrayObj); - _mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, clear->VBO); - /* GL_COLOR_BUFFER_BIT */ if (buffers & BUFFER_BITS_COLOR) { /* leave colormask, glDrawBuffer state as-is */ @@ -3364,7 +3354,7 @@ setup_texture_coords(GLenum faceTarget, static void setup_ff_generate_mipmap(struct gen_mipmap_state *mipmap) { - setup_vertex_objects(&mipmap->ArrayObj, &mipmap->VBO, false, 2, 3); + setup_vertex_objects(&mipmap->ArrayObj, &mipmap->VBO, false, 2, 3, 0); /* setup projection matrix */ _mesa_MatrixMode(GL_PROJECTION); @@ -3591,9 +3581,6 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, _mesa_set_enable(ctx, target, GL_TRUE); } - _mesa_BindVertexArray(mipmap->ArrayObj); - _mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, mipmap->VBO); - samplerSave = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler ? ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler->Name : 0; -- 1.8.1.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev