summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2014-08-10 16:00:31 -0700
committerKristian Høgsberg <krh@bitplanet.net>2014-08-15 11:25:47 -0700
commitba4507576c803cdb1aba4e317662a4bde79bf826 (patch)
treec3f904b97942405a3ec7deb60cecab68cd304734
parent5fad83bdf8be62e448dd3d60fa39daca6f1c7c0d (diff)
downloadexternal_mesa3d-ba4507576c803cdb1aba4e317662a4bde79bf826.zip
external_mesa3d-ba4507576c803cdb1aba4e317662a4bde79bf826.tar.gz
external_mesa3d-ba4507576c803cdb1aba4e317662a4bde79bf826.tar.bz2
meta: Export _mesa_meta_drawbuffers_from_bitfield()
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>
-rw-r--r--src/mesa/drivers/common/meta.c6
-rw-r--r--src/mesa/drivers/common/meta.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 439c7e2..f60f273 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -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 */
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
index 3ec7398..56ba9bc 100644
--- a/src/mesa/drivers/common/meta.h
+++ b/src/mesa/drivers/common/meta.h
@@ -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);