aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/python
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2010-05-29 01:18:17 +0200
committerRoland Scheidegger <[email protected]>2010-05-29 01:18:17 +0200
commitc350068720a1a16ee53660d69f4648b90fbe2342 (patch)
treec95df7b321eb2658ce6d8dbcbc3380defbff9a12 /src/gallium/state_trackers/python
parent783083c3b81c51bae541e0a86801f0492ca352cd (diff)
st/python: adapt to clear interface changes
Diffstat (limited to 'src/gallium/state_trackers/python')
-rw-r--r--src/gallium/state_trackers/python/p_context.i39
1 files changed, 26 insertions, 13 deletions
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index 3d7b640b472..6a6da1477cf 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -447,28 +447,41 @@ error1:
src->texture, subsrc, srcx, srcy, src->zslice, width, height);
}
- void surface_fill(struct st_surface *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
- unsigned value)
+ void clearRT(struct st_surface *dst,
+ float *rgba,
+ unsigned x, unsigned y,
+ unsigned width, unsigned height)
{
-/* XXX
struct pipe_surface *_dst = NULL;
- _dst = st_pipe_surface(dst, PIPE_BIND_BLIT_DESTINATION);
+ _dst = st_pipe_surface(dst, PIPE_BIND_RENDER_TARGET);
if(!_dst)
SWIG_exception(SWIG_ValueError, "couldn't acquire destination surface for writing");
- $self->pipe->surface_fill($self->pipe, _dst, x, y, width, height, value);
+ $self->pipe->clearRT($self->pipe, _dst, rgba, x, y, width, height);
+
+ fail:
+ pipe_surface_reference(&_dst, NULL);
+ }
+
+ void clearDS(struct st_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned x, unsigned y,
+ unsigned width, unsigned height)
+ {
+ struct pipe_surface *_dst = NULL;
+
+ _dst = st_pipe_surface(dst, PIPE_BIND_DEPTH_STENCIL);
+ if(!_dst)
+ SWIG_exception(SWIG_ValueError, "couldn't acquire destination surface for writing");
+
+ $self->pipe->clearDS($self->pipe, _dst, clear_flags, depth, stencil,
+ x, y, width, height);
fail:
pipe_surface_reference(&_dst, NULL);
-*/
- struct pipe_subresource subdst;
- subdst.face = dst->face;
- subdst.level = dst->level;
- $self->pipe->resource_fill_region($self->pipe, dst->texture, subdst, x, y, dst->zslice,
- width, height, value);
}
%cstring_output_allocate_size(char **STRING, int *LENGTH, free(*$1));