Mesa (mesa_7_7_branch): gallium: Remove temporary hack for the absence of a discard flag.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Jan 21 23:27:44 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 13c2475339d502644464041fcaac3890770d3abd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13c2475339d502644464041fcaac3890770d3abd

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu Jan 21 09:13:15 2010 -0800

gallium: Remove temporary hack for the absence of a discard flag.

PIPE_BUFFER_USAGE_DISCARD flag now exists.

---

 src/gallium/include/pipe/p_inlines.h |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/src/gallium/include/pipe/p_inlines.h b/src/gallium/include/pipe/p_inlines.h
index 5fbd62a..6949f56 100644
--- a/src/gallium/include/pipe/p_inlines.h
+++ b/src/gallium/include/pipe/p_inlines.h
@@ -63,13 +63,6 @@ pipe_buffer_map(struct pipe_screen *screen,
    if(screen->buffer_map_range) {
       unsigned offset = 0;
       unsigned length = buf->size;
-
-      /* XXX: Actually we should be using/detecting DISCARD
-       * instead of assuming that WRITE implies discard */
-      if((usage & PIPE_BUFFER_USAGE_CPU_WRITE) &&
-         !(usage & PIPE_BUFFER_USAGE_DISCARD))
-         usage |= PIPE_BUFFER_USAGE_CPU_READ;
-
       return screen->buffer_map_range(screen, buf, offset, length, usage);
    }
    else




More information about the mesa-commit mailing list