summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-11-02 18:36:34 -0800
committerIan Romanick <[email protected]>2015-11-24 11:50:29 -0800
commit36afa9988b79ed513ac72706b1b72ff2f3c33f1d (patch)
tree282b0d2c21bdae854b61e79e3a60a1f369acdaf9
parent896fe2da47d73b748356f128013bade61a1169ca (diff)
meta: Use _mesa_NamedBufferData and _mesa_NamedBufferSubData for users of _mesa_meta_setup_vertex_objects
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 7f2f3000716d994d94c53f4a0c8a211fb00a46a4)
-rw-r--r--src/mesa/drivers/common/meta.c12
-rw-r--r--src/mesa/drivers/common/meta_blit.c2
-rw-r--r--src/mesa/drivers/common/meta_generate_mipmap.c4
3 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index bde544ef490..b27721ba92e 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -1804,8 +1804,7 @@ meta_clear(struct gl_context *ctx, GLbitfield buffers, bool glsl)
}
/* upload new vertex data */
- _mesa_BufferData(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts,
- GL_DYNAMIC_DRAW_ARB);
+ _mesa_NamedBufferData(clear->VBO, sizeof(verts), verts, GL_DYNAMIC_DRAW);
/* draw quad(s) */
if (fb->MaxNumLayers > 0) {
@@ -1891,7 +1890,7 @@ _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY,
verts[3].tex[1] = tex->Ttop;
/* upload new vertex data */
- _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
+ _mesa_NamedBufferSubData(copypix->VBO, 0, sizeof(verts), verts);
}
_mesa_set_enable(ctx, tex->Target, GL_TRUE);
@@ -2209,8 +2208,7 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
}
/* upload new vertex data */
- _mesa_BufferData(GL_ARRAY_BUFFER_ARB, sizeof(verts),
- verts, GL_DYNAMIC_DRAW_ARB);
+ _mesa_NamedBufferData(drawpix->VBO, sizeof(verts), verts, GL_DYNAMIC_DRAW);
/* set given unpack params */
ctx->Unpack = *unpack;
@@ -2410,7 +2408,7 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
}
/* upload new vertex data */
- _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
+ _mesa_NamedBufferSubData(bitmap->VBO, 0, sizeof(verts), verts);
}
/* choose different foreground/background alpha values */
@@ -3115,7 +3113,7 @@ decompress_texture_image(struct gl_context *ctx,
_mesa_set_viewport(ctx, 0, 0, 0, width, height);
/* upload new vertex data */
- _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
+ _mesa_NamedBufferSubData(decompress->VBO, 0, sizeof(verts), verts);
/* setup texture state */
_mesa_BindTexture(target, texObj->Name);
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 7d5fde9645b..16a5fc98c03 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -757,7 +757,7 @@ blitframebuffer_texture(struct gl_context *ctx,
verts[3].tex[1] = t1;
verts[3].tex[2] = readAtt->Zoffset;
- _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
+ _mesa_NamedBufferSubData(blit->VBO, 0, sizeof(verts), verts);
}
/* setup viewport */
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c
index 9d3b9b6ebe9..9e6eaa997b7 100644
--- a/src/mesa/drivers/common/meta_generate_mipmap.c
+++ b/src/mesa/drivers/common/meta_generate_mipmap.c
@@ -331,8 +331,8 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
verts[3].tex);
/* upload vertex data */
- _mesa_BufferData(GL_ARRAY_BUFFER_ARB, sizeof(verts),
- verts, GL_DYNAMIC_DRAW_ARB);
+ _mesa_NamedBufferData(mipmap->VBO, sizeof(verts), verts,
+ GL_DYNAMIC_DRAW);
_mesa_meta_bind_fbo_image(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, dstImage, layer);