summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_fbo.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-14 13:14:22 -0600
committerBrian Paul <[email protected]>2009-10-14 13:15:05 -0600
commitc47b03ebebd4db30bf5ed17b44c0f8757306b197 (patch)
treeb759da34b4ba375cfa20c900971c7084eca16e03 /src/mesa/drivers/dri/radeon/radeon_fbo.c
parent45e76d2665b38ba3787548310efc59e969124c01 (diff)
radeon: initialize renderbuffer Format field in radeon_create_renderbuffer()
Plus, use MESA_FORMAT_S8_Z24 everywhere.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_fbo.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c11
1 files changed, 9 insertions, 2 deletions
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;