summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2009-02-04 20:59:49 +1000
committerBen Skeggs <skeggsb@gmail.com>2009-02-04 21:07:28 +1000
commit79bf0bdc7ffe97ec128e5dd143c4ed54648aae42 (patch)
tree7820f7c1dab91fac877bc36b9a972b3be3e5dfd8 /src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h
parentc10fb9579027ae34eda0c52acb353e8da5832495 (diff)
nouveau: get things building/running again after pipe_surface.buffer removal
Don't look at nouveau_winsys_pipe.h... I promise it's temporary!
Diffstat (limited to 'src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h')
-rw-r--r--src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h b/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h
index d97ffdf337..b041a77e38 100644
--- a/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h
+++ b/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h
@@ -10,10 +10,15 @@ struct nouveau_pipe_buffer {
struct nouveau_bo *bo;
};
+/* This is so horrible I should be shot - I promise I'll fix it properly
+ * tomorrow. Just to make the winsys build again however... The TG guys
+ * don't like to make life easy :)
+ */
static inline struct nouveau_pipe_buffer *
-nouveau_buffer(struct pipe_buffer *buf)
+nouveau_buffer(struct pipe_surface *ps)
{
- return (struct nouveau_pipe_buffer *)buf;
+ return *(struct nouveau_pipe_buffer **)
+ ((void *)ps->texture + sizeof(struct pipe_texture));
}
struct nouveau_pipe_winsys {
@@ -36,4 +41,9 @@ extern void
nouveau_flush_frontbuffer(struct pipe_winsys *pws, struct pipe_surface *surf,
void *context_private);
+struct pipe_surface *
+nouveau_surface_buffer_ref(struct nouveau_context *nv, struct pipe_buffer *pb,
+ enum pipe_format format, int w, int h,
+ unsigned pitch, struct pipe_texture **ppt);
+
#endif