summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_context.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-01-11 17:38:08 -0500
committerNicolai Hähnle <[email protected]>2016-01-14 09:39:38 -0500
commit654670b4048ae079879a04c41829902060a93931 (patch)
treeb9265281a70b2805571a804434f6fb75f375dc84 /src/gallium/include/pipe/p_context.h
parent6f4ae810056a1f3c53efe6f0576b9b9c4e847a80 (diff)
gallium: add PIPE_CAP_INVALIDATE_BUFFER
It makes sense to re-use pipe->invalidate_resource for the purpose of glInvalidateBufferData, but this function is already implemented in vc4 where it doesn't have the expected behavior. So add a capability flag to indicate that the driver supports the expected behavior. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe/p_context.h')
-rw-r--r--src/gallium/include/pipe/p_context.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index be7447de67d..78155c05348 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -649,11 +649,15 @@ struct pipe_context {
struct pipe_resource *resource);
/**
- * Invalidate the contents of the resource.
+ * Invalidate the contents of the resource. This is used to
*
- * This is used to implement EGL's semantic of undefined depth/stencil
+ * (1) implement EGL's semantic of undefined depth/stencil
* contenst after a swapbuffers. This allows a tiled renderer (for
* example) to not store the depth buffer.
+ *
+ * (2) implement GL's InvalidateBufferData. For backwards compatibility,
+ * you must only rely on the usability for this purpose when
+ * PIPE_CAP_INVALIDATE_BUFFER is enabled.
*/
void (*invalidate_resource)(struct pipe_context *ctx,
struct pipe_resource *resource);