summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/blend.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/blend.h')
-rw-r--r--src/mesa/main/blend.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index c95bc578961..6e56f2fd1ea 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -198,4 +198,14 @@ _mesa_flush_vertices_for_blend_adv(struct gl_context *ctx,
_mesa_flush_vertices_for_blend_state(ctx);
}
+static inline GLbitfield
+_mesa_replicate_colormask(GLbitfield mask0, unsigned num_buffers)
+{
+ GLbitfield mask = mask0;
+
+ for (unsigned i = 1; i < num_buffers; i++)
+ mask |= mask0 << (i * 4);
+ return mask;
+}
+
#endif