From c47b03ebebd4db30bf5ed17b44c0f8757306b197 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Oct 2009 13:14:22 -0600 Subject: radeon: initialize renderbuffer Format field in radeon_create_renderbuffer() Plus, use MESA_FORMAT_S8_Z24 everywhere. --- src/mesa/drivers/dri/radeon/radeon_fbo.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 796dd1b4237..21007d85c3d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -121,7 +121,7 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb, case GL_STENCIL_INDEX8_EXT: case GL_STENCIL_INDEX16_EXT: /* alloc a depth+stencil buffer */ - rb->Format = MESA_FORMAT_Z24_S8; + rb->Format = MESA_FORMAT_S8_Z24; rb->DataType = GL_UNSIGNED_INT_24_8_EXT; cpp = 4; break; @@ -139,7 +139,7 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb, break; case GL_DEPTH_STENCIL_EXT: case GL_DEPTH24_STENCIL8_EXT: - rb->Format = MESA_FORMAT_Z24_S8; + rb->Format = MESA_FORMAT_S8_Z24; rb->DataType = GL_UNSIGNED_INT_24_8_EXT; cpp = 4; break; @@ -255,30 +255,37 @@ radeon_create_renderbuffer(GLenum format, __DRIdrawablePrivate *driDrawPriv) /* XXX format junk */ switch (format) { case GL_RGB5: + rrb->base.Format = MESA_FORMAT_RGB565; rrb->base.DataType = GL_UNSIGNED_BYTE; rrb->base._BaseFormat = GL_RGB; break; case GL_RGB8: + rrb->base.Format = MESA_FORMAT_ARGB8888; rrb->base.DataType = GL_UNSIGNED_BYTE; rrb->base._BaseFormat = GL_RGB; break; case GL_RGBA8: + rrb->base.Format = MESA_FORMAT_ARGB8888; rrb->base.DataType = GL_UNSIGNED_BYTE; rrb->base._BaseFormat = GL_RGBA; break; case GL_STENCIL_INDEX8_EXT: + rrb->base.Format = MESA_FORMAT_S8; rrb->base.DataType = GL_UNSIGNED_BYTE; rrb->base._BaseFormat = GL_STENCIL_INDEX; break; case GL_DEPTH_COMPONENT16: + rrb->base.Format = MESA_FORMAT_Z16; rrb->base.DataType = GL_UNSIGNED_SHORT; rrb->base._BaseFormat = GL_DEPTH_COMPONENT; break; case GL_DEPTH_COMPONENT24: + rrb->base.Format = MESA_FORMAT_Z32; rrb->base.DataType = GL_UNSIGNED_INT; rrb->base._BaseFormat = GL_DEPTH_COMPONENT; break; case GL_DEPTH24_STENCIL8_EXT: + rrb->base.Format = MESA_FORMAT_S8_Z24; rrb->base.DataType = GL_UNSIGNED_INT_24_8_EXT; rrb->base._BaseFormat = GL_STENCIL_INDEX; break; -- cgit v1.2.3