[Mesa-dev] [PATCH 04/13] radeon: stop using _DepthBuffer, _StencilBuffer fields
Brian Paul
brianp at vmware.com
Sat Dec 10 10:58:30 PST 2011
---
src/mesa/drivers/dri/radeon/radeon_common.c | 8 ++++----
src/mesa/drivers/dri/radeon/radeon_tex_copy.c | 9 ++++-----
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 894a01f..bb9cb2a 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 ca0ac16..76ca8e6 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;
}
--
1.7.3.4
More information about the mesa-dev
mailing list