4 #include "radeon_common_context.h"
5 #include "radeon_dma.h"
6 #include "radeon_texture.h"
8 #ifndef HAVE_LIBDRM_RADEON
9 #ifndef RADEON_DEBUG_BO
10 #define RADEON_DEBUG_BO 1
14 #define TRI_CLEAR_COLOR_BITS (BUFFER_BIT_BACK_LEFT | \
15 BUFFER_BIT_FRONT_LEFT | \
25 void radeonRecalcScissorRects(radeonContextPtr radeon
);
26 void radeonSetCliprects(radeonContextPtr radeon
);
27 void radeonUpdateScissor( GLcontext
*ctx
);
28 void radeonScissor(GLcontext
* ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
30 void radeonWaitForIdleLocked(radeonContextPtr radeon
);
31 extern uint32_t radeonGetAge(radeonContextPtr radeon
);
32 void radeonCopyBuffer( __DRIdrawablePrivate
*dPriv
,
33 const drm_clip_rect_t
*rect
);
34 void radeonSwapBuffers(__DRIdrawablePrivate
* dPriv
);
35 void radeonCopySubBuffer(__DRIdrawablePrivate
* dPriv
,
36 int x
, int y
, int w
, int h
);
38 void radeonUpdatePageFlipping(radeonContextPtr rmesa
);
40 void radeonFlush(GLcontext
*ctx
);
41 void radeonFinish(GLcontext
* ctx
);
42 void radeonEmitState(radeonContextPtr radeon
);
44 void radeon_clear_tris(GLcontext
*ctx
, GLbitfield mask
);
46 void radeon_window_moved(radeonContextPtr radeon
);
47 void radeon_draw_buffer(GLcontext
*ctx
, struct gl_framebuffer
*fb
);
48 void radeonDrawBuffer( GLcontext
*ctx
, GLenum mode
);
49 void radeonReadBuffer( GLcontext
*ctx
, GLenum mode
);
50 void radeon_viewport(GLcontext
*ctx
, GLint x
, GLint y
, GLsizei width
, GLsizei height
);
51 void radeon_get_cliprects(radeonContextPtr radeon
,
52 struct drm_clip_rect
**cliprects
,
53 unsigned int *num_cliprects
,
54 int *x_off
, int *y_off
);
55 GLboolean
radeon_revalidate_bos(GLcontext
*ctx
);
56 void radeon_validate_bo(radeonContextPtr radeon
, struct radeon_bo
*bo
, uint32_t read_domains
, uint32_t write_domain
);
57 void radeon_validate_reset_bos(radeonContextPtr radeon
);
59 void radeon_fbo_init(struct radeon_context
*radeon
);
61 radeon_renderbuffer_set_bo(struct radeon_renderbuffer
*rb
,
62 struct radeon_bo
*bo
);
63 struct radeon_renderbuffer
*
64 radeon_create_renderbuffer(GLenum format
, __DRIdrawablePrivate
*driDrawPriv
);
65 static inline struct radeon_renderbuffer
*radeon_renderbuffer(struct gl_renderbuffer
*rb
)
67 struct radeon_renderbuffer
*rrb
= (struct radeon_renderbuffer
*)rb
;
68 if (rrb
&& rrb
->base
.ClassID
== RADEON_RB_CLASS
)
74 static inline struct radeon_renderbuffer
*radeon_get_renderbuffer(struct gl_framebuffer
*fb
, int att_index
)
77 return radeon_renderbuffer(fb
->Attachment
[att_index
].Renderbuffer
);
82 static inline struct radeon_renderbuffer
*radeon_get_depthbuffer(radeonContextPtr rmesa
)
84 struct radeon_renderbuffer
*rrb
;
85 rrb
= radeon_renderbuffer(rmesa
->state
.depth
.rb
);
92 static inline struct radeon_renderbuffer
*radeon_get_colorbuffer(radeonContextPtr rmesa
)
94 struct radeon_renderbuffer
*rrb
;
96 rrb
= radeon_renderbuffer(rmesa
->state
.color
.rb
);
102 #include "radeon_cmdbuf.h"