meta: Export _mesa_meta_drawbuffers_from_bitfield()
authorKristian Høgsberg <krh@bitplanet.net>
Sun, 10 Aug 2014 23:00:31 +0000 (16:00 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 15 Aug 2014 18:25:47 +0000 (11:25 -0700)
We'll use this in the i965 fast clear implementation.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/mesa/drivers/common/meta.c
src/mesa/drivers/common/meta.h

index 439c7e2f6858449e3b33f9f56f79854f539b6480..f60f2735465b2c8e1b70b1b454d503b28ab395bb 100644 (file)
@@ -1653,8 +1653,8 @@ meta_glsl_clear_cleanup(struct clear_state *clear)
  * Since the bitfield has no associated order, the assignment of draw buffer
  * indices to color attachment indices is rather arbitrary.
  */
-static void
-drawbuffers_from_bitfield(GLbitfield bits)
+void
+_mesa_meta_drawbuffers_from_bitfield(GLbitfield bits)
 {
    GLenum enums[MAX_DRAW_BUFFERS];
    int i = 0;
@@ -1767,7 +1767,7 @@ meta_clear(struct gl_context *ctx, GLbitfield buffers, bool glsl)
    /* GL_COLOR_BUFFER_BIT */
    if (buffers & BUFFER_BITS_COLOR) {
       /* Only draw to the buffers we were asked to clear. */
-      drawbuffers_from_bitfield(buffers & BUFFER_BITS_COLOR);
+      _mesa_meta_drawbuffers_from_bitfield(buffers & BUFFER_BITS_COLOR);
 
       /* leave colormask state as-is */
 
index 3ec73982258dc4bf5f3758a02abe4a6ad6edc435..56ba9bc659893625a9d5a6fafd9a63b81bed611d 100644 (file)
@@ -511,6 +511,9 @@ _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
                    GLfloat width, GLfloat height);
 
 /* meta-internal functions */
+void
+_mesa_meta_drawbuffers_from_bitfield(GLbitfield bits);
+
 GLuint
 _mesa_meta_compile_shader_with_debug(struct gl_context *ctx, GLenum target,
                                      const GLcharARB *source);