diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-04-12 15:04:16 +0900 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-04-12 15:32:23 +0900 |
commit | c48f21ea7cb9634c1865514f069b8c0993cb5daf (patch) | |
tree | 4ae3bf8054620210d1e1501ad690f6b395dea73f /src/gallium/state_trackers/python/p_texture.i | |
parent | b77583203e44a8937577bf3b813dc66cea1a2005 (diff) |
st/python: Fix regressions.
Diffstat (limited to 'src/gallium/state_trackers/python/p_texture.i')
-rw-r--r-- | src/gallium/state_trackers/python/p_texture.i | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/gallium/state_trackers/python/p_texture.i b/src/gallium/state_trackers/python/p_texture.i index 1208976905..ae506944c4 100644 --- a/src/gallium/state_trackers/python/p_texture.i +++ b/src/gallium/state_trackers/python/p_texture.i @@ -106,45 +106,6 @@ return $self->width0; } - %cstring_output_allocate_size(char **STRING, int *LENGTH, free(*$1)); - void read_(char **STRING, int *LENGTH) - { - struct pipe_screen *screen = $self->screen; - /* XXX need context here not screen */ - - assert($self->target == PIPE_BUFFER); - assert(p_atomic_read(&$self->reference.count) > 0); - - *LENGTH = $self->width0; - *STRING = (char *) malloc($self->width0); - if(!*STRING) - return; - - pipe_buffer_read(screen, $self, 0, $self->width0, *STRING); - } - - %cstring_input_binary(const char *STRING, unsigned LENGTH); - void write_(const char *STRING, unsigned LENGTH, unsigned offset = 0) - { - struct pipe_screen *screen = $self->screen; - /* XXX need context here not screen */ - - assert($self->target == PIPE_BUFFER); - assert(p_atomic_read(&$self->reference.count) > 0); - - if(offset > $self->width0) - SWIG_exception(SWIG_ValueError, "offset must be smaller than buffer size"); - - if(offset + LENGTH > $self->width0) - SWIG_exception(SWIG_ValueError, "data length must fit inside the buffer"); - - pipe_buffer_write(screen, $self, offset, LENGTH, STRING); - -fail: - return; - } - - }; struct st_surface |