diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2004-12-29 12:39:50 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2004-12-29 12:39:50 +0000 |
commit | 13ae06cf36f9d04c0a04cdc19196f400d7a8c642 (patch) | |
tree | ccd2bc240d06f74bd4d9776eb51ed72a1e5bca82 /src/mesa/drivers/dri/unichrome/via_fb.c | |
parent | 7b05b70c2af9f76222a40941b393b5f04ce83048 (diff) | |
download | external_mesa3d-13ae06cf36f9d04c0a04cdc19196f400d7a8c642.zip external_mesa3d-13ae06cf36f9d04c0a04cdc19196f400d7a8c642.tar.gz external_mesa3d-13ae06cf36f9d04c0a04cdc19196f400d7a8c642.tar.bz2 |
Large update
- Remove via duplicates of shared template files
- Update driver to work with current versions of the above
- Rework dma accounting
- Rework emitting to dma to use a consistent set of macros
The handling of cliprects in the driver is still pretty questionable.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_fb.c')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_fb.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_fb.c b/src/mesa/drivers/dri/unichrome/via_fb.c index 5c4414d..cf4eadc 100644 --- a/src/mesa/drivers/dri/unichrome/via_fb.c +++ b/src/mesa/drivers/dri/unichrome/via_fb.c @@ -155,26 +155,25 @@ via_free_depth_buffer(viaContextPtr vmesa) GLboolean via_alloc_dma_buffer(viaContextPtr vmesa) { - drmVIADMAInit init; + drmVIADMAInit init; - if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__); - vmesa->dma = (GLuint *) malloc(VIA_DMA_BUFSIZ); + if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__); + vmesa->dma = (GLuint *) malloc(VIA_DMA_BUFSIZ); - /* - * Check whether AGP DMA has been initialized. - */ - - init.func = VIA_DMA_INITIALIZED; - vmesa->useAgp = + /* + * Check whether AGP DMA has been initialized. + */ + init.func = VIA_DMA_INITIALIZED; + vmesa->useAgp = ( 0 == drmCommandWrite(vmesa->driFd, DRM_VIA_DMA_INIT, &init, sizeof(init))); - if (vmesa->useAgp) - printf("unichrome_dri.so: Using AGP.\n"); - else - printf("unichrome_dri.so: Using PCI.\n"); + if (vmesa->useAgp) + printf("unichrome_dri.so: Using AGP.\n"); + else + printf("unichrome_dri.so: Using PCI.\n"); - if (VIA_DEBUG) fprintf(stderr, "%s - out\n", __FUNCTION__); - return ((vmesa->dma) ? GL_TRUE : GL_FALSE); + if (VIA_DEBUG) fprintf(stderr, "%s - out\n", __FUNCTION__); + return ((vmesa->dma) ? GL_TRUE : GL_FALSE); } void |