summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_context.h16
-rw-r--r--src/gallium/include/pipe/p_defines.h9
2 files changed, 21 insertions, 4 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 2452bf3522b..29095dcdc3b 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -205,12 +205,20 @@ struct pipe_context {
unsigned dstx, unsigned dsty,
unsigned width, unsigned height,
unsigned value);
-
- void (*clear)(struct pipe_context *pipe,
- struct pipe_surface *ps,
- unsigned clearValue);
/*@}*/
+ /**
+ * Clear the specified set of currently bound buffers to specified values.
+ *
+ * buffers is a bitfield of PIPE_CLEAR_* values.
+ *
+ * rgba is a pointer to an array of one float for each of r, g, b, a.
+ */
+ void (*clear)(struct pipe_context *pipe,
+ unsigned buffers,
+ const float *rgba,
+ double depth,
+ unsigned stencil);
/** Flush rendering (flags = bitmask of PIPE_FLUSH_x tokens) */
void (*flush)( struct pipe_context *pipe,
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 8e4f253359a..81defa445bf 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -186,6 +186,15 @@ enum pipe_texture_target {
/**
+ * Clear buffer bits
+ */
+/** All color buffers currently bound */
+#define PIPE_CLEAR_COLOR (1 << 0)
+/** Depth/stencil combined */
+#define PIPE_CLEAR_DEPTHSTENCIL (1 << 1)
+
+
+/**
* Transfer object usage flags
*/
enum pipe_transfer_usage {