summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-03-31 10:57:44 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-03-31 12:29:13 +0100
commite848a86dbacbec0bed16fac29264c77f4c2eeb0c (patch)
treea3652354691f795dc55c3a78f48cdb401d0a579e
parent382306c5732dd04f514bb1d8f2b050bd6d58a893 (diff)
python: Add nblocksx/y members to surfaces.
-rw-r--r--src/gallium/state_trackers/python/p_texture.i14
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 db7a1358e1..7c1f1c361a 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 */