mesa: add no error version of framebuffer_texture_with_dims()
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 8 May 2017 00:59:15 +0000 (10:59 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 11 May 2017 03:53:39 +0000 (13:53 +1000)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/fbobject.c

index 4759441becc111a3aa2efa68237b70d14b9f5773..636cdd84707c8d2731e680b85eda2d03eebdffff 100644 (file)
@@ -3303,6 +3303,28 @@ _mesa_framebuffer_texture(struct gl_context *ctx, struct gl_framebuffer *fb,
 }
 
 
+static void
+framebuffer_texture_with_dims_no_error(GLenum target, GLenum attachment,
+                                       GLenum textarget, GLuint texture,
+                                       GLint level, GLint layer)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   /* Get the framebuffer object */
+   struct gl_framebuffer *fb = get_framebuffer_target(ctx, target);
+
+   /* Get the texture object */
+   struct gl_texture_object *texObj =
+      get_texture_for_framebuffer(ctx, texture);
+
+   struct gl_renderbuffer_attachment *att =
+      get_attachment(ctx, fb, attachment, NULL);
+
+   _mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
+                             level, layer, GL_FALSE);
+}
+
+
 static void
 framebuffer_texture_with_dims(int dims, GLenum target,
                               GLenum attachment, GLenum textarget,