diff options
author | Eric Anholt <[email protected]> | 2015-11-25 17:04:21 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-12-01 10:24:38 -0800 |
commit | c75cfe1c8a85cf2fc55826c58718d7654a4c5132 (patch) | |
tree | 789afa17296aa94ca97ca824641a998ec7302223 /src | |
parent | 710762b64a16d41bb3223ff78b719be27a51b303 (diff) |
mesa: Prefer newer names to older ones among names present in core.
Sometimes GL likes to rename an old enum when it grows a more general
purpose, and we should prefer the new name. Changes from this:
GL_POINT/LINE_SIZE_* (1.1) -> GL_SMOOTH_POINT/LINE_SIZE_* (1.2)
GL_FOG_COORDINATE_* (1.4) -> GL_FOG_COORD_* (1.5)
GL_SOURCE[012]_RGB/ALPHA (1.3) -> GL_SRC0_RGB (1.5)
GL_COPY_READ/WRITE_BUFFER (3.1) -> GL_COPY_READ_BUFFER_BINDING (4.2)
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mapi/glapi/gen/gl_enums.py | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py index 5f4ad0b2af5..d37eb5c74a1 100644 --- a/src/mapi/glapi/gen/gl_enums.py +++ b/src/mapi/glapi/gen/gl_enums.py @@ -185,20 +185,9 @@ _mesa_lookup_prim_by_nr(GLuint nr) if name in ['GL_NEXT_BUFFER_NV', # Mesa was choosing GL_LINES for this, which wasn't great. 'GL_TRUE', - # Old names for things where Mesa was using the new names. - 'GL_VERTEX_PROGRAM_POINT_SIZE', - 'GL_MAX_VARYING_FLOATS', - 'GL_CLIP_PLANE0', - 'GL_CLIP_PLANE1', - 'GL_CLIP_PLANE2', - 'GL_CLIP_PLANE3', - 'GL_CLIP_PLANE4', - 'GL_CLIP_PLANE5', - 'GL_MAX_CLIP_PLANES', + # We're blacklisting 4.3, so also blacklist this + # to keep the 4.3/ARB_ssbo name for it. 'GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS', - 'GL_FOG_COORDINATE', - 'GL_CURRENT_FOG_COORDINATE', - 'GL_COMPARE_R_TO_TEXTURE', # GL 2.0 name when Mesa was using GLES 1.0. 'GL_BLEND_EQUATION_RGB', # GL3.x compat names that Mesa was missing. @@ -518,15 +507,17 @@ _mesa_lookup_prim_by_nr(GLuint nr) 'GL_ES_VERSION_3_1']: continue - # Give priority to the older versions of various symbol - # names, since Mesa tended to have the older ones. + # When an enum gets renamed in a newer version (generally + # because of some generalization of the functionality), + # prefer the newer name. Also, prefer desktop GL names to + # ES. m = re.match('GL_VERSION_([0-9])_([0-9])', feature_name) if m: - feature_prio = int(m.group(1) + m.group(2)) + feature_prio = 100 - int(m.group(1) + m.group(2)) else: m = re.match('GL_ES_VERSION_([0-9])_([0-9])', feature_name) if m: - feature_prio = int(m.group(1) + m.group(2)) + feature_prio = 200 - int(m.group(1) + m.group(2)) else: feature_prio = 200 |