summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-02-23 14:59:24 -0800
committerEric Anholt <eric@anholt.net>2007-02-23 14:59:24 -0800
commit84a7429730ddd29072d696accb9fdd8fea40731a (patch)
tree236c358b65d8ba4f3b8f1b2f42f62c872fcb4be4 /src/i830_memory.c
parent7bb725dee9ef0ccdc478ed4931dc267bcb80203f (diff)
downloadxorg-driver-xf86-video-intel-84a7429730ddd29072d696accb9fdd8fea40731a.tar.gz
Always allocate logical_context, since we use it in emitting invariants.
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 5050a7a9..74610706 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -255,8 +255,6 @@ i830_free_3d_memory(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
- i830_free_memory(pScrn, pI830->logical_context);
- pI830->logical_context = NULL;
i830_free_memory(pScrn, pI830->back_buffer);
pI830->back_buffer = NULL;
i830_free_memory(pScrn, pI830->depth_buffer);
@@ -915,6 +913,15 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
}
}
+ /* Space for the X Server's 3D context. 32k is fine for right now. */
+ pI830->logical_context = i830_allocate_memory(pScrn, "logical 3D context",
+ KB(32), GTT_PAGE_SIZE, 0);
+ if (pI830->logical_context == NULL) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to allocate logical context space.\n");
+ return FALSE;
+ }
+
#ifdef I830_XV
/* Allocate overlay register space and optional XAA linear allocator
* space. The second head in zaphod mode will share the space.
@@ -1165,18 +1172,7 @@ i830_allocate_texture_memory(ScrnInfoPtr pScrn)
Bool
i830_allocate_3d_memory(ScrnInfoPtr pScrn)
{
- I830Ptr pI830 = I830PTR(pScrn);
-
- DPRINTF(PFX, "I830Allocate3DMemory\n");
-
- /* Space for logical context. 32k is fine for right now. */
- pI830->logical_context = i830_allocate_memory(pScrn, "logical 3D context",
- KB(32), GTT_PAGE_SIZE, 0);
- if (pI830->logical_context == NULL) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Failed to allocate logical context space.\n");
- return FALSE;
- }
+ DPRINTF(PFX, "i830_allocate_3d_memory\n");
if (!i830_allocate_backbuffer(pScrn))
return FALSE;