Mesa (master): python: Add nblocksx/y members to surfaces.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Mar 31 11:29:21 UTC 2009


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Mar 31 10:57:44 2009 +0100

python: Add nblocksx/y members to surfaces.

---

 src/gallium/state_trackers/python/p_texture.i |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/python/p_texture.i b/src/gallium/state_trackers/python/p_texture.i
index db7a135..7c1f1c3 100644
--- a/src/gallium/state_trackers/python/p_texture.i
+++ b/src/gallium/state_trackers/python/p_texture.i
@@ -126,6 +126,8 @@ struct st_surface
    unsigned format;
    unsigned width;
    unsigned height;
+   unsigned nblocksx;
+   unsigned nblocksy;
    
    ~st_surface() {
       pipe_texture_reference(&$self->texture, NULL);
@@ -360,6 +362,18 @@ struct st_surface
    {
       return surface->texture->height[surface->level];
    }
+
+   static unsigned
+   st_surface_nblocksx_get(struct st_surface *surface)
+   {
+      return surface->texture->nblocksx[surface->level];
+   }
+   
+   static unsigned
+   st_surface_nblocksy_get(struct st_surface *surface)
+   {
+      return surface->texture->nblocksy[surface->level];
+   }
 %}
 
 /* Avoid naming conflict with p_inlines.h's pipe_buffer_read/write */ 




More information about the mesa-commit mailing list