Mesa (master): st/python: add usage parameter to pipe_buffer_create

Vinson Lee vlee at kemper.freedesktop.org
Wed Feb 16 01:31:43 UTC 2011


Module: Mesa
Branch: master
Commit: ae11707b830b206f4305310df3d873b72ed777a7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae11707b830b206f4305310df3d873b72ed777a7

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Feb 15 17:29:43 2011 -0800

st/python: add usage parameter to pipe_buffer_create

This is a follow-up to commit eafb7f234d11a290b00dcaf5492b9bdad1cf5148.

Fixes Linux SCons build.

---

 src/gallium/state_trackers/python/p_context.i |    1 +
 src/gallium/state_trackers/python/p_device.i  |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index 56681a0..b30050b 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -350,6 +350,7 @@ struct st_context {
 
       vbuf = pipe_buffer_create(screen,
                                 PIPE_BIND_VERTEX_BUFFER, 
+                                PIPE_USAGE_STATIC,
                                 size);
       if(!vbuf)
          goto error1;
diff --git a/src/gallium/state_trackers/python/p_device.i b/src/gallium/state_trackers/python/p_device.i
index d55086f..cc67da9 100644
--- a/src/gallium/state_trackers/python/p_device.i
+++ b/src/gallium/state_trackers/python/p_device.i
@@ -134,7 +134,7 @@ struct st_device {
    }
 
    struct pipe_resource *
-   buffer_create(unsigned size, unsigned bind = 0) {
-      return pipe_buffer_create($self->screen, bind, size);
+   buffer_create(unsigned size, unsigned usage, unsigned bind = 0) {
+      return pipe_buffer_create($self->screen, bind, usage, size);
    }
 };




More information about the mesa-commit mailing list