aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-11-03 15:37:40 -0800
committerIan Romanick <[email protected]>2015-11-24 11:31:29 -0800
commit1035e00a815f0babddac0c6c43d01fd34f7e8a94 (patch)
treebac2ecfdebd5e7e6932e585ab8619d75ae97c78f /src/mesa/drivers/dri
parent3b5a7d450dea9bfadf1d72338f4418c87340805b (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/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
index 8f7b0725a2a..dc07379fabf 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
@@ -286,7 +286,8 @@ setup_program(struct brw_context *brw, bool msaa_tex)
char *fs_source;
const struct sampler_and_fetch *sampler = &samplers[msaa_tex];
- _mesa_meta_setup_vertex_objects(ctx, &blit->VAO, &blit->VBO, true, 2, 2, 0);
+ _mesa_meta_setup_vertex_objects(&brw->ctx, &blit->VAO, &blit->buf_obj, true,
+ 2, 2, 0);
GLuint *prog_id = &brw->meta_stencil_blit_programs[msaa_tex];
@@ -372,7 +373,7 @@ adjust_mip_level(const struct intel_mipmap_tree *mt,
}
static void
-prepare_vertex_data(GLuint vbo)
+prepare_vertex_data(struct gl_context *ctx, struct gl_buffer_object *buf_obj)
{
static const struct vertex verts[] = {
{ .x = -1.0f, .y = -1.0f },
@@ -380,7 +381,7 @@ prepare_vertex_data(GLuint vbo)
{ .x = 1.0f, .y = 1.0f },
{ .x = -1.0f, .y = 1.0f } };
- _mesa_NamedBufferSubData(vbo, 0, sizeof(verts), verts);
+ _mesa_buffer_sub_data(ctx, buf_obj, 0, sizeof(verts), verts, __func__);
}
static bool
@@ -460,7 +461,7 @@ brw_meta_stencil_blit(struct brw_context *brw,
_mesa_Uniform1i(_mesa_GetUniformLocation(prog, "dst_num_samples"),
dst_mt->num_samples);
- prepare_vertex_data(ctx->Meta->Blit.VBO);
+ prepare_vertex_data(ctx, ctx->Meta->Blit.buf_obj);
_mesa_set_viewport(ctx, 0, dims.dst_x0, dims.dst_y0,
dims.dst_x1 - dims.dst_x0, dims.dst_y1 - dims.dst_y0);
_mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);