summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/p_texture.i
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2009-11-30 23:02:49 +0100
committerRoland Scheidegger <sroland@vmware.com>2009-11-30 23:02:49 +0100
commitdecf6ed810eae473d043a4a399a5a84f1378a725 (patch)
treea2e46901a82a9e166d3416f27c755c7a4b7430ed /src/gallium/state_trackers/python/p_texture.i
parentac400ffce62be47fc77e8d10cabcd39b92b6c627 (diff)
fixups for interface changes (mostly state trackers)
Diffstat (limited to 'src/gallium/state_trackers/python/p_texture.i')
-rw-r--r--src/gallium/state_trackers/python/p_texture.i32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/gallium/state_trackers/python/p_texture.i b/src/gallium/state_trackers/python/p_texture.i
index 5416b872f5..1de7f86a3c 100644
--- a/src/gallium/state_trackers/python/p_texture.i
+++ b/src/gallium/state_trackers/python/p_texture.i
@@ -69,15 +69,7 @@
unsigned get_depth(unsigned level=0) {
return u_minify($self->depth0, level);
}
-
- unsigned get_nblocksx(unsigned level=0) {
- return $self->nblocksx[level];
- }
-
- unsigned get_nblocksy(unsigned level=0) {
- return $self->nblocksy[level];
- }
-
+
/** Get a surface which is a "view" into a texture */
struct st_surface *
get_surface(unsigned face=0, unsigned level=0, unsigned zslice=0)
@@ -126,8 +118,6 @@ struct st_surface
unsigned format;
unsigned width;
unsigned height;
- unsigned nblocksx;
- unsigned nblocksy;
~st_surface() {
pipe_texture_reference(&$self->texture, NULL);
@@ -142,8 +132,8 @@ struct st_surface
struct pipe_transfer *transfer;
unsigned stride;
- stride = pf_get_nblocksx(&texture->block, w) * texture->block.size;
- *LENGTH = pf_get_nblocksy(&texture->block, h) * stride;
+ stride = pf_get_stride(texture->format, w);
+ *LENGTH = pf_get_nblocksy(texture->format, h) * stride;
*STRING = (char *) malloc(*LENGTH);
if(!*STRING)
return;
@@ -169,9 +159,9 @@ struct st_surface
struct pipe_transfer *transfer;
if(stride == 0)
- stride = pf_get_nblocksx(&texture->block, w) * texture->block.size;
+ stride = pf_get_stride(texture->format, w);
- if(LENGTH < pf_get_nblocksy(&texture->block, h) * stride)
+ if(LENGTH < pf_get_nblocksy(texture->format, h) * stride)
SWIG_exception(SWIG_ValueError, "offset must be smaller than buffer size");
transfer = screen->get_tex_transfer(screen,
@@ -383,18 +373,6 @@ struct st_surface
{
return u_minify(surface->texture->height0, 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 */