diff options
author | Ian Romanick <[email protected]> | 2015-11-03 15:37:40 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-11-24 11:31:29 -0800 |
commit | 1035e00a815f0babddac0c6c43d01fd34f7e8a94 (patch) | |
tree | bac2ecfdebd5e7e6932e585ab8619d75ae97c78f /src/mesa/drivers/common/meta_generate_mipmap.c | |
parent | 3b5a7d450dea9bfadf1d72338f4418c87340805b (diff) |
meta: Track VBO using gl_buffer_object instead of GL API object handle
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta_generate_mipmap.c')
-rw-r--r-- | src/mesa/drivers/common/meta_generate_mipmap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c index 28fc5ebe812..97a4297c2f6 100644 --- a/src/mesa/drivers/common/meta_generate_mipmap.c +++ b/src/mesa/drivers/common/meta_generate_mipmap.c @@ -126,8 +126,8 @@ _mesa_meta_glsl_generate_mipmap_cleanup(struct gen_mipmap_state *mipmap) return; _mesa_DeleteVertexArrays(1, &mipmap->VAO); mipmap->VAO = 0; - _mesa_DeleteBuffers(1, &mipmap->VBO); - mipmap->VBO = 0; + _mesa_DeleteBuffers(1, &mipmap->buf_obj->Name); + mipmap->buf_obj->Name = NULL; _mesa_DeleteSamplers(1, &mipmap->Sampler); mipmap->Sampler = 0; @@ -196,11 +196,11 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, * GenerateMipmap function. */ if (use_glsl_version) { - _mesa_meta_setup_vertex_objects(ctx, &mipmap->VAO, &mipmap->VBO, true, + _mesa_meta_setup_vertex_objects(ctx, &mipmap->VAO, &mipmap->buf_obj, true, 2, 4, 0); _mesa_meta_setup_blit_shader(ctx, target, false, &mipmap->shaders); } else { - _mesa_meta_setup_ff_tnl_for_blit(ctx, &mipmap->VAO, &mipmap->VBO, 3); + _mesa_meta_setup_ff_tnl_for_blit(ctx, &mipmap->VAO, &mipmap->buf_obj, 3); _mesa_set_enable(ctx, target, GL_TRUE); } @@ -335,8 +335,8 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, verts[3].tex); /* upload vertex data */ - _mesa_NamedBufferData(mipmap->VBO, sizeof(verts), verts, - GL_DYNAMIC_DRAW); + _mesa_buffer_data(ctx, mipmap->buf_obj, GL_NONE, sizeof(verts), verts, + GL_DYNAMIC_DRAW, __func__); _mesa_meta_bind_fbo_image(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, dstImage, layer); |