diff options
author | Brian Paul <[email protected]> | 2005-05-06 19:28:31 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-05-06 19:28:31 +0000 |
commit | 883d20791ae08a81ff8c2da7a26474aa70a4c792 (patch) | |
tree | a2252acab7c47ad55526f3d9fef3487987030eab /src/mesa/drivers/dri/unichrome | |
parent | b1d0ac64ab2e8285fd8a1f6b52f86a967162ae35 (diff) |
fix cpp / bytesPerPixel problem (bug 1196554)
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_screen.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index e302011665e..0bf2d4fa4dd 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -121,7 +121,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv) viaScreen->width = gDRIPriv->width; viaScreen->height = gDRIPriv->height; viaScreen->mem = gDRIPriv->mem; - viaScreen->bitsPerPixel = gDRIPriv->bytesPerPixel << 3; + viaScreen->bitsPerPixel = gDRIPriv->bytesPerPixel * 8; viaScreen->bytesPerPixel = gDRIPriv->bytesPerPixel; viaScreen->fbOffset = 0; viaScreen->fbSize = gDRIPriv->fbSize; @@ -256,7 +256,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, /* XXX check/fix the offset/pitch parameters! */ { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, screen->cpp, + = driNewRenderbuffer(GL_RGBA, screen->bytesPerPixel, 0, screen->width); viaSetSpanFunctions(frontRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base); @@ -264,7 +264,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, screen->cpp, + = driNewRenderbuffer(GL_RGBA, screen->bytesPerPixel, 0, screen->width); viaSetSpanFunctions(backRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base); @@ -272,21 +272,21 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, screen->cpp, + = driNewRenderbuffer(GL_DEPTH_COMPONENT16, screen->bytesPerPixel, 0, screen->width); viaSetSpanFunctions(depthRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); } else if (mesaVis->depthBits == 24) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, screen->cpp, + = driNewRenderbuffer(GL_DEPTH_COMPONENT24, screen->bytesPerPixel, 0, screen->width); viaSetSpanFunctions(depthRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); } else if (mesaVis->depthBits == 32) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT32, screen->cpp, + = driNewRenderbuffer(GL_DEPTH_COMPONENT32, screen->bytesPerPixel, 0, screen->width); viaSetSpanFunctions(depthRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); |