summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/st_device.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-03-30 16:02:21 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-03-30 17:19:10 +0100
commit28de69d6819eab289a400482d15797b662e4d633 (patch)
tree7e55515a03d72ae68872bfd373d3607a5ebc0edc /src/gallium/state_trackers/python/st_device.h
parent68342f9036d3c94ee50c4cbe5c7b36439eeb6825 (diff)
python: Set the surface GPU access flags.
Make python surface just a dumb (texture, face, level, zslice) tuple.
Diffstat (limited to 'src/gallium/state_trackers/python/st_device.h')
-rw-r--r--src/gallium/state_trackers/python/st_device.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/python/st_device.h b/src/gallium/state_trackers/python/st_device.h
index d1bd8c31f4..a246b6a1f2 100644
--- a/src/gallium/state_trackers/python/st_device.h
+++ b/src/gallium/state_trackers/python/st_device.h
@@ -38,6 +38,15 @@ struct pipe_context;
struct st_winsys;
+struct st_surface
+{
+ struct pipe_texture *texture;
+ unsigned face;
+ unsigned level;
+ unsigned zslice;
+};
+
+
struct st_context {
struct st_device *st_dev;
@@ -57,6 +66,8 @@ struct st_context {
unsigned num_vertex_elements;
struct pipe_vertex_element vertex_elements[PIPE_MAX_ATTRIBS];
+
+ struct pipe_framebuffer_state framebuffer;
};
@@ -71,6 +82,14 @@ struct st_device {
};
+static INLINE struct pipe_surface *
+st_pipe_surface(struct st_surface *surface, unsigned usage)
+{
+ struct pipe_texture *texture = surface->texture;
+ struct pipe_screen *screen = texture->screen;
+ return screen->get_tex_surface(screen, texture, surface->face, surface->level, surface->zslice, usage);
+}
+
struct st_context *
st_context_create(struct st_device *st_dev);