mesa: add texsubimage() helper
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 1 Jun 2017 10:36:06 +0000 (12:36 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 7 Jun 2017 09:04:36 +0000 (11:04 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/main/teximage.c

index b262e75b9d6000f68d79aec200e209868fc1246e..f4c14d8e7d3a7dfbb61af5c0ceda671c0d05de25 100644 (file)
@@ -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.