summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-06-03 17:46:14 +0200
committerRoland Scheidegger <sroland@vmware.com>2010-06-03 17:46:14 +0200
commit992382762a74fd834926fd2c3cd9e14a186e2dd5 (patch)
treec4572bb01331b71931b3570b36a7acfc38f79a68 /src/gallium/include/pipe
parent05863c487756c1c9dc823cf639f77cad4111bd23 (diff)
parenta6e5c6c000df8655de3b41d5809547bb41c88c23 (diff)
Merge branch 'gallium-newclear'
Conflicts: src/gallium/state_trackers/python/p_context.i
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_context.h39
-rw-r--r--src/gallium/include/pipe/p_defines.h6
2 files changed, 30 insertions, 15 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 6b72983176..3e082bef2f 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -257,17 +257,6 @@ struct pipe_context {
unsigned width, unsigned height);
/**
- * Fill a region of a resource with a constant value.
- * Resources with nr_samples > 1 are not allowed.
- */
- void (*resource_fill_region)(struct pipe_context *pipe,
- struct pipe_resource *dst,
- struct pipe_subresource subdst,
- unsigned dstx, unsigned dsty, unsigned dstz,
- unsigned width, unsigned height,
- unsigned value);
-
- /**
* Resolve a multisampled resource into a non-multisampled one.
* Source and destination must have the same size and same format.
*/
@@ -290,9 +279,33 @@ struct pipe_context {
*/
void (*clear)(struct pipe_context *pipe,
unsigned buffers,
- const float *rgba,
+ const float *rgba,
double depth,
- unsigned stencil);
+ unsigned stencil);
+
+ /**
+ * Clear a color rendertarget surface.
+ * \param rgba pointer to an array of one float for each of r, g, b, a.
+ */
+ void (*clear_render_target)(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ const float *rgba,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height);
+
+ /**
+ * Clear a depth-stencil surface.
+ * \param clear_flags bitfield of PIPE_CLEAR_DEPTH/STENCIL values.
+ * \param depth depth clear value in [0,1].
+ * \param stencil stencil clear value
+ */
+ void (*clear_depth_stencil)(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height);
/** Flush rendering
* \param flags bitmask of PIPE_FLUSH_x tokens)
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index b54a6ef824..420649c5a9 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -189,9 +189,10 @@ enum pipe_texture_target {
*/
/** All color buffers currently bound */
#define PIPE_CLEAR_COLOR (1 << 0)
+#define PIPE_CLEAR_DEPTH (1 << 1)
+#define PIPE_CLEAR_STENCIL (1 << 2)
/** Depth/stencil combined */
-#define PIPE_CLEAR_DEPTHSTENCIL (1 << 1)
-
+#define PIPE_CLEAR_DEPTHSTENCIL (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL)
/**
* Transfer object usage flags
@@ -453,6 +454,7 @@ enum pipe_cap {
PIPE_CAP_INDEP_BLEND_ENABLE,
/** different blend funcs per rendertarget */
PIPE_CAP_INDEP_BLEND_FUNC,
+ PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE,
PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT,
PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT,
PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER,