summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/st_device.h
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-04-10 17:16:08 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-04-10 17:16:08 -0400
commit04f335fd16c2a13b9425797acf5c3989cb6def7f (patch)
tree9e92cecb0b2ac512fac1fc4ef911878849eaeb42 /src/gallium/state_trackers/python/st_device.h
parentc0419f190c836130932164ac47cfb53de668d423 (diff)
parent5e361c47abf2ee20140628d327eda9b39351d415 (diff)
Merge branch 'radeon-rewrite' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa into r6xx-rewrite
Diffstat (limited to 'src/gallium/state_trackers/python/st_device.h')
-rw-r--r--src/gallium/state_trackers/python/st_device.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/python/st_device.h b/src/gallium/state_trackers/python/st_device.h
index 0641aff149..a246b6a1f2 100644
--- a/src/gallium/state_trackers/python/st_device.h
+++ b/src/gallium/state_trackers/python/st_device.h
@@ -38,10 +38,12 @@ struct pipe_context;
struct st_winsys;
-struct st_buffer {
- struct st_device *st_dev;
-
- struct pipe_buffer *buffer;
+struct st_surface
+{
+ struct pipe_texture *texture;
+ unsigned face;
+ unsigned level;
+ unsigned zslice;
};
@@ -64,6 +66,8 @@ struct st_context {
unsigned num_vertex_elements;
struct pipe_vertex_element vertex_elements[PIPE_MAX_ATTRIBS];
+
+ struct pipe_framebuffer_state framebuffer;
};
@@ -78,12 +82,13 @@ struct st_device {
};
-struct st_buffer *
-st_buffer_create(struct st_device *st_dev,
- unsigned alignment, unsigned usage, unsigned size);
-
-void
-st_buffer_destroy(struct st_buffer *st_buf);
+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);