From: Andres Rodriguez <andre...@gmail.com> Plumbing for using memory objects as texture storage.
Signed-off-by: Andres Rodriguez <andre...@gmail.com> Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> Reviewed-by: Marek Olšák <marek.ol...@amd.com> --- src/mesa/state_tracker/st_cb_texture.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index d0a7b55..4e149c6 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -2647,18 +2647,16 @@ st_finalize_texture(struct gl_context *ctx, return GL_TRUE; } - /** - * Called via ctx->Driver.AllocTextureStorage() to allocate texture memory - * for a whole mipmap stack. + * Allocate texture memory for a whole mipmap stack. * Note: for multisample textures if the requested sample count is not * supported, we search for the next higher supported sample count. */ static GLboolean -st_AllocTextureStorage(struct gl_context *ctx, - struct gl_texture_object *texObj, - GLsizei levels, GLsizei width, - GLsizei height, GLsizei depth) +st_texture_storage(struct gl_context *ctx, + struct gl_texture_object *texObj, + GLsizei levels, GLsizei width, + GLsizei height, GLsizei depth) { const GLuint numFaces = _mesa_num_tex_faces(texObj->Target); struct gl_texture_image *texImage = texObj->Image[0][0]; @@ -2736,6 +2734,20 @@ st_AllocTextureStorage(struct gl_context *ctx, return GL_TRUE; } +/** + * Called via ctx->Driver.AllocTextureStorage() to allocate texture memory + * for a whole mipmap stack. + */ +static GLboolean +st_AllocTextureStorage(struct gl_context *ctx, + struct gl_texture_object *texObj, + GLsizei levels, GLsizei width, + GLsizei height, GLsizei depth) +{ + return st_texture_storage(ctx, texObj, levels, + width, height, depth); +} + static GLboolean st_TestProxyTexImage(struct gl_context *ctx, GLenum target, -- 2.9.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev