On Thu, Apr 8, 2010 at 3:54 PM, Keith Whitwell <kei...@vmware.com> wrote:
> OK, it seems like quite a few cases had migrated to the new
> buffer_map_range() behaviour. I've looked at all I can find and moved
> them back to the old behaviour.
>
> glean is passing now on softpipe.
>
There's now an assertion failure in pipe_buffer_flush_mapped_range. Given a
mapped range, the current behavior in debug build doesn't allow to flush its
subrange if it doesn't touch the last byte of the range. The attached patch
fixes that and changes u_uploadmgr for the mapped and flushed ranges to
match. Please review.
Other than that, it's stable as master. Thank you very much.
-Marek
From d351a37e320dcb027c43311dc620d44fdffa0a6d Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marek=20Ol=C5=A1=C3=A1k?= <mar...@gmail.com>
Date: Sat, 3 Apr 2010 07:58:34 +0200
Subject: [PATCH] util: fix assertion failures in pipe_buffer_flush_mapped_range
---
src/gallium/auxiliary/util/u_inlines.h | 2 +-
src/gallium/auxiliary/util/u_upload_mgr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index b1f2285..f9cd4e1 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -223,7 +223,7 @@ pipe_buffer_flush_mapped_range(struct pipe_context *pipe,
assert(length);
assert(transfer->box.x <= offset);
- assert(transfer->box.x + transfer->box.width <= offset + length);
+ assert(offset + length <= transfer->box.x + transfer->box.width);
/* Match old screen->buffer_flush_mapped_range() behaviour, where
* offset parameter is relative to the start of the buffer, not the
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index f8c3954..75d4443 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -95,7 +95,7 @@ my_buffer_write(struct pipe_context *pipe,
assert(dirty_size >= size);
assert(size);
- map = pipe_buffer_map_range(pipe, buf, offset, size,
+ map = pipe_buffer_map_range(pipe, buf, offset, dirty_size,
PIPE_TRANSFER_WRITE |
PIPE_TRANSFER_FLUSH_EXPLICIT |
PIPE_TRANSFER_DISCARD |
--
1.6.3.3
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev