summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-11-05 14:16:31 -0800
committerIan Romanick <[email protected]>2015-11-24 11:36:06 -0800
commit79468fac69974bd94fe2bda0882ca97c83abfd41 (patch)
tree2daae06ccad8be1f16e979bb9130a68e9c103011 /src/mesa/drivers/common/meta.c
parent756e323f2c84c8839908bec7393b73b4283c8a7d (diff)
meta: Partially convert _mesa_meta_DrawTex to DSA
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit d5225ee5d92f00958c54b425fe829c811149e889)
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r--src/mesa/drivers/common/meta.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1b657287839..328e06069d4 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3316,14 +3316,15 @@ _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
_mesa_BindVertexArray(drawtex->VAO);
/* create vertex array buffer */
- _mesa_GenBuffers(1, &drawtex->VBO);
- _mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, drawtex->VBO);
- _mesa_BufferData(GL_ARRAY_BUFFER_ARB, sizeof(verts),
- NULL, GL_DYNAMIC_DRAW_ARB);
+ _mesa_CreateBuffers(1, &drawtex->VBO);
+ _mesa_NamedBufferData(drawtex->VBO, sizeof(verts),
+ NULL, GL_DYNAMIC_DRAW_ARB);
/* client active texture is not part of the array object */
active_texture = ctx->Array.ActiveTexture;
+ _mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, drawtex->VBO);
+
/* setup vertex arrays */
_mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x));
_mesa_EnableClientState(GL_VERTEX_ARRAY);
@@ -3338,7 +3339,6 @@ _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
}
else {
_mesa_BindVertexArray(drawtex->VAO);
- _mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, drawtex->VBO);
}
/* vertex positions, texcoords */
@@ -3403,7 +3403,7 @@ _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
verts[3].st[i][1] = t1;
}
- _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
+ _mesa_NamedBufferSubData(drawtex->VBO, 0, sizeof(verts), verts);
}
_mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4);