summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_common.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-03-03 03:27:59 +1000
committerDave Airlie <airlied@redhat.com>2009-03-03 03:29:37 +1000
commit2b85fccae5ba33748846f74f90fe0f72c673a4b1 (patch)
tree532684f7942afe73e053adf80d33b48b455475c3 /src/mesa/drivers/dri/radeon/radeon_common.h
parent863c76a7bb0ecf0cd492d9ddb0dcac8e12da75e0 (diff)
radeon: refactor framebuffer code like intel
this is a step towards fbos and should fix pageflipping, but I think the first flip seems broken.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_common.h')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h
index ead0f5551b3..95b718184b7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common.h
@@ -14,7 +14,6 @@ void radeonWaitForIdleLocked(radeonContextPtr radeon);
extern uint32_t radeonGetAge(radeonContextPtr radeon);
void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
const drm_clip_rect_t *rect);
-void radeonPageFlip( __DRIdrawablePrivate *dPriv );
void radeonSwapBuffers(__DRIdrawablePrivate * dPriv);
void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv,
int x, int y, int w, int h );
@@ -25,6 +24,12 @@ void radeonFlush(GLcontext *ctx);
void radeonFinish(GLcontext * ctx);
void radeonEmitState(radeonContextPtr radeon);
+void radeon_window_moved(radeonContextPtr radeon);
+void radeon_draw_buffer(GLcontext *ctx, struct gl_framebuffer *fb);
+void radeonDrawBuffer( GLcontext *ctx, GLenum mode );
+void radeonReadBuffer( GLcontext *ctx, GLenum mode );
+void radeon_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height);
+
static inline struct radeon_renderbuffer *radeon_get_depthbuffer(radeonContextPtr rmesa)
{
struct radeon_renderbuffer *rrb;
@@ -38,11 +43,11 @@ static inline struct radeon_renderbuffer *radeon_get_depthbuffer(radeonContextPt
static inline struct radeon_renderbuffer *radeon_get_colorbuffer(radeonContextPtr rmesa)
{
struct radeon_renderbuffer *rrb;
- GLframebuffer *fb = rmesa->dri.drawable->driverPrivate;
+ struct radeon_framebuffer *rfb = rmesa->dri.drawable->driverPrivate;
rrb = rmesa->state.color.rrb;
if (rmesa->radeonScreen->driScreen->dri2.enabled) {
- rrb = (struct radeon_renderbuffer *)fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer;
+ rrb = (struct radeon_renderbuffer *)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
}
if (!rrb)
return NULL;