[Mesa-dev] [PATCH 20/21] mesa: add texsubimage() helper
Timothy Arceri
tarceri at itsqueeze.com
Sun Jun 4 22:16:46 UTC 2017
On 01/06/17 23:05, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/mesa/main/teximage.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 9285a96b68..ca8090f653 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -3282,6 +3282,24 @@ texsubimage_err(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
> }
>
>
> +static void
> +texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
> + GLint xoffset, GLint yoffset, GLint zoffset,
> + GLsizei width, GLsizei height, GLsizei depth,
> + GLenum format, GLenum type, const GLvoid *pixels)
> +{
> + struct gl_texture_object *texObj;
> + struct gl_texture_image *texImage;
> +
> + texObj = _mesa_get_current_tex_object(ctx, target);
> + texImage = _mesa_select_tex_image(texObj, target, level);
> +
> + _mesa_texture_sub_image(ctx, dims, texObj, texImage, target, level,
> + xoffset, yoffset, zoffset, width, height, depth,
> + format, type, pixels, false);
Can we add a patch before this one that makes _mesa_texture_sub_image()
a static function? Looks like it is only used in this file. With that
19-21 are:
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
> +}
> +
> +
> /**
> * Implement all the glTextureSubImage1/2/3D() functions.
> * Must split this out this way because of GL_TEXTURE_CUBE_MAP.
>
More information about the mesa-dev
mailing list