summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/i830.h1
-rw-r--r--src/i830_dri.c10
-rw-r--r--src/i830_memory.c2
3 files changed, 12 insertions, 1 deletions
diff --git a/src/i830.h b/src/i830.h
index dc8041c5..d4be4034 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -591,6 +591,7 @@ void i830_free_3d_memory(ScrnInfoPtr pScrn);
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 8fae4b7e..b24c8391 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 0742d8c0..a20e7432 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1156,7 +1156,7 @@ i830_allocate_depthbuffer(ScrnInfoPtr pScrn)
return TRUE;
}
-static Bool
+Bool
i830_allocate_texture_memory(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);