summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-11-24 13:59:06 +0900
committerJosé Fonseca <[email protected]>2008-11-24 13:59:06 +0900
commita6d866f72c88d48d2bcfb3e3c882fdb639b5a8ce (patch)
tree200cb8e07bf58d0dd8e220ba6b5af0b074804b15 /src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
parentd600c805c08288757185ce3af24b5f0a866bb0b2 (diff)
pipebuffer: Implement proper buffer validation.
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
index 2a801549202..9b9fedccb4b 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
@@ -248,6 +248,25 @@ pb_slab_buffer_unmap(struct pb_buffer *_buf)
}
+static enum pipe_error
+pb_slab_buffer_validate(struct pb_buffer *_buf,
+ struct pb_validate *vl,
+ unsigned flags)
+{
+ struct pb_slab_buffer *buf = pb_slab_buffer(_buf);
+ return pb_validate(buf->slab->bo, vl, flags);
+}
+
+
+static void
+pb_slab_buffer_fence(struct pb_buffer *_buf,
+ struct pipe_fence_handle *fence)
+{
+ struct pb_slab_buffer *buf = pb_slab_buffer(_buf);
+ pb_fence(buf->slab->bo, fence);
+}
+
+
static void
pb_slab_buffer_get_base_buffer(struct pb_buffer *_buf,
struct pb_buffer **base_buf,
@@ -264,6 +283,8 @@ pb_slab_buffer_vtbl = {
pb_slab_buffer_destroy,
pb_slab_buffer_map,
pb_slab_buffer_unmap,
+ pb_slab_buffer_validate,
+ pb_slab_buffer_fence,
pb_slab_buffer_get_base_buffer
};