return age;
}
-/**
- * Check if we're about to draw into the front color buffer.
- * If so, set the intel->front_buffer_dirty field to true.
- */
-void
-radeon_check_front_buffer_rendering(struct gl_context *ctx)
-{
- radeonContextPtr radeon = RADEON_CONTEXT(ctx);
- const struct gl_framebuffer *fb = ctx->DrawBuffer;
-
- if (fb->Name == 0) {
- /* drawing to window system buffer */
- if (fb->_NumColorDrawBuffers > 0) {
- if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
- radeon->front_buffer_dirty = GL_TRUE;
- }
- }
- }
-}
-
-
void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack, GLvoid * pixels);
-void radeon_check_front_buffer_rendering(struct gl_context *ctx);
static inline struct radeon_renderbuffer *radeon_renderbuffer(struct gl_renderbuffer *rb)
{
struct radeon_renderbuffer *rrb = (struct radeon_renderbuffer *)rb;
#define radeon_prepare_render r200_radeon_prepare_render
#define radeonUnbindContext r200_radeonUnbindContext
#define radeon_update_renderbuffers r200_radeon_update_renderbuffers
-#define radeon_check_front_buffer_rendering r200_radeon_check_front_buffer_rendering
#define radeonCountStateEmitSize r200_radeonCountStateEmitSize
#define radeon_draw_buffer r200_radeon_draw_buffer
#define radeonDrawBuffer r200_radeonDrawBuffer
#include "main/texformat.h"
#include "main/renderbuffer.h"
#include "main/samplerobj.h"
+#include "main/framebuffer.h"
#include "swrast/swrast.h"
#include "swrast/s_renderbuffer.h"
for (i = 0; i < BUFFER_COUNT; i++)
radeon_renderbuffer_map(ctx, fb->Attachment[i].Renderbuffer);
- radeon_check_front_buffer_rendering(ctx);
+ if (_mesa_is_front_buffer_drawing(fb))
+ RADEON_CONTEXT(ctx)->front_buffer_dirty = true;
}
static void
for (i = 0; i < BUFFER_COUNT; i++)
radeon_renderbuffer_unmap(ctx, fb->Attachment[i].Renderbuffer);
- radeon_check_front_buffer_rendering(ctx);
+ if (_mesa_is_front_buffer_drawing(fb))
+ RADEON_CONTEXT(ctx)->front_buffer_dirty = true;
}
static void radeonSpanRenderStart(struct gl_context * ctx)