mesa: Remove the enum for the oom-within-debug-output case.
authorEric Anholt <eric@anholt.net>
Sat, 23 Feb 2013 00:07:47 +0000 (16:07 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 5 Mar 2013 22:25:01 +0000 (14:25 -0800)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/main/errors.c
src/mesa/main/mtypes.h

index 9dcf4ebee9e52b8b02f450ff29e0e2d56c134635..405ee824829b34bcfbaa6af1f05b433b00afa27d 100644 (file)
@@ -310,12 +310,15 @@ _mesa_log_msg(struct gl_context *ctx, enum mesa_debug_source source,
       emptySlot->id = id;
       emptySlot->severity = severity;
    } else {
+      static GLuint oom_msg_id = 0;
+      debug_get_id(&oom_msg_id);
+
       /* malloc failed! */
       emptySlot->message = out_of_memory;
       emptySlot->length = strlen(out_of_memory)+1;
       emptySlot->source = MESA_DEBUG_SOURCE_OTHER;
       emptySlot->type = MESA_DEBUG_TYPE_ERROR;
-      emptySlot->id = OTHER_ERROR_OUT_OF_MEMORY;
+      emptySlot->id = oom_msg_id;
       emptySlot->severity = MESA_DEBUG_SEVERITY_HIGH;
    }
 
index 9b142e28393815de0757d817a396f0356650c4f3..0f1b321b02e83c74b55d6c8a6d832cc8e47f7aac 100644 (file)
@@ -3421,11 +3421,6 @@ typedef enum {
    API_ERROR_UNKNOWN,
 } gl_api_error;
 
-typedef enum {
-   OTHER_ERROR_UNKNOWN,
-   OTHER_ERROR_OUT_OF_MEMORY,
-} gl_other_error;
-
 struct gl_debug_namespace
 {
    struct _mesa_HashTable *IDs;