Unichrome DRI driver:
authorThomas Hellström <thomas@tungstengraphics.com>
Wed, 15 Dec 2004 21:05:26 +0000 (21:05 +0000)
committerThomas Hellström <thomas@tungstengraphics.com>
Wed, 15 Dec 2004 21:05:26 +0000 (21:05 +0000)
Check for texture allocation failure (Bugzilla #1633, Bartlomiej Krol)
Reenabled AGP textures (Thomas Hellström)

src/mesa/drivers/dri/unichrome/via_texmem.c

index f1f6b75..2d8aeca 100644 (file)
@@ -441,14 +441,12 @@ void viaUploadTexImages(viaContextPtr vmesa, viaTextureObjectPtr t)
         while (1) {
 
            /*=* John Sheng [2003.5.31]  agp tex *=*/
-           via_alloc_texture(vmesa, t);
-           /*via_alloc_texture_agp(vmesa, t);*/
-
-           if (t->texMem.offset)
-                break;
-           else
-               agpFullCount++;
+           if (via_alloc_texture_agp(vmesa, t))
+               break;
+           if (via_alloc_texture(vmesa, t))
+               break;
 
+           agpFullCount++; 
             if (vmesa->TexObjList.prev == vmesa->CurrentTexObj[0] ||
                 vmesa->TexObjList.prev == vmesa->CurrentTexObj[1]) {
 #ifdef DEBUG