Mesa (master): pipebuffer: Cleanup code & comments.
Keith Whitwell
keithw at kemper.freedesktop.org
Tue Mar 3 11:55:34 UTC 2009
Module: Mesa
Branch: master
Commit: 050ce17799cbe652962f898942ae6551d31f21a2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=050ce17799cbe652962f898942ae6551d31f21a2
Author: José Fonseca <jfonseca at vmware.com>
Date: Mon Mar 2 17:45:35 2009 +0000
pipebuffer: Cleanup code & comments.
---
.../auxiliary/pipebuffer/pb_buffer_fenced.c | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index 788bf90..9282bca 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -419,16 +419,14 @@ buffer_fence(struct pb_buffer *buf,
if(buf->vtbl != &fenced_buffer_vtbl)
return;
+ if(!fence)
+ return;
+
fenced_buf = fenced_buffer(buf);
fenced_list = fenced_buf->list;
winsys = fenced_list->winsys;
- if(!fence || fence == fenced_buf->fence) {
- /* Handle the same fence case specially, not only because it is a fast
- * path, but mostly to avoid serializing two writes with the same fence,
- * as that would bring the hardware down to synchronous operation without
- * any benefit.
- */
+ if(fence == fenced_buf->fence) {
fenced_buf->flags |= flags & PIPE_BUFFER_USAGE_GPU_READ_WRITE;
return;
}
@@ -436,11 +434,9 @@ buffer_fence(struct pb_buffer *buf,
pipe_mutex_lock(fenced_list->mutex);
if (fenced_buf->fence)
_fenced_buffer_remove(fenced_list, fenced_buf);
- if (fence) {
- winsys->fence_reference(winsys, &fenced_buf->fence, fence);
- fenced_buf->flags |= flags & PIPE_BUFFER_USAGE_GPU_READ_WRITE;
- _fenced_buffer_add(fenced_buf);
- }
+ winsys->fence_reference(winsys, &fenced_buf->fence, fence);
+ fenced_buf->flags |= flags & PIPE_BUFFER_USAGE_GPU_READ_WRITE;
+ _fenced_buffer_add(fenced_buf);
pipe_mutex_unlock(fenced_list->mutex);
}
More information about the mesa-commit
mailing list