R300: set the number of GB pipes on all r3xx-r5xx chips
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_common.h
1 #ifndef COMMON_MISC_H
2 #define COMMON_MISC_H
3
4 #include "radeon_common_context.h"
5 #include "radeon_dma.h"
6 #include "radeon_texture.h"
7
8 void radeonRecalcScissorRects(radeonContextPtr radeon);
9 void radeonSetCliprects(radeonContextPtr radeon);
10 void radeonUpdateScissor( GLcontext *ctx );
11 void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
12
13 void radeonWaitForIdleLocked(radeonContextPtr radeon);
14 extern uint32_t radeonGetAge(radeonContextPtr radeon);
15 void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
16 const drm_clip_rect_t *rect);
17 void radeonPageFlip( __DRIdrawablePrivate *dPriv );
18 void radeonSwapBuffers(__DRIdrawablePrivate * dPriv);
19 void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv,
20 int x, int y, int w, int h );
21
22 void radeonUpdatePageFlipping(radeonContextPtr rmesa);
23
24 void radeonFlush(GLcontext *ctx);
25 void radeonFinish(GLcontext * ctx);
26 void radeonEmitState(radeonContextPtr radeon);
27
28 static inline struct radeon_renderbuffer *radeon_get_depthbuffer(radeonContextPtr rmesa)
29 {
30 struct radeon_renderbuffer *rrb;
31 rrb = rmesa->state.depth.rrb;
32 if (!rrb)
33 return NULL;
34
35 return rrb;
36 }
37
38 static inline struct radeon_renderbuffer *radeon_get_colorbuffer(radeonContextPtr rmesa)
39 {
40 struct radeon_renderbuffer *rrb;
41 GLframebuffer *fb = rmesa->dri.drawable->driverPrivate;
42
43 rrb = rmesa->state.color.rrb;
44 if (rmesa->radeonScreen->driScreen->dri2.enabled) {
45 rrb = (struct radeon_renderbuffer *)fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer;
46 }
47 if (!rrb)
48 return NULL;
49 return rrb;
50 }
51
52 #include "radeon_cmdbuf.h"
53
54
55 #endif