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

Author: Eric Anholt <e...@anholt.net>
Date:   Sat Sep 19 12:57:22 2015 -0400

mesa: Use a 32-bit offset for the enums.c string offset table.

With GLES 3.1, GL 4.5, and many new vendor extensions about to get their
enums added, we jump up to 85k of table.

Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>

---

 src/mapi/glapi/gen/gl_enums.py |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index d37eb5c..05125f5 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -55,7 +55,7 @@ class PrintGlEnums(gl_XML.gl_print_base):
         print '#include "main/mtypes.h"'
         print ''
         print 'typedef struct PACKED {'
-        print '   uint16_t offset;'
+        print '   uint32_t offset;'
         print '   int n;'
         print '} enum_elt;'
         print ''
@@ -87,8 +87,6 @@ const char *_mesa_enum_to_string( int nr )
 {
    enum_elt *elt;
 
-   STATIC_ASSERT(sizeof(enum_string_table) < (1 << 16));
-
    elt = bsearch(& nr, enum_string_table_offsets,
                  ARRAY_SIZE(enum_string_table_offsets),
                  sizeof(enum_string_table_offsets[0]),

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to