4 #include "radeon_common_context.h"
5 #include "radeon_dma.h"
6 #include "radeon_texture.h"
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
);
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 radeonSwapBuffers(__DRIdrawablePrivate
* dPriv
);
18 void radeonCopySubBuffer(__DRIdrawablePrivate
* dPriv
,
19 int x
, int y
, int w
, int h
);
21 void radeonUpdatePageFlipping(radeonContextPtr rmesa
);
23 void radeonFlush(GLcontext
*ctx
);
24 void radeonFinish(GLcontext
* ctx
);
25 void radeonEmitState(radeonContextPtr radeon
);
27 void radeon_window_moved(radeonContextPtr radeon
);
28 void radeon_draw_buffer(GLcontext
*ctx
, struct gl_framebuffer
*fb
);
29 void radeonDrawBuffer( GLcontext
*ctx
, GLenum mode
);
30 void radeonReadBuffer( GLcontext
*ctx
, GLenum mode
);
31 void radeon_viewport(GLcontext
*ctx
, GLint x
, GLint y
, GLsizei width
, GLsizei height
);
32 void radeon_get_cliprects(radeonContextPtr radeon
,
33 struct drm_clip_rect
**cliprects
,
34 unsigned int *num_cliprects
,
35 int *x_off
, int *y_off
);
37 void radeon_fbo_init(struct radeon_context
*radeon
);
38 struct gl_renderbuffer
*
39 radeon_create_renderbuffer(GLenum format
, __DRIdrawablePrivate
*driDrawPriv
);
40 static inline struct radeon_renderbuffer
*radeon_renderbuffer(struct gl_renderbuffer
*rb
)
42 struct radeon_renderbuffer
*rrb
= (struct radeon_renderbuffer
*)rb
;
43 if (rrb
&& rrb
->base
.ClassID
== RADEON_RB_CLASS
)
49 static inline struct radeon_renderbuffer
*radeon_get_renderbuffer(struct gl_framebuffer
*fb
, int att_index
)
52 return radeon_renderbuffer(fb
->Attachment
[att_index
].Renderbuffer
);
57 static inline struct radeon_renderbuffer
*radeon_get_depthbuffer(radeonContextPtr rmesa
)
59 struct radeon_renderbuffer
*rrb
;
60 rrb
= rmesa
->state
.depth
.rrb
;
67 static inline struct radeon_renderbuffer
*radeon_get_colorbuffer(radeonContextPtr rmesa
)
69 struct radeon_renderbuffer
*rrb
;
70 struct radeon_framebuffer
*rfb
= rmesa
->dri
.drawable
->driverPrivate
;
72 rrb
= rmesa
->state
.color
.rrb
;
73 if (rmesa
->radeonScreen
->driScreen
->dri2
.enabled
) {
74 rrb
= radeon_get_renderbuffer(&rfb
->base
, BUFFER_BACK_LEFT
);
81 #include "radeon_cmdbuf.h"