summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/swrast
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-28 21:24:11 -0600
committerBrian Paul <[email protected]>2009-10-28 21:24:11 -0600
commit1f196b786d6bd0c6a5dbdc638574ff716cc3d4de (patch)
tree5ae2753b99070f8b35c51576bd39e52df63879d6 /src/mesa/drivers/dri/swrast
parent0ea575d721821262a862ceef010db9b1a8b4a6d9 (diff)
parent086f9fc0e2aef27f54eda87c733685500555bf20 (diff)
Merge branch 'texformat-rework'
Conflicts: src/mesa/drivers/dri/radeon/radeon_fbo.c src/mesa/drivers/dri/s3v/s3v_tex.c src/mesa/drivers/dri/s3v/s3v_xmesa.c src/mesa/drivers/dri/trident/trident_context.c src/mesa/main/debug.c src/mesa/main/mipmap.c src/mesa/main/texformat.c src/mesa/main/texgetimage.c
Diffstat (limited to 'src/mesa/drivers/dri/swrast')
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index df5221b135e..8340861aff8 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -33,6 +33,7 @@
#include "main/context.h"
#include "main/extensions.h"
+#include "main/formats.h"
#include "main/framebuffer.h"
#include "main/imports.h"
#include "main/renderbuffer.h"
@@ -306,50 +307,38 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
switch (pixel_format) {
case PF_A8R8G8B8:
+ xrb->Base.Format = MESA_FORMAT_ARGB8888;
xrb->Base.InternalFormat = GL_RGBA;
xrb->Base._BaseFormat = GL_RGBA;
xrb->Base.DataType = GL_UNSIGNED_BYTE;
- xrb->Base.RedBits = 8 * sizeof(GLubyte);
- xrb->Base.GreenBits = 8 * sizeof(GLubyte);
- xrb->Base.BlueBits = 8 * sizeof(GLubyte);
- xrb->Base.AlphaBits = 8 * sizeof(GLubyte);
xrb->bpp = 32;
break;
case PF_X8R8G8B8:
+ xrb->Base.Format = MESA_FORMAT_ARGB8888; /* XXX */
xrb->Base.InternalFormat = GL_RGB;
xrb->Base._BaseFormat = GL_RGB;
xrb->Base.DataType = GL_UNSIGNED_BYTE;
- xrb->Base.RedBits = 8 * sizeof(GLubyte);
- xrb->Base.GreenBits = 8 * sizeof(GLubyte);
- xrb->Base.BlueBits = 8 * sizeof(GLubyte);
- xrb->Base.AlphaBits = 0;
xrb->bpp = 32;
break;
case PF_R5G6B5:
+ xrb->Base.Format = MESA_FORMAT_RGB565;
xrb->Base.InternalFormat = GL_RGB;
xrb->Base._BaseFormat = GL_RGB;
xrb->Base.DataType = GL_UNSIGNED_BYTE;
- xrb->Base.RedBits = 5 * sizeof(GLubyte);
- xrb->Base.GreenBits = 6 * sizeof(GLubyte);
- xrb->Base.BlueBits = 5 * sizeof(GLubyte);
- xrb->Base.AlphaBits = 0;
xrb->bpp = 16;
break;
case PF_R3G3B2:
+ xrb->Base.Format = MESA_FORMAT_RGB332;
xrb->Base.InternalFormat = GL_RGB;
xrb->Base._BaseFormat = GL_RGB;
xrb->Base.DataType = GL_UNSIGNED_BYTE;
- xrb->Base.RedBits = 3 * sizeof(GLubyte);
- xrb->Base.GreenBits = 3 * sizeof(GLubyte);
- xrb->Base.BlueBits = 2 * sizeof(GLubyte);
- xrb->Base.AlphaBits = 0;
xrb->bpp = 8;
break;
case PF_CI8:
+ xrb->Base.Format = MESA_FORMAT_CI8;
xrb->Base.InternalFormat = GL_COLOR_INDEX8_EXT;
xrb->Base._BaseFormat = GL_COLOR_INDEX;
xrb->Base.DataType = GL_UNSIGNED_BYTE;
- xrb->Base.IndexBits = 8 * sizeof(GLubyte);
xrb->bpp = 8;
break;
default: