4 #include "radeon_common_context.h"
5 #include "radeon_dma.h"
6 #include "radeon_texture.h"
9 #define TRI_CLEAR_COLOR_BITS (BUFFER_BIT_BACK_LEFT | \
10 BUFFER_BIT_FRONT_LEFT | \
20 void radeonRecalcScissorRects(radeonContextPtr radeon
);
21 void radeonSetCliprects(radeonContextPtr radeon
);
22 void radeonUpdateScissor( GLcontext
*ctx
);
23 void radeonScissor(GLcontext
* ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
25 void radeonWaitForIdleLocked(radeonContextPtr radeon
);
26 extern uint32_t radeonGetAge(radeonContextPtr radeon
);
27 void radeonCopyBuffer( __DRIdrawablePrivate
*dPriv
,
28 const drm_clip_rect_t
*rect
);
29 void radeonSwapBuffers(__DRIdrawablePrivate
* dPriv
);
30 void radeonCopySubBuffer(__DRIdrawablePrivate
* dPriv
,
31 int x
, int y
, int w
, int h
);
33 void radeonUpdatePageFlipping(radeonContextPtr rmesa
);
35 void radeonFlush(GLcontext
*ctx
);
36 void radeonFinish(GLcontext
* ctx
);
37 void radeonEmitState(radeonContextPtr radeon
);
39 void radeon_clear_tris(GLcontext
*ctx
, GLbitfield mask
);
41 void radeon_window_moved(radeonContextPtr radeon
);
42 void radeon_draw_buffer(GLcontext
*ctx
, struct gl_framebuffer
*fb
);
43 void radeonDrawBuffer( GLcontext
*ctx
, GLenum mode
);
44 void radeonReadBuffer( GLcontext
*ctx
, GLenum mode
);
45 void radeon_viewport(GLcontext
*ctx
, GLint x
, GLint y
, GLsizei width
, GLsizei height
);
46 void radeon_get_cliprects(radeonContextPtr radeon
,
47 struct drm_clip_rect
**cliprects
,
48 unsigned int *num_cliprects
,
49 int *x_off
, int *y_off
);
50 GLboolean
radeon_revalidate_bos(GLcontext
*ctx
);
51 void radeon_validate_bo(radeonContextPtr radeon
, struct radeon_bo
*bo
, uint32_t read_domains
, uint32_t write_domain
);
52 void radeon_validate_reset_bos(radeonContextPtr radeon
);
54 void radeon_fbo_init(struct radeon_context
*radeon
);
56 radeon_renderbuffer_set_bo(struct radeon_renderbuffer
*rb
,
57 struct radeon_bo
*bo
);
58 struct radeon_renderbuffer
*
59 radeon_create_renderbuffer(GLenum format
, __DRIdrawablePrivate
*driDrawPriv
);
60 static inline struct radeon_renderbuffer
*radeon_renderbuffer(struct gl_renderbuffer
*rb
)
62 struct radeon_renderbuffer
*rrb
= (struct radeon_renderbuffer
*)rb
;
63 if (rrb
&& rrb
->base
.ClassID
== RADEON_RB_CLASS
)
69 static inline struct radeon_renderbuffer
*radeon_get_renderbuffer(struct gl_framebuffer
*fb
, int att_index
)
72 return radeon_renderbuffer(fb
->Attachment
[att_index
].Renderbuffer
);
77 static inline struct radeon_renderbuffer
*radeon_get_depthbuffer(radeonContextPtr rmesa
)
79 struct radeon_renderbuffer
*rrb
;
80 rrb
= rmesa
->state
.depth
.rrb
;
87 static inline struct radeon_renderbuffer
*radeon_get_colorbuffer(radeonContextPtr rmesa
)
89 struct radeon_renderbuffer
*rrb
;
91 rrb
= rmesa
->state
.color
.rrb
;
97 #include "radeon_cmdbuf.h"