summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-06-01 12:36:06 +0200
committerSamuel Pitoiset <[email protected]>2017-06-07 11:04:36 +0200
commit7b104d9c50bb258ee8de6838a01c7ad0863bf4d4 (patch)
treeb6b4e813adc304f020be155aaa4fc0250aad30d7
parent3e34fc0363dfbb634ad2c36c2df66d4e6f77b23b (diff)
mesa: add texsubimage() helper
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r--src/mesa/main/teximage.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index b262e75b9d6..f4c14d8e7d3 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);
+
+ texture_sub_image(ctx, dims, texObj, texImage, target, level,
+ xoffset, yoffset, zoffset, width, height, depth,
+ format, type, pixels, false);
+}
+
+
/**
* Implement all the glTextureSubImage1/2/3D() functions.
* Must split this out this way because of GL_TEXTURE_CUBE_MAP.