ctx->NewState |= (_NEW_DEPTH | _NEW_STENCIL);
}
- radeon->state.depth.rrb = rrbDepth;
- radeon->state.color.rrb = rrbColor;
+ _mesa_reference_renderbuffer(&radeon->state.depth.rb, &rrbDepth->base);
+ _mesa_reference_renderbuffer(&radeon->state.color.rb, &rrbColor->base);
radeon->state.color.draw_offset = offset;
#if 0
static inline struct radeon_renderbuffer *radeon_get_depthbuffer(radeonContextPtr rmesa)
{
struct radeon_renderbuffer *rrb;
- rrb = rmesa->state.depth.rrb;
+ rrb = radeon_renderbuffer(rmesa->state.depth.rb);
if (!rrb)
return NULL;
{
struct radeon_renderbuffer *rrb;
- rrb = rmesa->state.color.rrb;
+ rrb = radeon_renderbuffer(rmesa->state.color.rb);
if (!rrb)
return NULL;
return rrb;
#include "drirenderbuffer.h"
#include "main/context.h"
#include "main/framebuffer.h"
+#include "main/renderbuffer.h"
#include "main/state.h"
#include "main/simple_list.h"
#include "swrast/swrast.h"
radeon_update_renderbuffers(driContextPriv, driDrawPriv);
if (driDrawPriv != driReadPriv)
radeon_update_renderbuffers(driContextPriv, driReadPriv);
- radeon->state.color.rrb =
- radeon_get_renderbuffer(&drfb->base, BUFFER_BACK_LEFT);
- radeon->state.depth.rrb =
- radeon_get_renderbuffer(&drfb->base, BUFFER_DEPTH);
+ _mesa_reference_renderbuffer(&radeon->state.color.rb,
+ &(radeon_get_renderbuffer(&drfb->base, BUFFER_BACK_LEFT)->base));
+ _mesa_reference_renderbuffer(&radeon->state.depth.rb,
+ &(radeon_get_renderbuffer(&drfb->base, BUFFER_DEPTH)->base));
} else {
radeon_make_renderbuffer_current(radeon, drfb);
}
struct radeon_colorbuffer_state {
GLuint clear;
int roundEnable;
- struct radeon_renderbuffer *rrb;
+ struct gl_renderbuffer *rb;
uint32_t draw_offset; /* offset into color renderbuffer - FBOs */
};
struct radeon_depthbuffer_state {
GLuint clear;
- struct radeon_renderbuffer *rrb;
+ struct gl_renderbuffer *rb;
};
struct radeon_scissor_state {