aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-11-09 13:27:07 -0500
committerIlia Mirkin <[email protected]>2015-11-11 19:20:41 -0500
commit3695b253f908b58290d69e2d770209abf0c6beee (patch)
treeae49b3e0876518773e1765513a1a0f3e8245a040 /src/gallium/include/pipe
parent725fcdfbb11ff4c4399d58e08403e4e0064a8c5e (diff)
gallium: add PIPE_CAP_CLEAR_TEXTURE and clear_texture prototype
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_context.h10
-rw-r--r--src/gallium/include/pipe/p_defines.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 5adbd18e690..27f358f8fb9 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -380,6 +380,16 @@ struct pipe_context {
unsigned width, unsigned height);
/**
+ * Clear the texture with the specified texel. Not guaranteed to be a
+ * renderable format. Data provided in the resource's format.
+ */
+ void (*clear_texture)(struct pipe_context *pipe,
+ struct pipe_resource *res,
+ unsigned level,
+ const struct pipe_box *box,
+ const void *data);
+
+ /**
* Clear a buffer. Runs a memset over the specified region with the element
* value passed in through clear_value of size clear_value_size.
*/
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index d6f87ccae12..7240154727e 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -634,6 +634,7 @@ enum pipe_cap
PIPE_CAP_FORCE_PERSAMPLE_INTERP,
PIPE_CAP_SHAREABLE_SHADERS,
PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS,
+ PIPE_CAP_CLEAR_TEXTURE,
};
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)