diff options
author | Dave Airlie <airlied@redhat.com> | 2009-01-31 01:59:57 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-01-31 01:59:57 +1000 |
commit | e45213d89bf26c68c9f4c9074eaec9ab3311de7d (patch) | |
tree | f4ca6a1fdec732dc2d5faba6d700ea54b14ff995 /src/mesa/drivers/dri/radeon/common_misc.h | |
parent | 08bb7eedfbba839676ab63fb20dd22e4f27722cb (diff) |
r200/r300: add aperture space checks
Diffstat (limited to 'src/mesa/drivers/dri/radeon/common_misc.h')
-rw-r--r-- | src/mesa/drivers/dri/radeon/common_misc.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/common_misc.h b/src/mesa/drivers/dri/radeon/common_misc.h index d17d1607db..44e464eb13 100644 --- a/src/mesa/drivers/dri/radeon/common_misc.h +++ b/src/mesa/drivers/dri/radeon/common_misc.h @@ -2,6 +2,7 @@ #define COMMON_MISC_H #include "common_context.h" +#include "radeon_buffer.h" void radeonRecalcScissorRects(radeonContextPtr radeon); void radeonSetCliprects(radeonContextPtr radeon); void radeonUpdateScissor( GLcontext *ctx ); @@ -122,4 +123,36 @@ void radeonRefillCurrentDmaRegion(radeonContextPtr rmesa, int size); void radeonAllocDmaRegion(radeonContextPtr rmesa, struct radeon_bo **pbo, int *poffset, int bytes, int alignment); +void radeonReleaseDmaRegion(radeonContextPtr rmesa); + +void rcommon_flush_last_swtcl_prim(GLcontext *ctx); + +void *rcommonAllocDmaLowVerts(radeonContextPtr rmesa, int nverts, int vsize); + + +static inline struct radeon_renderbuffer *radeon_get_depthbuffer(radeonContextPtr rmesa) +{ + struct radeon_renderbuffer *rrb; + rrb = rmesa->state.depth.rrb; + if (!rrb) + return NULL; + + return rrb; +} + +static inline struct radeon_renderbuffer *radeon_get_colorbuffer(radeonContextPtr rmesa) +{ + struct radeon_renderbuffer *rrb; + GLframebuffer *fb = rmesa->dri.drawable->driverPrivate; + + rrb = rmesa->state.color.rrb; + if (rmesa->radeonScreen->driScreen->dri2.enabled) { + rrb = (struct radeon_renderbuffer *)fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer; + } + if (!rrb) + return NULL; + return rrb; +} + + #endif |