Mesa (gallium-resources): gallium: fix comments for changed USAGE flags

Roland Scheidegger sroland at kemper.freedesktop.org
Fri Apr 9 15:45:10 UTC 2010


Module: Mesa
Branch: gallium-resources
Commit: faf53328d1154c51d8a59513f2bfcae62272b0bf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=faf53328d1154c51d8a59513f2bfcae62272b0bf

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Fri Apr  9 17:44:24 2010 +0200

gallium: fix comments for changed USAGE flags

---

 src/gallium/auxiliary/util/u_simple_screen.h  |    9 +++++----
 src/gallium/drivers/svga/svga_winsys.h        |   10 ++++------
 src/gallium/include/pipe/p_screen.h           |    2 +-
 src/gallium/include/state_tracker/sw_winsys.h |    2 +-
 4 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_simple_screen.h b/src/gallium/auxiliary/util/u_simple_screen.h
index 0042277..1ba59af 100644
--- a/src/gallium/auxiliary/util/u_simple_screen.h
+++ b/src/gallium/auxiliary/util/u_simple_screen.h
@@ -73,9 +73,10 @@ struct pipe_winsys
     * window systems must then implement that interface (rather than the
     * other way around...).
     *
-    * usage is a bitmask of PIPE_BUFFER_USAGE_PIXEL/VERTEX/INDEX/CONSTANT. This
-    * usage argument is only an optimization hint, not a guarantee, therefore
-    * proper behavior must be observed in all circumstances.
+    * usage is a bitmask of PIPE_BIND_*.
+    * XXX is this true?
+    * This usage argument is only an optimization hint, not a guarantee,
+    * therefore proper behavior must be observed in all circumstances.
     *
     * alignment indicates the client's alignment requirements, eg for
     * SSE instructions.
@@ -117,7 +118,7 @@ struct pipe_winsys
     * display targets) must be allocated with special characteristics, memory
     * pools, or obtained directly from the windowing system.
     *
-    * This callback is invoked by the pipe_screenwhen creating a texture marked
+    * This callback is invoked by the pipe_screen when creating a texture marked
     * with the PIPE_BIND_DISPLAY_TARGET flag  to get the underlying
     * buffer storage.
     */
diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h
index b286fd8..3892add 100644
--- a/src/gallium/drivers/svga/svga_winsys.h
+++ b/src/gallium/drivers/svga/svga_winsys.h
@@ -230,9 +230,7 @@ struct svga_winsys_screen
    /**
     * Buffer management. Buffer attributes are mostly fixed over its lifetime.
     *
-    * usage is a bitmask of PIPE_BUFFER_USAGE_PIXEL/VERTEX/INDEX/CONSTANT. This
-    * usage argument is only an optimization hint, not a guarantee, therefore 
-    * proper behavior must be observed in all circumstances.
+    * XXX usage seems to be a bitmask of SVGA_BUFFER_USAGE_* flags.
     *
     * alignment indicates the client's alignment requirements, eg for
     * SSE instructions.
@@ -246,9 +244,9 @@ struct svga_winsys_screen
    /** 
     * Map the entire data store of a buffer object into the client's address.
     * flags is a bitmask of:
-    * - PIPE_BUFFER_USAGE_CPU_READ/WRITE
-    * - PIPE_BUFFER_USAGE_DONTBLOCK
-    * - PIPE_BUFFER_USAGE_UNSYNCHRONIZED
+    * - PB_USAGE_CPU_READ/WRITE
+    * - PB_USAGE_DONTBLOCK
+    * - PB_USAGE_UNSYNCHRONIZED
     */
    void *
    (*buffer_map)( struct svga_winsys_screen *sws, 
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index 79036b5..2f43a36 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -131,7 +131,7 @@ struct pipe_screen {
 			    struct pipe_resource *pt);
 
    /** Get a 2D surface which is a "view" into a texture
-    * \param usage  bitmaks of PIPE_BUFFER_USAGE_* read/write flags
+    * \param usage  bitmaks of PIPE_BIND_* flags
     */
    struct pipe_surface *(*get_tex_surface)(struct pipe_screen *,
                                            struct pipe_resource *resource,
diff --git a/src/gallium/include/state_tracker/sw_winsys.h b/src/gallium/include/state_tracker/sw_winsys.h
index 38ea1e9..d461ded 100644
--- a/src/gallium/include/state_tracker/sw_winsys.h
+++ b/src/gallium/include/state_tracker/sw_winsys.h
@@ -110,7 +110,7 @@ struct sw_winsys
                                 struct winsys_handle *whandle );
 
    /**
-    * \param flags  bitmask of PIPE_BUFFER_USAGE_x flags
+    * \param flags  bitmask of PIPE_TRANSFER_x flags
     */
    void *
    (*displaytarget_map)( struct sw_winsys *ws, 




More information about the mesa-commit mailing list