diff options
| author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2010-12-19 21:46:33 +0100 |
|---|---|---|
| committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2010-12-19 21:46:33 +0100 |
| commit | 0f68236a2487dbeb0396b996debcda595b0b54a1 (patch) | |
| tree | 938ae3b779349b6dba6f5a891550604f9a9ca895 /src/gallium/state_trackers/python/p_texture.i | |
| parent | d047168d81cfeb39a98f3ae16416872facc6237c (diff) | |
| parent | 237880463d5168cad8df0bae6018b5fd76617777 (diff) | |
Merge remote branch 'origin/master' into nvc0-new
Diffstat (limited to 'src/gallium/state_trackers/python/p_texture.i')
| -rw-r--r-- | src/gallium/state_trackers/python/p_texture.i | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gallium/state_trackers/python/p_texture.i b/src/gallium/state_trackers/python/p_texture.i index ae506944c4..1f4b4fd596 100644 --- a/src/gallium/state_trackers/python/p_texture.i +++ b/src/gallium/state_trackers/python/p_texture.i @@ -42,9 +42,8 @@ %ignore pipe_resource::screen; %immutable st_surface::texture; -%immutable st_surface::face; %immutable st_surface::level; -%immutable st_surface::zslice; +%immutable st_surface::layer; %newobject pipe_resource::get_surface; @@ -73,25 +72,23 @@ /** Get a surface which is a "view" into a texture */ struct st_surface * - get_surface(unsigned face=0, unsigned level=0, unsigned zslice=0) + get_surface(unsigned level=0, unsigned layer=0) { struct st_surface *surface; - if(face >= ($self->target == PIPE_TEXTURE_CUBE ? 6U : 1U)) - SWIG_exception(SWIG_ValueError, "face out of bounds"); if(level > $self->last_level) SWIG_exception(SWIG_ValueError, "level out of bounds"); - if(zslice >= u_minify($self->depth0, level)) - SWIG_exception(SWIG_ValueError, "zslice out of bounds"); + if(layer >= ($self->target == PIPE_TEXTURE_3D ? + u_minify($self->depth0, level) : $self->depth0)) + SWIG_exception(SWIG_ValueError, "layer out of bounds"); surface = CALLOC_STRUCT(st_surface); if(!surface) return NULL; pipe_resource_reference(&surface->texture, $self); - surface->face = face; surface->level = level; - surface->zslice = zslice; + surface->layer = layer; return surface; @@ -113,9 +110,8 @@ struct st_surface %immutable; struct pipe_resource *texture; - unsigned face; unsigned level; - unsigned zslice; + unsigned layer; }; |
