The pipebuffer library works well with purely user space suballocation
of a big pinned buffer, but there are some further tweaks necessary in
order to use it with kernel TTM-like memory managers.

For example, one problem with pb_bufmgr_cache is that it doesn't try to
check if a buffer is busy (e.g., by trying to map with
PIPE_BUFFER_USAGE_DONTBLOCK) before reusing it. This worked fine so far
because fencing was implemented on top of buffer suballocation and
caching (ie., by the time a freed buffer was put in the cache list it
was already guaranteed to have no pending fences). But this is not true
if caching is used by itself on top of a kernel memory manager.

Thomas also noticed the way validation lists works also needs some
tweaks in order to work correctly.

I don't think there's anything fundamentally broken in pipebuffer lib,
just that we never had the need to make fix it so far.

Jose

On Sun, 2010-02-21 at 23:29 -0800, Dave Airlie wrote:
> Module: Mesa
> Branch: master
> Commit: b14548ea32000459f4f0c4b49f3fa11d1ee9c003
> URL:    
> http://cgit.freedesktop.org/mesa/mesa/commit/?id=b14548ea32000459f4f0c4b49f3fa11d1ee9c003
> 
> Author: Dave Airlie <airl...@redhat.com>
> Date:   Mon Feb 22 17:26:30 2010 +1000
> 
> Revert "r300g: rebuild winsys/pipe buffer handling and add buffer map"
> 
> This reverts commit fff5be8e7b4557c221f2425dcafc2e7cbbba76ba.
> 
> Probably went too soon with this, dileX reported OA not working for him
> it works here fine, but the optimisations I wanted aren't working properly
> yet so I'll fix that now.
> 
> Signed-off-by: Dave Airlie <airl...@redhat.com>
> 
> ---
> 
>  src/gallium/drivers/r300/Makefile                  |    1 -
>  src/gallium/drivers/r300/r300_context.c            |   38 +--
>  src/gallium/drivers/r300/r300_context.h            |    9 +-
>  src/gallium/drivers/r300/r300_cs.h                 |   22 +-
>  src/gallium/drivers/r300/r300_emit.c               |   54 ++--
>  src/gallium/drivers/r300/r300_render.c             |   33 +--
>  src/gallium/drivers/r300/r300_screen.c             |   38 +--
>  src/gallium/drivers/r300/r300_screen.h             |    2 +-
>  src/gallium/drivers/r300/r300_screen_buffer.c      |  222 ------------
>  src/gallium/drivers/r300/r300_screen_buffer.h      |   85 -----
>  src/gallium/drivers/r300/r300_state.c              |   25 +--
>  src/gallium/drivers/r300/r300_texture.c            |   41 +--
>  src/gallium/drivers/r300/r300_texture.h            |    4 +-
>  src/gallium/drivers/r300/r300_winsys.h             |  127 +-------
>  src/gallium/winsys/drm/i965/gem/i965_drm_winsys.h  |    2 +
>  src/gallium/winsys/drm/radeon/core/Makefile        |    2 +-
>  src/gallium/winsys/drm/radeon/core/radeon_buffer.h |   60 ++--
>  src/gallium/winsys/drm/radeon/core/radeon_drm.c    |  134 +++++---
>  src/gallium/winsys/drm/radeon/core/radeon_drm.h    |    5 +
>  .../winsys/drm/radeon/core/radeon_drm_buffer.c     |  361 
> --------------------
>  src/gallium/winsys/drm/radeon/core/radeon_r300.c   |  237 ++++----------
>  src/gallium/winsys/drm/radeon/core/radeon_r300.h   |    6 +-
>  src/gallium/winsys/drm/radeon/core/radeon_winsys.h |   86 +++--
>  23 files changed, 347 insertions(+), 1247 deletions(-)
> 
> Diff:   
> http://cgit.freedesktop.org/mesa/mesa/diff/?id=b14548ea32000459f4f0c4b49f3fa11d1ee9c003
> _______________________________________________
> mesa-commit mailing list
> mesa-com...@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-commit



------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to