4 #include "radeon_common_context.h"
5 #include "radeon_dma.h"
6 #include "radeon_texture.h"
8 void radeonUserClear(struct gl_context *ctx, GLuint mask);
9 void radeonRecalcScissorRects(radeonContextPtr radeon);
10 void radeonSetCliprects(radeonContextPtr radeon);
11 void radeonUpdateScissor( struct gl_context *ctx );
12 void radeonScissor(struct gl_context* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
14 void radeonWaitForIdleLocked(radeonContextPtr radeon);
15 extern uint32_t radeonGetAge(radeonContextPtr radeon);
17 void radeonUpdatePageFlipping(radeonContextPtr rmesa);
19 void radeonFlush(struct gl_context *ctx);
20 void radeonFinish(struct gl_context * ctx);
21 void radeonEmitState(radeonContextPtr radeon);
22 GLuint radeonCountStateEmitSize(radeonContextPtr radeon);
24 void radeon_clear_tris(struct gl_context *ctx, GLbitfield mask);
26 void radeon_window_moved(radeonContextPtr radeon);
27 void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb);
28 void radeonDrawBuffer( struct gl_context *ctx, GLenum mode );
29 void radeonReadBuffer( struct gl_context *ctx, GLenum mode );
30 void radeon_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height);
31 void radeon_get_cliprects(radeonContextPtr radeon,
32 struct drm_clip_rect **cliprects,
33 unsigned int *num_cliprects,
34 int *x_off, int *y_off);
35 void radeon_fbo_init(struct radeon_context *radeon);
37 radeon_renderbuffer_set_bo(struct radeon_renderbuffer *rb,
38 struct radeon_bo *bo);
39 struct radeon_renderbuffer *
40 radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv);
43 radeonReadPixels(struct gl_context * ctx,
44 GLint x, GLint y, GLsizei width, GLsizei height,
45 GLenum format, GLenum type,
46 const struct gl_pixelstore_attrib *pack, GLvoid * pixels);
48 void radeon_check_front_buffer_rendering(struct gl_context *ctx);
49 static inline struct radeon_renderbuffer *radeon_renderbuffer(struct gl_renderbuffer *rb)
51 struct radeon_renderbuffer *rrb = (struct radeon_renderbuffer *)rb;
52 radeon_print(RADEON_MEMORY, RADEON_TRACE,
55 if (rrb && rrb->base.ClassID == RADEON_RB_CLASS)
61 static inline struct radeon_renderbuffer *radeon_get_renderbuffer(struct gl_framebuffer *fb, int att_index)
63 radeon_print(RADEON_MEMORY, RADEON_TRACE,
64 "%s(fb %p, index %d)\n",
65 __func__, fb, att_index);
68 return radeon_renderbuffer(fb->Attachment[att_index].Renderbuffer);
73 static inline struct radeon_renderbuffer *radeon_get_depthbuffer(radeonContextPtr rmesa)
75 struct radeon_renderbuffer *rrb;
76 rrb = radeon_renderbuffer(rmesa->state.depth.rb);
83 static inline struct radeon_renderbuffer *radeon_get_colorbuffer(radeonContextPtr rmesa)
85 struct radeon_renderbuffer *rrb;
87 rrb = radeon_renderbuffer(rmesa->state.color.rb);
93 #include "radeon_cmdbuf.h"