summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/unichrome/via_ioctl.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2004-10-08 01:15:52 +0000
committerIan Romanick <idr@us.ibm.com>2004-10-08 01:15:52 +0000
commit3eccddb746b797b4674d147839956116d8b40ae7 (patch)
treecd6ffad14fb8024ed7c4d360dc32d2813d29ef68 /src/mesa/drivers/dri/unichrome/via_ioctl.c
parenta2dc424acfe83f3c66d3509f5a1efc24ce884367 (diff)
Massively cleaned up the code that calculates front/back/depth buffer
pitch and size. Cut out a bunch of dead code. This fixes bugzilla #1555.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_ioctl.c')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c
index 6021efefed..1e210b7b93 100644
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.c
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c
@@ -313,7 +313,6 @@ void viaCopyBuffer(const __DRIdrawablePrivate *dPriv)
#ifdef DEBUG
if (VIA_DEBUG) fprintf(stderr, "%s SwapPBuffers\n", __FUNCTION__);
#endif /*=* [DBG] for pbuffer *=*/
- /*viaDoSwapBufferSoftFront(vmesa);*/
}
else {
GLuint scrn = 0;
@@ -1436,83 +1435,7 @@ void viaDoSwapPBuffers(viaContextPtr vmesa)
#endif
}
-void viaDoSwapBufferSoft(viaContextPtr vmesa)
-{
- GLuint nFrontPitch;
- GLuint nBackPitch;
- GLuint nFrontBase, nBackBase;
- GLuint i, j;
- GLubyte *by, *fy;
- GLuint w;
-
- w = vmesa->viaScreen->width;
- w = BUFFER_ALIGN_WIDTH(w, BUFFER_ALIGNMENT);
-
- if (vmesa->viaScreen->bitsPerPixel == 0x20)
- nFrontPitch = w << 2;
- else
- nFrontPitch = w << 1;
-
- nBackPitch = vmesa->back.pitch;
-
- /* Caculate Base */
- nFrontBase = (GLuint) vmesa->driScreen->pFB;
- nBackBase = ((GLuint) vmesa->back.offset) + ((GLuint) vmesa->driScreen->pFB);
- by = (GLubyte *) nBackBase;
- fy = (GLubyte *) nFrontBase;
-
- viaFlushPrimsLocked(vmesa);
-
- for (i = 0; i < vmesa->driDrawable->h; i++) {
- fy = (GLubyte *)(nFrontBase + i * nFrontPitch);
- for (j = 0; j < nBackPitch; j++) {
- *((GLubyte*)fy) = *((GLubyte*)by);
- fy = fy + 1;
- by = by + 1;
- }
-
- }
-
-}
-void viaDoSwapBufferSoftFront(viaContextPtr vmesa)
-{
- GLuint nFrontPitch;
- GLuint nBackPitch;
- GLuint nFrontBase, nBackBase;
- GLuint i, j;
- GLubyte *by, *fy;
- GLuint w;
-
- w = vmesa->viaScreen->width;
- w = BUFFER_ALIGN_WIDTH(w, BUFFER_ALIGNMENT);
-
- if (vmesa->viaScreen->bitsPerPixel == 0x20)
- nFrontPitch = w << 2;
- else
- nFrontPitch = w << 1;
-
- nBackPitch = vmesa->front.pitch;
-
- /* Caculate Base */
- nFrontBase = (GLuint) vmesa->driScreen->pFB;
- nBackBase = ((GLuint) vmesa->front.offset) + ((GLuint) vmesa->driScreen->pFB);
- by = (GLubyte *) nBackBase;
- fy = (GLubyte *) nFrontBase;
-
- viaFlushPrimsLocked(vmesa);
-
- for (i = 0; i < vmesa->driDrawable->h; i++) {
- fy = (GLubyte *)(nFrontBase + i * nFrontPitch);
- for (j = 0; j < nBackPitch; j++) {
- *((GLubyte*)fy) = *((GLubyte*)by);
- fy = fy + 1;
- by = by + 1;
- }
-
- }
-
-}
int flush_agp(viaContextPtr vmesa, drm_via_flush_agp_t* agpCmd)
{
GLuint *pnAGPCurrentPhysStart;