summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-10-13 17:17:04 -0700
committerEric Anholt <[email protected]>2011-10-28 11:19:14 -0700
commit8d9c5167accbc7d46838d3179b13a5a4ea60119c (patch)
tree12d295a9634dd3f339c191389c66dcd0187d05a0
parent964c5195a2195165017fb8eb9bc3e5756735cc57 (diff)
radeon: Use _mesa_get_format_base_format for winsys renderbuffer setup.
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index a98c62d6b8d..4b64cacddad 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -324,48 +324,38 @@ radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv)
case MESA_FORMAT_RGB565:
assert(_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
- rrb->base._BaseFormat = GL_RGB;
break;
case MESA_FORMAT_RGB565_REV:
assert(!_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
- rrb->base._BaseFormat = GL_RGB;
break;
case MESA_FORMAT_XRGB8888:
assert(_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
- rrb->base._BaseFormat = GL_RGB;
break;
case MESA_FORMAT_XRGB8888_REV:
assert(!_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
- rrb->base._BaseFormat = GL_RGB;
break;
case MESA_FORMAT_ARGB8888:
assert(_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
- rrb->base._BaseFormat = GL_RGBA;
break;
case MESA_FORMAT_ARGB8888_REV:
assert(!_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
- rrb->base._BaseFormat = GL_RGBA;
break;
case MESA_FORMAT_S8:
rrb->base.DataType = GL_UNSIGNED_BYTE;
- rrb->base._BaseFormat = GL_STENCIL_INDEX;
break;
case MESA_FORMAT_Z16:
rrb->base.DataType = GL_UNSIGNED_SHORT;
- rrb->base._BaseFormat = GL_DEPTH_COMPONENT;
break;
case MESA_FORMAT_X8_Z24:
rrb->base.DataType = GL_UNSIGNED_INT;
- rrb->base._BaseFormat = GL_DEPTH_COMPONENT;
break;
case MESA_FORMAT_S8_Z24:
rrb->base.DataType = GL_UNSIGNED_INT_24_8_EXT;
- rrb->base._BaseFormat = GL_DEPTH_STENCIL;
break;
default:
fprintf(stderr, "%s: Unknown format %s\n",
@@ -373,6 +363,7 @@ radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv)
_mesa_delete_renderbuffer(&rrb->base);
return NULL;
}
+ rrb->base._BaseFormat = _mesa_get_format_base_format(format);
rrb->dPriv = driDrawPriv;
rrb->base.InternalFormat = _mesa_get_format_base_format(format);