summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-12-10 11:44:43 -0700
committerBrian Paul <[email protected]>2011-12-13 06:45:36 -0700
commit2750809b2e9a7d24d83d01f0a1d5bb5dce027b4c (patch)
tree957809117157922a4a7f6c608eadad1b03ccab6f /src
parenta782db5570a45008f153396070eae153305a7953 (diff)
radeon: stop using _DepthBuffer, _StencilBuffer fields
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex_copy.c9
2 files changed, 8 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 894a01f91f5..bb9cb2aa6a2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -313,8 +313,8 @@ void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
radeon->vtbl.fallback(ctx, RADEON_FALLBACK_DRAW_BUFFER, GL_FALSE);
- if (fb->_DepthBuffer && fb->_DepthBuffer->Wrapped) {
- rrbDepth = radeon_renderbuffer(fb->_DepthBuffer->Wrapped);
+ if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
+ rrbDepth = radeon_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer);
if (rrbDepth && rrbDepth->bo) {
radeon->vtbl.fallback(ctx, RADEON_FALLBACK_DEPTH_BUFFER, GL_FALSE);
} else {
@@ -325,8 +325,8 @@ void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
rrbDepth = NULL;
}
- if (fb->_StencilBuffer && fb->_StencilBuffer->Wrapped) {
- rrbStencil = radeon_renderbuffer(fb->_StencilBuffer->Wrapped);
+ if (fb->Attachment[BUFFER_STENCIL].Renderbuffer) {
+ rrbStencil = radeon_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer);
if (rrbStencil && rrbStencil->bo) {
radeon->vtbl.fallback(ctx, RADEON_FALLBACK_STENCIL_BUFFER, GL_FALSE);
/* need to re-compute stencil hw state */
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
index ca0ac161709..76ca8e6b27d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -58,13 +58,12 @@ do_copy_texsubimage(struct gl_context *ctx,
}
if (_mesa_get_format_bits(timg->base.Base.TexFormat, GL_DEPTH_BITS) > 0) {
- if (ctx->ReadBuffer->_DepthBuffer && ctx->ReadBuffer->_DepthBuffer->Wrapped) {
- rrb = radeon_renderbuffer(ctx->ReadBuffer->_DepthBuffer->Wrapped);
- } else {
- rrb = radeon_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
- }
+ /* copying a depth values */
+ rrb = radeon_renderbuffer(ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Renderbuffer);
+ assert(rrb);
flip_y = ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Type == GL_NONE;
} else {
+ /* copying color */
rrb = radeon_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer);
flip_y = ctx->ReadBuffer->Attachment[BUFFER_COLOR0].Type == GL_NONE;
}