mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
meta: Use _mesa_NamedBufferData and _mesa_NamedBufferSubData for users of _mesa_meta_setup_vertex_objects
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
89a61afdd7
commit
7f2f300071
3 changed files with 8 additions and 10 deletions
|
|
@ -1817,8 +1817,7 @@ meta_clear(struct gl_context *ctx, GLbitfield buffers, bool glsl)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* upload new vertex data */
|
/* upload new vertex data */
|
||||||
_mesa_BufferData(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts,
|
_mesa_NamedBufferData(clear->VBO, sizeof(verts), verts, GL_DYNAMIC_DRAW);
|
||||||
GL_DYNAMIC_DRAW_ARB);
|
|
||||||
|
|
||||||
/* draw quad(s) */
|
/* draw quad(s) */
|
||||||
if (fb->MaxNumLayers > 0) {
|
if (fb->MaxNumLayers > 0) {
|
||||||
|
|
@ -1904,7 +1903,7 @@ _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY,
|
||||||
verts[3].tex[1] = tex->Ttop;
|
verts[3].tex[1] = tex->Ttop;
|
||||||
|
|
||||||
/* upload new vertex data */
|
/* 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);
|
_mesa_set_enable(ctx, tex->Target, GL_TRUE);
|
||||||
|
|
@ -2222,8 +2221,7 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* upload new vertex data */
|
/* upload new vertex data */
|
||||||
_mesa_BufferData(GL_ARRAY_BUFFER_ARB, sizeof(verts),
|
_mesa_NamedBufferData(drawpix->VBO, sizeof(verts), verts, GL_DYNAMIC_DRAW);
|
||||||
verts, GL_DYNAMIC_DRAW_ARB);
|
|
||||||
|
|
||||||
/* set given unpack params */
|
/* set given unpack params */
|
||||||
ctx->Unpack = *unpack;
|
ctx->Unpack = *unpack;
|
||||||
|
|
@ -2423,7 +2421,7 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* upload new vertex data */
|
/* 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 */
|
/* choose different foreground/background alpha values */
|
||||||
|
|
@ -3128,7 +3126,7 @@ decompress_texture_image(struct gl_context *ctx,
|
||||||
_mesa_set_viewport(ctx, 0, 0, 0, width, height);
|
_mesa_set_viewport(ctx, 0, 0, 0, width, height);
|
||||||
|
|
||||||
/* upload new vertex data */
|
/* 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 */
|
/* setup texture state */
|
||||||
_mesa_BindTexture(target, texObj->Name);
|
_mesa_BindTexture(target, texObj->Name);
|
||||||
|
|
|
||||||
|
|
@ -789,7 +789,7 @@ blitframebuffer_texture(struct gl_context *ctx,
|
||||||
verts[3].tex[1] = t1;
|
verts[3].tex[1] = t1;
|
||||||
verts[3].tex[2] = readAtt->Zoffset;
|
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 */
|
/* setup viewport */
|
||||||
|
|
|
||||||
|
|
@ -335,8 +335,8 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
|
||||||
verts[3].tex);
|
verts[3].tex);
|
||||||
|
|
||||||
/* upload vertex data */
|
/* upload vertex data */
|
||||||
_mesa_BufferData(GL_ARRAY_BUFFER_ARB, sizeof(verts),
|
_mesa_NamedBufferData(mipmap->VBO, sizeof(verts), verts,
|
||||||
verts, GL_DYNAMIC_DRAW_ARB);
|
GL_DYNAMIC_DRAW);
|
||||||
|
|
||||||
_mesa_meta_bind_fbo_image(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, dstImage, layer);
|
_mesa_meta_bind_fbo_image(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, dstImage, layer);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue