summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-06-03 17:46:14 +0200
committerRoland Scheidegger <sroland@vmware.com>2010-06-03 17:46:14 +0200
commit992382762a74fd834926fd2c3cd9e14a186e2dd5 (patch)
treec4572bb01331b71931b3570b36a7acfc38f79a68 /src/gallium/state_trackers/python
parent05863c487756c1c9dc823cf639f77cad4111bd23 (diff)
parenta6e5c6c000df8655de3b41d5809547bb41c88c23 (diff)
Merge branch 'gallium-newclear'
Conflicts: src/gallium/state_trackers/python/p_context.i
Diffstat (limited to 'src/gallium/state_trackers/python')
-rw-r--r--src/gallium/state_trackers/python/p_context.i43
1 files changed, 35 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index ff792279d2..cf0144b5dc 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -428,15 +428,42 @@ error1:
width, height);
}
- void resource_fill_region(struct pipe_resource *dst,
- struct pipe_subresource subdst,
- unsigned dstx, unsigned dsty, unsigned dstz,
- unsigned width, unsigned height,
- unsigned value)
+
+ void clear_render_target(struct st_surface *dst,
+ float *rgba,
+ unsigned x, unsigned y,
+ unsigned width, unsigned height)
{
- $self->pipe->resource_fill_region($self->pipe,
- dst, subdst, dstx, dsty, dstz,
- width, height, value);
+ struct pipe_surface *_dst = NULL;
+
+ _dst = st_pipe_surface(dst, PIPE_BIND_RENDER_TARGET);
+ if(!_dst)
+ SWIG_exception(SWIG_ValueError, "couldn't acquire destination surface for writing");
+
+ $self->pipe->clear_render_target($self->pipe, _dst, rgba, x, y, width, height);
+
+ fail:
+ pipe_surface_reference(&_dst, NULL);
+ }
+
+ void clear_depth_stencil(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->clear_depth_stencil($self->pipe, _dst, clear_flags, depth, stencil,
+ x, y, width, height);
+
+ fail:
+ pipe_surface_reference(&_dst, NULL);
}
%cstring_output_allocate_size(char **STRING, int *LENGTH, free(*$1));