summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/python
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2010-05-21 20:02:22 +0200
committerRoland Scheidegger <[email protected]>2010-05-21 20:02:22 +0200
commit3293bcdc80cdfa20a2381aae2b94505bdf95d857 (patch)
tree16ab1ae66010f6d8b1325dbfa9006126a8e95771 /src/gallium/state_trackers/python
parent8504c5d931e47765a15fdaec2df2cb6502a1bd5c (diff)
parentce65caba846b03b5ef4144e311b85cfd48ab9bbb (diff)
Merge branch 'gallium-msaa'
Conflicts: src/mesa/state_tracker/st_gen_mipmap.c src/mesa/state_tracker/st_texture.c
Diffstat (limited to 'src/gallium/state_trackers/python')
-rw-r--r--src/gallium/state_trackers/python/p_context.i30
-rw-r--r--src/gallium/state_trackers/python/p_device.i10
2 files changed, 29 insertions, 11 deletions
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index 3c5509cb5e4..3d7b640b472 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -413,16 +413,17 @@ error1:
/*
* Surface functions
*/
-
+
void surface_copy(struct st_surface *dst,
unsigned destx, unsigned desty,
struct st_surface *src,
unsigned srcx, unsigned srcy,
unsigned width, unsigned height)
{
+/* XXX
struct pipe_surface *_dst = NULL;
struct pipe_surface *_src = NULL;
-
+
_dst = st_pipe_surface(dst, PIPE_BIND_BLIT_DESTINATION);
if(!_dst)
SWIG_exception(SWIG_ValueError, "couldn't acquire destination surface for writing");
@@ -430,12 +431,20 @@ error1:
_src = st_pipe_surface(src, PIPE_BIND_BLIT_SOURCE);
if(!_src)
SWIG_exception(SWIG_ValueError, "couldn't acquire source surface for reading");
-
+
$self->pipe->surface_copy($self->pipe, _dst, destx, desty, _src, srcx, srcy, width, height);
-
+
fail:
pipe_surface_reference(&_src, NULL);
pipe_surface_reference(&_dst, NULL);
+*/
+ struct pipe_subresource subdst, subsrc;
+ subsrc.face = src->face;
+ subsrc.level = src->level;
+ subdst.face = dst->face;
+ subdst.level = dst->level;
+ $self->pipe->resource_copy_region($self->pipe, dst->texture, subdst, destx, desty, dst->zslice,
+ src->texture, subsrc, srcx, srcy, src->zslice, width, height);
}
void surface_fill(struct st_surface *dst,
@@ -443,16 +452,23 @@ error1:
unsigned width, unsigned height,
unsigned value)
{
+/* XXX
struct pipe_surface *_dst = NULL;
-
- _dst = st_pipe_surface(dst, PIPE_BIND_BLIT_DESTINATION);
+
+ _dst = st_pipe_surface(dst, PIPE_BIND_BLIT_DESTINATION);
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);
-
+
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));
diff --git a/src/gallium/state_trackers/python/p_device.i b/src/gallium/state_trackers/python/p_device.i
index 959c13f54d9..d55086fefd5 100644
--- a/src/gallium/state_trackers/python/p_device.i
+++ b/src/gallium/state_trackers/python/p_device.i
@@ -85,16 +85,18 @@ struct st_device {
*/
int is_format_supported( enum pipe_format format,
enum pipe_texture_target target,
+ unsigned sample_count,
unsigned bind,
unsigned geom_flags ) {
/* We can't really display surfaces with the python statetracker so mask
* out that usage */
bind &= ~PIPE_BIND_DISPLAY_TARGET;
- return $self->screen->is_format_supported( $self->screen,
- format,
- target,
- bind,
+ return $self->screen->is_format_supported( $self->screen,
+ format,
+ target,
+ sample_count,
+ bind,
geom_flags );
}