diff options
author | Eric Anholt <[email protected]> | 2015-11-25 17:00:00 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-12-01 10:24:36 -0800 |
commit | 710762b64a16d41bb3223ff78b719be27a51b303 (patch) | |
tree | e69862cb00c2077b6be26a959893b748c62aba90 /src/mesa/main/tests/enum_strings.cpp | |
parent | cbabf5f9dc4f69ef17e24566cb3fbc1c4ef0de4f (diff) |
mesa: Drop bitfield "enums" from the enum-to-string table.
Asking the table for bitfield names doesn't make any sense. For 0x10, do
you want GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV or
GL_COLOR_BUFFER_BIT4_QCOM or GL_POLYGON_STIPPLE_BIT or
GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV? Giving a useful answer would
depend on a whole lot of context.
This also fixes a bad enum table entry, where we chose GL_HINT_BIT instead
of GL_ABGR_EXT for 0x8000, so we can now fix its entry in the enum_strings
test.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/tests/enum_strings.cpp')
-rw-r--r-- | src/mesa/main/tests/enum_strings.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp index 8b920261f8c..bff425aaf89 100644 --- a/src/mesa/main/tests/enum_strings.cpp +++ b/src/mesa/main/tests/enum_strings.cpp @@ -58,6 +58,11 @@ const struct enum_info everything[] = { /* A core enum, that should take precedence over a _BIT. */ { 0x0100, "GL_ACCUM" }, + /* An enum with "_BIT" that shouldn't get stripped out when we drop most + * "*_BIT" enums. + */ + { 0x0d55, "GL_ALPHA_BITS" }, + /* An EXT-only extension that we never expect to see show up in ARB/core. */ { 0x8062, "GL_REPLACE_EXT" }, @@ -78,23 +83,17 @@ const struct enum_info everything[] = { */ { 0x850a, "GL_MODELVIEW1_ARB" }, - /* This should be included, but it's value collides with GL_HINT_BIT. The - * generator script picks GL_HINT_BIT because it prefers names that lack an - * extension suffix. - */ -/* { 0x8000, "GL_ABGR_EXT" }, */ - { 0x8000, "GL_HINT_BIT" }, + /* An EXT-only enum that should take precedence over a _BIT. */ + { 0x8000, "GL_ABGR_EXT" }, /* An unusually-large enum */ { 0x19262, "GL_RASTER_POSITION_UNCLIPPED_IBM" }, - /* A bitmask masquerading as an enum */ - { 0x00080000, "GL_SCISSOR_BIT" }, - - /* A bitfield where Mesa uses a different value from Khronos. */ - { 0x000fffff, "GL_ALL_ATTRIB_BITS" }, - - /* A bitfield in the table, where we fail to return its string anyway! */ + /* Bitfields like GL_SCISSOR_BIT and GL_ALL_ATTRIB_BITS should not appear + * in the table. + */ + { 0x00080000, "0x80000" }, + { 0x000fffff, "0xfffff" }, { (int)0xffffffff, "0xffffffff" }, { 0, NULL } |