xf86-video-intel: src/i830.h src/i830_dri.c src/i830_memory.c

Michel Daenzer daenzer at kemper.freedesktop.org
Wed Mar 14 12:43:21 EET 2007


 src/i830.h        |    1 +
 src/i830_dri.c    |   10 ++++++++++
 src/i830_memory.c |    2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)

New commits:
diff-tree 555b801a75cafa082808bc9bb683e700fc97d79a (from 66fdb08c83d353fbe4e917900c54b555c869eb80)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Wed Mar 14 11:41:50 2007 +0100

    Make sure the legacy texture area is there when needed.
    
    This currently only matters when the DRM memory manager is not available and
    Option "Legacy3D" "off" is specified, but that hasn't always been the case and
    might change again in the future.

diff --git a/src/i830.h b/src/i830.h
index dc8041c..d4be403 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -591,6 +591,7 @@ void i830_free_3d_memory(ScrnInfoPtr pSc
 void i830_free_memory(ScrnInfoPtr pScrn, i830_memory *mem);
 extern long I830CheckAvailableMemory(ScrnInfoPtr pScrn);
 Bool i830_allocate_2d_memory(ScrnInfoPtr pScrn);
+Bool i830_allocate_texture_memory(ScrnInfoPtr pScrn);
 Bool i830_allocate_3d_memory(ScrnInfoPtr pScrn);
 
 extern Bool I830IsPrimary(ScrnInfoPtr pScrn);
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 8fae4b7..b24c839 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -702,6 +702,16 @@ I830DRIScreenInit(ScreenPtr pScreen)
 
 	       i830_free_memory(pScrn, pI830->memory_manager);
 	       pI830->memory_manager = NULL;
+
+	       if (!(pI830->mmModeFlags & I830_KERNEL_TEX)) {
+		  pI830->mmModeFlags |= I830_KERNEL_TEX;
+
+		  if (!i830_allocate_texture_memory(pScrn)) {
+		     I830DRICloseScreen(pScreen);
+		     drmFreeVersion(version);
+		     return FALSE;
+		  }
+	       }
 	    }
 	 }
 #ifdef DAMAGE
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 0742d8c..a20e743 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1156,7 +1156,7 @@ i830_allocate_depthbuffer(ScrnInfoPtr pS
     return TRUE;
 }
 
-static Bool
+Bool
 i830_allocate_texture_memory(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);



More information about the xorg-commit mailing list