Mesa (master): mesa: Remove the enum for the oom-within-debug-output case.

Eric Anholt anholt at kemper.freedesktop.org
Tue Mar 5 22:28:37 UTC 2013


Module: Mesa
Branch: master
Commit: d9249935db113e1244510de0165dc96a0766bba9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9249935db113e1244510de0165dc96a0766bba9

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 22 16:07:47 2013 -0800

mesa: Remove the enum for the oom-within-debug-output case.

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

---

 src/mesa/main/errors.c |    5 ++++-
 src/mesa/main/mtypes.h |    5 -----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 9dcf4eb..405ee82 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -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;
    }
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 9b142e2..0f1b321 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;




More information about the mesa-commit mailing list