python: Add nblocksx/y members to surfaces.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 31 Mar 2009 09:57:44 +0000 (10:57 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 31 Mar 2009 11:29:13 +0000 (12:29 +0100)
src/gallium/state_trackers/python/p_texture.i

index db7a1358e14f66365014d3356e5d68add83836bf..7c1f1c361a4425d6795b161bc1cd88f95358ebfa 100644 (file)
@@ -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 */