Mesa (master): st/python: adapt to clear interface changes
Roland Scheidegger
sroland at kemper.freedesktop.org
Thu Jun 3 15:47:34 UTC 2010
Module: Mesa
Branch: master
Commit: c350068720a1a16ee53660d69f4648b90fbe2342
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c350068720a1a16ee53660d69f4648b90fbe2342
Author: Roland Scheidegger <sroland at vmware.com>
Date: Sat May 29 01:18:17 2010 +0200
st/python: adapt to clear interface changes
---
src/gallium/state_trackers/python/p_context.i | 39 ++++++++++++++++--------
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 3d7b640..6a6da14 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));
More information about the mesa-commit
mailing list