summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/r600/drm
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2010-09-20 15:35:19 -0400
committerJerome Glisse <[email protected]>2010-09-20 16:02:13 -0400
commit0f099f2906773690210661fb533e207626dc8e40 (patch)
tree02bbbc267829fa51a799fa117ed7062ba8f085c4 /src/gallium/winsys/r600/drm
parent021e68b2cdc9a675887dac33689d5ffe244d8f9a (diff)
r600g: use pipe context for flushing inside map
This allow to share code path btw old & new, also remove check on reference this might make things a little slower but new design doesn't use reference stuff. Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/winsys/r600/drm')
-rw-r--r--src/gallium/winsys/r600/drm/radeon_bo_pb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon_bo_pb.c b/src/gallium/winsys/r600/drm/radeon_bo_pb.c
index 93dc927aba4..148cf6d81d2 100644
--- a/src/gallium/winsys/r600/drm/radeon_bo_pb.c
+++ b/src/gallium/winsys/r600/drm/radeon_bo_pb.c
@@ -53,7 +53,9 @@ radeon_bo_pb_map_internal(struct pb_buffer *_buf,
unsigned flags, void *ctx)
{
struct radeon_bo_pb *buf = radeon_bo_pb(_buf);
+ struct pipe_context *pctx = ctx;
+//printf("%s:%d ************************************************\n", __func__, __LINE__);
if (flags & PB_USAGE_UNSYNCHRONIZED) {
if (!buf->bo->data && radeon_bo_map(buf->mgr->radeon, buf->bo)) {
return NULL;
@@ -62,13 +64,11 @@ radeon_bo_pb_map_internal(struct pb_buffer *_buf,
return buf->bo->data;
}
- if (p_atomic_read(&buf->bo->reference.count) > 1) {
- if (flags & PB_USAGE_DONTBLOCK) {
- return NULL;
- }
- if (ctx) {
- r600_flush_ctx(ctx);
- }
+ if (flags & PB_USAGE_DONTBLOCK) {
+ return NULL;
+ }
+ if (ctx) {
+ pctx->flush(pctx, 0, NULL);
}
if (flags & PB_USAGE_DONTBLOCK) {