Make memstat easier to read, add missing Intel ID and cleanups.
authorGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Wed, 14 Apr 2010 21:12:05 +0000 (21:12 +0000)
committerGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Wed, 14 Apr 2010 21:12:05 +0000 (21:12 +0000)
intern/guardedalloc/intern/mallocn.c
source/blender/editors/armature/editarmature.c
source/blender/editors/object/object_transform.c
source/blender/gpu/intern/gpu_extensions.c
source/gameengine/GameLogic/Makefile

index 806f8d183ba8354872c493328465f46079be79d1..94453e919120413c1ce14f671824e3a350b32972 100644 (file)
@@ -463,12 +463,17 @@ void MEM_printmemlist_stats()
        /* sort by length and print */
        qsort(printblock, totpb, sizeof(MemPrintBlock), compare_len);
        printf("\ntotal memory len: %.3f MB\n", (double)mem_in_use/(double)(1024*1024));
+       printf(" ITEMS TOTAL-MiB AVERAGE-KiB TYPE\n");
        for(a=0, pb=printblock; a<totpb; a++, pb++)
-               printf("%s items: %d, len: %.3f MB\n", pb->name, pb->items, (double)pb->len/(double)(1024*1024));
+               printf("%6d (%8.3f  %8.3f) %s\n", pb->items, (double)pb->len/(double)(1024*1024), (double)pb->len/1024.0/(double)pb->items, pb->name);
 
        free(printblock);
        
        mem_unlock_thread();
+
+#if 0 /* GLIBC only */
+       malloc_stats();
+#endif
 }
 
 /* Prints in python syntax for easy */
index 5f0c2e3d4be27cf16afadb9a4c11596d97a290d6..2db86d70734b4edde5a51586c82563edf6fa37f7 100644 (file)
@@ -5075,7 +5075,7 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op)
                                        VECCOPY(pchan->eul, eul);
                                }
                        }
-               }                                               
+               }                                               // Duplicated in source/blender/editors/object/object_transform.c
                else { 
                        if (pchan->rotmode == ROT_MODE_QUAT) {
                                pchan->quat[1]=pchan->quat[2]=pchan->quat[3]= 0.0f; 
index 13b7f8839226273cbece09c117c130f8ca113a17..c363a9858cba1502d929d16c83a47c6a439b011b 100644 (file)
@@ -208,7 +208,7 @@ static int object_rotation_clear_exec(bContext *C, wmOperator *op)
                                                VECCOPY(ob->rot, eul);
                                        }
                                }
-                       }                                               
+                       }                                                // Duplicated in source/blender/editors/armature/editarmature.c
                        else { 
                                if (ob->rotmode == ROT_MODE_QUAT) {
                                        ob->quat[1]=ob->quat[2]=ob->quat[3]= 0.0f; 
index d53b8e67c560982ecb2a8de084cbfd08808b60ff..4eaf969ee8ac2f86431990696f6ca0c559740a39 100644 (file)
@@ -122,7 +122,10 @@ void GPU_extensions_init()
                GG.device = GPU_DEVICE_NVIDIA;
                GG.driver = GPU_DRIVER_OFFICIAL;
        }
-       else if(strstr(vendor, "Intel") || strstr(renderer, "Mesa DRI Intel")) {
+       else if(strstr(vendor, "Intel") ||
+               /* src/mesa/drivers/dri/intel/intel_context.c */
+               strstr(renderer, "Mesa DRI Intel") ||
+               strstr(renderer, "Mesa DRI Mobile Intel")) {
                GG.device = GPU_DEVICE_INTEL;
                GG.driver = GPU_DRIVER_OFFICIAL;
        }
index a1794a60452c85885e52ebc2e1ce5da12a1b0a2c..ba1e1c25ee72487ad7ec5fd072006e2dc8b95137 100644 (file)
@@ -38,10 +38,10 @@ include nan_compile.mk
 
 CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
 
-CPPFLAGS += -I../Expressions 
+CPPFLAGS += -I../Expressions
 CPPFLAGS += -I../SceneGraph
 CPPFLAGS += -I../Rasterizer
-CPPFLAGS += -I$(NAN_STRING)/include    
+CPPFLAGS += -I$(NAN_STRING)/include
 CPPFLAGS += -I$(NAN_MOTO)/include
 CPPFLAGS += -I../../blender/makesdna
 CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)